Learn how to use time-chunking methods in the Python SDK to retrieve large volumes of articles
"total_hits": 10000
as a hard limit, and you cannot retrieve more through
standard pagination.
get_all_articles
get_all_headlines
time_chunk_size="1d"
over 5 days, the method makes 5 API
calls, one for each day, with auto pagination to potentially retrieve up to
50,000 articles.
Query type | Articles per day | Recommended chunk size |
---|---|---|
Extremely broad | 10,000+ per hour | "1h" |
Very broad | 10,000+ per day | "6h" |
Broad | 3,000-10,000 per day | "1d" |
Moderate | 1,000-3,000 per day | "3d" |
Specific | 100-1,000 per day | "7d" |
Very specific | < 100 per day | "30d" |
get_all_articles
(e.g., "10d"
or "2023-03-15"
).get_all_articles
defaults to current time.get_all_headlines
(e.g., "1d"
or "2023-03-15"
)."1h"
, "6h"
, "1d"
, "7d"
, "1m"
.Rate limiting errors
Memory errors
max_articles
parameter. - Process data in
smaller batches. - Save results incrementally as shown in the advanced
example. - Release memory with del
and gc.collect()
.Missing results