Get articles by entity with /v1/news/entity/{entity_id}
Get articles about a specific person, organization, brand, place or product with /v1/news/entity/{entity_id}. The ID identifies the subject across name variants. For example, Apple the company has a different ID from the fruit. 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/entity/{entity_id}
POST /v1/news/entity/{entity_id}Base URL: https://api.apitube.io. Entity IDs are integers: /v1/news/entity/123.
Entity ID vs. name filters
/v1/news/entity/{id} | person.name=Elon Musk | |
|---|---|---|
| Matching | Matches the same subject across different versions of its name | Matches the name listed in an article |
| Needs a lookup first | Yes, via Suggest | No |
| Best for | Monitoring one known subject over time | Ad-hoc queries, quick exploration |
To monitor a fixed list of companies or people, find their IDs once and reuse them. For a quick search, use the *.name filters.
Where entity IDs come from
/v1/suggest/entitiesto search by name. Each match includesid,typeand alinks.selfURL.- The
entitiesarray of any article in a response. - The reference directories: People and Companies.
Parameters
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_id | string | Yes | Entity 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/entity/123?language.code=en&per_page=10&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/entity/123",
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/entity/123?language.code=en&per_page=10',
{ headers: { 'X-API-Key': 'YOUR_API_KEY' } }
);
console.log((await response.json()).results.map(a => a.title));
How is this entity being written about?
Use entity.sentiment.* to filter by how the article describes this subject. An article can be positive overall but negative about a particular company or person:
curl "https://api.apitube.io/v1/news/entity/123?entity.sentiment.polarity=negative&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"Errors
| Code | Status | Meaning |
|---|---|---|
ER0151 | 404 | No entity 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
- Entity suggestions — resolve a name to an entity ID.
- People and Companies — profile pages with coverage stats.
- Search articles — combine several entities with
entity.id.