APITube Help Center

How to Filter News by Industry

Narrow News API results to a business sector with the industry.id parameter

Tasha Tatum

Written by Tasha Tatum

June 26, 2026

Open this example in the API Playground ↗

How to filter news by industry

To return only articles from a specific business sector, add the industry.id parameter to your /v1/news/everything request with a numeric industry identifier, for example industry.id=400. The APITube News API checks the ID against the industries it tracks and returns only articles tagged with that industry. You can pass up to three industry IDs separated by commas, and an article is returned if it is tagged with any of them (OR logic).

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

You can send the key as a header (X-API-Key: YOUR_API_KEY) instead of the api_key query parameter. If you omit industry.id, no industry filter is applied and articles from every sector are returned.

What is the industry.id parameter?

industry.id takes a numeric industry identifier such as 400. The value must be an integer — a non-numeric value returns HTTP 400 with error ER0121 (Invalid industry.id value). Each ID can be 1 to 20 characters long; an empty or over-length value returns HTTP 400 with error ER0123. Every ID is looked up against the industries APITube tracks, and if one is not found the request fails with HTTP 400 and error ER0210 and a message like industry with ID '999999' not found. The request stops on the first unknown ID, so one bad value blocks the whole call.

How is an industry different from a topic or category?

An industry is a numeric sector tag filtered with industry.id (for example 400). It is a different layer from a topic. A value like industry.crypto_news is not an industry ID — it is a topic, passed as topic.id=industry.crypto_news, and it uses a named slug rather than a number. A category is yet another layer: a broad IPTC media-topic code such as medtop:04000000. The three can be combined in one request to scope by sector, subject and section at once.

How to filter by one or more industries

Pass a single ID to read one sector, or a comma-separated list to combine several. This request pulls articles tagged with either of two industries in one call:

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

The maximum is three industries per request. If you list more than three, only the first three are used and the rest are silently dropped. Industry filtering is part of the shared filter chain, so it combines with other filters and with sorting:

curl "https://api.apitube.io/v1/news/everything?industry.id=400,438&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"

How to exclude an industry

To return everything except a sector, use ignore.industry.id. It follows the same rules — comma-separated, numeric, up to three values. This keeps general coverage while dropping articles from two industries:

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

A non-numeric value in ignore.industry.id returns ER0124, an empty or over-length value returns ER0126, and an unknown ID returns ER0211 — all HTTP 400. You can pass industry.id and ignore.industry.id in the same request to include one sector while excluding another.

How to find a valid industry ID

Use the /v1/suggest/industries endpoint to look up an industry before you filter. Pass a prefix and it returns matching industries, each with its numeric id, its name and a ready-made links.self URL:

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

The prefix parameter is required; omitting it returns HTTP 400 with error ER0346. Take the id from a result and drop it straight into industry.id. The full set of supported industries is also listed in the APITube industries reference.

What does the industries object in the response contain?

Every article in the response carries an industries array so you can see which sectors it was tagged with and reuse them:

{
    "industries": [
        {
            "id": 400,
            "name": "Financial Services",
            "links": { "self": "https://api.apitube.io/v1/news/industry/400" }
        }
    ]
}

The id here is exactly the integer you pass back into industry.id for follow-up requests, and name is the human-readable label. The links.self URL points at the /v1/news/industry/{id} endpoint, which returns articles for that industry directly. To pin a sector to one subject at the same time, combine it with How to filter news by topic.

Common Questions

How many industries can I filter by at once?

Up to three per parameter. industry.id and ignore.industry.id each accept a comma-separated list, and only the first three values are applied — extra values beyond the third are silently ignored. Multiple IDs in one parameter use OR logic, so an article matches if it is tagged with any of them.

Is industry.id a number or a name?

A number. industry.id accepts only numeric IDs such as 400; a non-numeric value returns HTTP 400 with error ER0121. Do not confuse it with topic.id=industry.crypto_news, which is a named topic slug, not an industry. Look up the numeric ID with /v1/suggest/industries before filtering.

What error do I get for an unknown industry?

An industry ID that APITube does not track returns HTTP 400 with error ER0210 (industry with ID '…' not found) for industry.id, or ER0211 for ignore.industry.id. A non-numeric value returns ER0121 (ER0124 for the ignore variant), and an empty or over-length value returns ER0123 (ER0126). Because the request stops on the first bad ID, confirm the industry with /v1/suggest/industries before filtering.


Related Articles