Skip to content

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/article

Base URL: https://api.apitube.io.

Where article IDs come from ​

You can find an article's id in:

  • the id field of any article returned by /v1/news/everything or /v1/news/top-headlines;
  • the article_id you stored when you first received an article;
  • the SSE and WebSocket streams, which deliver the same id in 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,3036291252

Send 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.

TIP

This endpoint and /v1/news/story ignore prompt. Use article IDs to choose which articles to return.

Parameters ​

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

bash
curl "https://api.apitube.io/v1/news/article?id=3036291250&api_key=YOUR_API_KEY"
python
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)
javascript
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));
php
$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:

bash
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 ​

bash
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.xml

Errors ​

CodeStatusMeaning
ER0232400id is missing
ER0179400id passed more than once — send one comma-separated value instead
ER0175401API key is missing or invalid
ER0176402No points left on the account
ER0203429Rate limit exceeded

See HTTP response codes for the full error list.