APITube Help Center

How to Count News Articles Without Downloading Them

Get the number of matching articles without fetching their text

Kent Hudson

Written by Kent Hudson

June 26, 2026

Updated October 16, 2026

Open this example in the API Playground ↗

How to count matching articles without downloading them

Call /v1/news/count with your search filters to get a matching article count without downloading articles. For an actual count for your query, use a live key and include filters such as a date range, language, or source.

This example counts English articles from the last seven days:

curl "https://api.apitube.io/v1/news/count?language.code=en&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"

Send your key in api_key or the X-API-Key header.

What does the count endpoint return?

A small JSON response with status, count, and request_id:

{
  "status": "ok",
  "count": 12345,
  "request_id": "3a7e5d21-9c4b-4f8a-b2e1-6f0d9a3c5e88"
}

count is the total for the filters you sent, and status is ok on success. The response has no article bodies. An unfiltered count is an overview figure rather than an exact catalogue-size check; use filters for a specific count.

How to count articles matching your filters

Use the filters you would send to /v1/news/everything, such as language, headline, dates, category, and source.

You can send them as GET parameters or a POST JSON body. This POST example combines headline, language, and date filters:

curl -X POST "https://api.apitube.io/v1/news/count" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "climate change",
    "language.code": "en",
    "published_at.start": "2026-01-01"
  }'

To reuse a search, keep its filters and change the path to /v1/news/count. See Searching & Filtering News and date-range filtering for options and limits.

How much does a count request cost?

Each call costs one credit, even when the count is zero. The number of matching articles does not change the price.

Use it when you need a total:

  • Show how many articles mention a brand during a period.
  • Estimate a dataset before downloading it.
  • Plan page counts or progress indicators.

Use a search endpoint when you need the articles themselves.

Common Questions

Can I call count with POST?

Yes. Send a JSON body with Content-Type: application/json, or use GET parameters. Both support the same filters.

Why is my count capped at 100?

Test keys return a preview count of at most 100. Use a live key with filters for the actual matching count.

Does the count include article content?

No. It returns only status, count, and request_id.

What errors can count return?

Common errors are 401 ER0201/ER0202 for a missing or invalid key, 402 ER0176 for no credits, and 429 ER0203 for too many requests. Save request_id when asking support about a call.


Related Articles