APITube Help Center

How to Filter News by Topic

Select subject tags and look up the right topic IDs

Tasha Tatum

Written by Tasha Tatum

June 26, 2026

Updated October 16, 2026

Open this example in the API Playground ↗

How to filter news by topic

Add topic.id with a recognized subject tag, such as industry.crypto_news. Up to three comma-separated topic IDs match with OR. Different filter parameters still combine with AND.

curl "https://api.apitube.io/v1/news/everything?topic.id=industry.crypto_news&api_key=YOUR_API_KEY"

Send your key through api_key or X-API-Key. Without a topic condition, the search can include any topic.

What is the topic.id parameter?

It selects a named subject tag rather than searching headline text. Each value is limited to 80 characters. Invalid length returns 400 ER0117; an unknown ID returns ER0208 and stops the request.

A category uses an IPTC code such as medtop:04000000. A topic uses a tag such as industry.crypto_news. Both can be used together.

How to filter by one or more topics

List the IDs you want:

curl "https://api.apitube.io/v1/news/everything?topic.id=industry.crypto_news,industry.financial_news&api_key=YOUR_API_KEY"

Only the first three are used. Add other conditions for language or dates:

curl "https://api.apitube.io/v1/news/everything?topic.id=industry.crypto_news&language.code=en&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"

How to exclude a topic

Use ignore.topic.id:

curl "https://api.apitube.io/v1/news/everything?ignore.topic.id=industry.crypto_news&api_key=YOUR_API_KEY"

The same three-value limit applies. Unknown exclusions return ER0209; invalid length returns ER0120. You can combine topic inclusion and exclusion.

How to find a valid topic.id

Look up a topic by prefix:

curl "https://api.apitube.io/v1/suggest/topics?prefix=crypto&api_key=YOUR_API_KEY"

Copy its id directly into the filter. The response also includes a name and links.self. A missing prefix returns 400 ER0346. See the topics reference.

What does the topics object in the response contain?

Articles include a topics array:

{
    "topics": [
        {
            "id": "industry.crypto_news",
            "name": "Crypto News",
            "score": 0.82,
            "links": { "self": "https://api.apitube.io/v1/news/topic/industry.crypto_news" }
        }
    ]
}

id is reusable in topic.id, name is the label, and score describes the topic match. links.self opens /v1/news/topic/{id}. Add a source filter to select a publisher as well.

Common Questions

How many topics can I filter by at once?

Three per inclusion or exclusion parameter. Extras are dropped.

What is the difference between a topic and a category?

They are separate subject classifications with different ID formats. A category often provides a broad section, while a topic selects a subject tag. Both conditions must match when combined.

What error do I get for an unknown topic?

400 ER0208 for inclusion or ER0209 for exclusion. Check the ID with suggestions before retrying.


Related Articles