Learn how to iterate through found pages and extract articles
total_hits
tells you how many articles are found.
total_pages
indicates how many API calls you will have to make in order to get
these articles.
One API call can bring a maximum of 100 articles.
You can increase the page_size
parameter for your search to make fewer calls
and get more data.
page_size
and being
on the 1st page, we are seeing all found articles from 1 to 100 out
of 1300.
By incrementing the page
parameter to 2, I will get all articles from
101 to 200 out of 1300. You get the logic.
total_pages
page
input until the total_pages
value to get all articles.pip install
launched from the
terminal. You can find all the details either on
PyPi website or our
GitHub Repository.
get_search_all_pages
and
get_latest_headlines_all_pages
to simplify the process of extracting all
articles.