Get an article by ID with /v1/news/article
Use /v1/news/article to get articles by their APITube IDs. Pass one id or up to 100 IDs separated by commas to fetch articles you saved earlier.
Each request costs 1 point, whether it fetches one article or a hundred.
Endpoint
GET /v1/news/article
POST /v1/news/articleBase URL: https://api.apitube.io.
Where article IDs come from
You can find an article's id in:
- the
idfield of any article returned by/v1/news/everythingor/v1/news/top-headlines; - the
article_idyou stored when you first received an article; - the SSE and WebSocket streams, which deliver the same
idin real time.
Save the id if you want to fetch the article again. This endpoint only accepts article IDs.
Batch lookup
GET /v1/news/article?id=3036291250,3036291251,3036291252Send up to 100 IDs per request. The API ignores extra IDs without an error. Split larger lists into separate requests.
Unknown IDs do not appear in results. The request still succeeds and does not return 404. Compare the returned IDs with your list to find any missing articles.
This endpoint and /v1/news/story ignore prompt. Use article IDs to choose which articles to return.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Comma-separated article IDs (max 100). Required. Example: 12345. |
See Filters for all shared search filters, sorting, pagination, field selection and other request options. This endpoint ignores prompt.
Response format
The response uses the shared Response format. Articles are in results, and href links to each original article. See API Response Structure for all fields.
Request examples
curl "https://api.apitube.io/v1/news/article?id=3036291250&api_key=YOUR_API_KEY"
import requests
ids = ["3036291250", "3036291251", "3036291252"]
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={"id": ",".join(ids)},
headers={"X-API-Key": "YOUR_API_KEY"},
)
found = {article["id"] for article in response.json()["results"]}
print("missing:", set(map(int, ids)) - found)
const ids = ['3036291250', '3036291251'];
const response = await fetch(
`https://api.apitube.io/v1/news/article?id=${ids.join(',')}`,
{ headers: { 'X-API-Key': 'YOUR_API_KEY' } }
);
const data = await response.json();
console.log(data.results.map(a => a.title));
$query = http_build_query(['id' => '3036291250', 'api_key' => 'YOUR_API_KEY']);
$data = json_decode(file_get_contents("https://api.apitube.io/v1/news/article?$query"), true);
print_r($data['results'][0]['title']);
Fetching only the fields you need
Use fl to return only the fields you need, especially when fetching many articles:
curl "https://api.apitube.io/v1/news/article?id=3036291250,3036291251&fl=id,title,published_at,href&api_key=YOUR_API_KEY"Exporting a single article
curl "https://api.apitube.io/v1/news/article?id=3036291250&export=json&api_key=YOUR_API_KEY" -o article.json
curl "https://api.apitube.io/v1/news/article?id=3036291250&export=xml&api_key=YOUR_API_KEY" -o article.xmlErrors
| Code | Status | Meaning |
|---|---|---|
ER0232 | 400 | id is missing |
ER0179 | 400 | id passed more than once — send one comma-separated value instead |
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
- Get a story — the cluster of articles related to one article ID.
- Search articles — find the IDs in the first place.
- API Response Structure — every field of the article object.