APITube Help Center

How to Paginate Through News API Results

Get the next page of articles and know when to stop

Kent Hudson

Written by Kent Hudson

August 22, 2026

Updated October 16, 2026

Open this example in the API Playground ↗

How to paginate through News API results

Use page to choose a page and per_page to set its size. Start with page 1, then follow next_page while more results are available. Page-size limits depend on your plan.

curl "https://api.apitube.io/v1/news/everything?per_page=50&page=1&api_key=YOUR_API_KEY"

You can also send your key in the X-API-Key header. Use the same filters and page size for each request.

Which parameters control pagination?

page starts at 1. With per_page=50, page 1 returns the first 50 matches, page 2 the next 50 and page 3 starts at match 101.

Maximum page sizes are:

  • Free: 10 articles.
  • Starter: 50 articles.
  • Basic: 200 articles.
  • Professional and Corporate: 250 articles.

The default is 100, reduced to your plan’s limit when that limit is lower. Asking for more than your plan allows returns HTTP 400 with ER0171.

Free allows only the first five pages; a higher page returns ER0173. Use whole numbers. Invalid per_page and page values return ER0170 and ER0172. A page size below 1 returns ER0299; a page number below 1 is adjusted to 1.

How do you move to the next page?

Read these fields beside results:

  • page: the current page number.
  • limit: the page size in use.
  • has_next_pages: whether another page may exist.
  • next_page: the URL for that page, or an empty value when none is available.
  • has_previous_page and previous_page: whether and how to go back.

Continue while has_next_pages is true, and stop if results is empty. A full final page can report that another page may exist; the next request then returns no articles.

How do you get the total number of matches?

Article search responses do not include a total count. Send the same filters to /v1/news/count when you need one:

curl "https://api.apitube.io/v1/news/count?title=tesla&language.code=en&api_key=YOUR_API_KEY"

The count is a separate request. Keep dates and other filters consistent when comparing it with the pages you retrieve.

Common Questions

What is the maximum page size?

10 on Free, 50 on Starter, 200 on Basic and 250 on Professional or Corporate. Larger values return ER0171.

Why do articles shift between pages?

Pages are slices of a sorted list. New matching articles can move older results to later pages, causing repeats or omissions as you read.

Keep the same sort parameters on every request and set published_at.end to bound the search. A fixed date does not freeze the results: articles added later can still have an earlier publication date. Track article IDs to handle repeats.

Which errors can pagination return?

HTTP 400 codes include ER0170 for an invalid page size, ER0171 for a size above the plan limit, ER0172 for an invalid page number, ER0173 for Free pages above 5 and ER0299 for a size below 1. See the News API parameters documentation.


Related Articles