Skip to content

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
MatchingMatches the same subject across different versions of its nameMatches the name listed in an article
Needs a lookup firstYes, via SuggestNo
Best forMonitoring one known subject over timeAd-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/entities to search by name. Each match includes id, type and a links.self URL.
  • The entities array of any article in a response.
  • The reference directories: People and Companies.

Parameters ​

Path parameters ​

ParameterTypeRequiredDescription
entity_idstringYesEntity 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 ​

bash
curl "https://api.apitube.io/v1/news/entity/123?language.code=en&per_page=10&api_key=YOUR_API_KEY"
python
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"])
javascript
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:

bash
curl "https://api.apitube.io/v1/news/entity/123?entity.sentiment.polarity=negative&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"

Errors ​

CodeStatusMeaning
ER0151404No entity with that ID
ER0175401API key is missing or invalid
ER0176402No points left on the account
ER0203429Rate limit exceeded

See HTTP response codes for the full error list.