ok so trying to use the api in excel to display a list of attacks from a date range, how ever i can only get the last 100 attacks is this possible todo or am i tool stupid to get it?
im new here....
Started by Shenzi [2410113] on in API Development.
About this thread
Posts archived: 2 / 2 posts (100%) · the total is Torn's reply count + the opening post at the last fetch
Counted by TornLife from the archived posts.
- Archived posts
- 2
- Discussion span
- →
- People posting
- 2
- Likes on archived posts
- 0
- Authority score
- 50 / 100
- Historical score
- 16 / 100
- Story score
- 21 / 100
- Engagement score
- 39 / 100
Look through some of the recent posts (like the one right before yours) and read through this. Most results return the latest 100 results, but you can provide a `to` or `from` (or both) variable to the api call to get data from a different period. The basic approach is to write a loop that takes the latest or earliest timestamp from your returned result and uses that as either `to` or `from` for the next call.
Since you are interested in attacks, you might want to try `attacksfull`, which returns less information, but in chunks of 1000 (same logic with `to` and `from` applies).
Also, there is a 30 sec cache for similar calls (except `log` and some specific scenarios), so you would want to add a 30 sec delay between your calls, unless you are using multiple API keys from different users.
Since you are interested in attacks, you might want to try `attacksfull`, which returns less information, but in chunks of 1000 (same logic with `to` and `from` applies).
Also, there is a 30 sec cache for similar calls (except `log` and some specific scenarios), so you would want to add a 30 sec delay between your calls, unless you are using multiple API keys from different users.