Get articles by topic with /v1/news/topic/{topic_id}
Get articles on a specific subject with /v1/news/topic/{topic_id}. Topics include industries such as industry.automotive_news and markets such as market_news.commodities.base_metals. Add shared filters to narrow the results.
Each request costs 1 point. Using the prompt parameter adds 2 points; prompt requires Basic or above.
Endpoint
GET /v1/news/topic/{topic_id}
POST /v1/news/topic/{topic_id}Base URL: https://api.apitube.io. Topic IDs are text identifiers with dot-separated parts, such as /v1/news/topic/industry.automotive_news.
Topic vs. category
Categories group news under IPTC Media Topics. Topics focus on business subjects, such as an industry or commodity. The list contains 70 topics, including industry.* (26 industry topics) and market_news.* (43 commodity and market topics).
Where topic IDs come from
- List of Topics — all 70 valid topic slugs.
/v1/suggest/topicsto search by name. Each match includes alinks.selfURL.- The
topicsarray of any article in a response.
Parameters
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
topic_id | string | Yes | Topic ID. |
See Filters for all shared search filters, sorting, pagination, field selection and other request options.
Response format
The response uses the shared Response format. See API Response Structure for all article fields.
Request examples
curl "https://api.apitube.io/v1/news/topic/industry.automotive_news?language.code=en&per_page=10&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/topic/industry.automotive_news",
params={"language.code": "en", "per_page": 10},
headers={"X-API-Key": "YOUR_API_KEY"},
)
for article in response.json()["results"]:
print(article["published_at"], article["title"])
const response = await fetch(
'https://api.apitube.io/v1/news/topic/industry.automotive_news?language.code=en&per_page=10',
{ headers: { 'X-API-Key': 'YOUR_API_KEY' } }
);
console.log((await response.json()).results.map(a => a.title));
Which countries are covering this topic?
curl "https://api.apitube.io/v1/news/topic/market_news.commodities.base_metals?facet=1&facet.field=source.country.id&api_key=YOUR_API_KEY"Errors
| Code | Status | Meaning |
|---|---|---|
ER0149 | 404 | No topic with that ID |
ER0175 | 401 | API key is missing or invalid |
ER0176 | 402 | No points left on the account |
ER0203 | 429 | Rate limit exceeded |
See HTTP response codes for the full error list.
Related
- Articles by category and by industry for other ways to group news.
- List of Topics — every valid topic slug.
- Search articles — combine several topics with
topic.id.