Make Your First API Call
Make your first News API request, read the response and add filters for language, topic and date.
What is APITube News API?
Use APITube to get articles from more than 300,000 verified news sources worldwide. You can:
- Search articles by title, keyword, language, category, topic, or industry
- Filter by date range, country, source, author, entity (people, organizations, brands)
- Analyze sentiment at the article, title, and body level
- Export results as JSON, CSV, XLSX, XML, RSS, Parquet, or JSONL
- Stream articles in real time via Server-Sent Events (SSE)
The API is free to use for development — you just need an API key.
Prerequisites
Before you start, you need three things:
- An APITube account — sign up for free if you haven't already.
- Your API key — after registration, copy the API key from your dashboard.
- A terminal — curl is pre-installed on macOS and Linux. On Windows, use PowerShell or install curl.
Your API key is a long alphanumeric string. Keep it secret — do not share it publicly or commit it to version control.
Step 1: Make Your First Request
Open your terminal and run this command:
curl -H "X-API-Key: YOUR_API_KEY" "https://api.apitube.io/v1/news/everything?per_page=3"Each part of the command has a purpose:
| Part | Meaning |
|---|---|
curl | Command-line tool for making HTTP requests |
-H "X-API-Key: YOUR_API_KEY" | Sends your API key in the request header for authentication |
https://api.apitube.io | APITube base URL |
/v1/news/everything | Endpoint that returns articles from all sources |
?per_page=3 | Limits the response to 3 articles |
Replace YOUR_API_KEY with the actual key from your dashboard.
Step 2: Understand the Response
You will receive a JSON response like this:
{
"status": "ok",
"limit": 3,
"path": "https://api.apitube.io/v1/news/everything?per_page=3",
"page": 1,
"has_next_pages": true,
"next_page": "https://api.apitube.io/v1/news/everything?per_page=3&page=2",
"has_previous_page": false,
"previous_page": "",
"export": {
"json": "https://api.apitube.io/v1/news/everything?per_page=3&export=json",
"xlsx": "https://api.apitube.io/v1/news/everything?per_page=3&export=xlsx",
"csv": "https://api.apitube.io/v1/news/everything?per_page=3&export=csv",
"tsv": "https://api.apitube.io/v1/news/everything?per_page=3&export=tsv",
"xml": "https://api.apitube.io/v1/news/everything?per_page=3&export=xml",
"rss": "https://api.apitube.io/v1/news/everything?per_page=3&export=rss",
"parquet": "https://api.apitube.io/v1/news/everything?per_page=3&export=parquet",
"jsonl": "https://api.apitube.io/v1/news/everything?per_page=3&export=jsonl"
},
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"results": [
{
"id": 987654321,
"href": "https://example.com/article/tech-conference",
"published_at": "2026-03-25T10:30:00Z",
"title": "Global Tech Conference Announces New AI Initiatives",
"description": "Leading technology companies gathered to discuss the future of artificial intelligence and its impact on various industries.",
"body": "The annual Global Tech Conference kicked off today with a series of announcements focused on artificial intelligence...",
"body_html": "<p>The annual Global Tech Conference kicked off today with a series of announcements focused on artificial intelligence...</p>",
"language": "en",
"author": {
"id": 456,
"name": "Jane Smith"
},
"image": "https://example.com/images/tech-conference.jpg",
"categories": [
{
"id": 602,
"name": "science and technology",
"score": 0.95,
"taxonomy": "iptc_mediatopics",
"links": {
"self": "https://api.apitube.io/v1/news/category/iptc_mediatopics/medtop:13000000"
}
}
],
"topics": [
{
"id": "industry.technology_news",
"name": "Technology Industry News",
"score": 0.92,
"links": {
"self": "https://api.apitube.io/v1/news/topic/industry.technology_news"
}
}
],
"industries": [
{
"id": 312,
"name": "Education Consulting for Education",
"links": {
"self": "https://api.apitube.io/v1/news/industry/312"
}
}
],
"entities": [
{
"id": 95,
"name": "Google",
"type": "organization",
"links": {
"self": "https://api.apitube.io/v1/news/entity/95",
"wikipedia": "https://en.wikipedia.org/wiki/Google",
"wikidata": "https://www.wikidata.org/wiki/Q95"
},
"frequency": 5,
"sentiment": {
"score": 0.31,
"polarity": "positive",
"mentions": {
"positive": 3,
"neutral": 2,
"negative": 0
}
},
"title": {
"pos": []
},
"body": {
"pos": [
{ "start": 12, "end": 18 },
{ "start": 45, "end": 51 }
]
}
}
],
"source": {
"id": 508004,
"domain": "example.com",
"home_page_url": "https://example.com",
"type": "news",
"bias": "center",
"rankings": {
"opr": 8
},
"location": {
"country_name": "United States",
"country_code": "us"
},
"favicon": "https://example.com/favicon.ico"
},
"sentiment": {
"overall": {
"score": 0.85,
"polarity": "positive"
},
"title": {
"score": 0.78,
"polarity": "positive"
},
"body": {
"score": 0.87,
"polarity": "positive"
}
},
"summary": [
{
"sentence": "The annual Global Tech Conference kicked off today with major AI announcements.",
"sentiment": {
"score": 0.82,
"polarity": "positive"
}
},
{
"sentence": "Industry leaders committed to responsible AI development standards.",
"sentiment": {
"score": 0.90,
"polarity": "positive"
}
}
],
"keywords": ["technology", "artificial intelligence", "conference", "AI", "innovation"],
"links": [
{
"url": "https://example.com/ai-standards",
"type": "link"
}
],
"media": [
{
"url": "https://example.com/images/tech-conference.jpg",
"type": "image"
}
],
"story": {
"id": "story-789",
"uri": "https://api.apitube.io/v1/news/story/3036291250"
},
"shares": {
"total": 1250,
"facebook": 450,
"twitter": 600,
"reddit": 200
},
"is_duplicate": false,
"is_free": true,
"is_breaking": false,
"read_time": 4,
"sentences_count": 18,
"paragraphs_count": 6,
"words_count": 542,
"characters_count": 3210
}
]
}Here are the key fields to pay attention to:
| Field | Description |
|---|---|
status | "ok" if the request was successful, "error" otherwise |
results | Array of article objects — the main data |
results[].title | Article headline |
results[].description | Short article summary |
results[].href | URL of the original article |
results[].published_at | Publication date in ISO 8601 format |
results[].language.code | Two-letter language code (e.g. en, de, fr) |
results[].categories | Article categories with relevance scores |
results[].entities | People, organizations, brands mentioned in the article |
results[].sentiment | Sentiment analysis — overall, title, and body separately |
results[].source | Publisher details: domain, country and ranking |
results[].summary | Key sentences extracted from the article |
export | URLs to download the same results as JSON, CSV, XLSX, XML, RSS, Parquet, or JSONL |
has_next_pages | true if there are more results — use page parameter to paginate |
request_id | Unique ID for debugging — include it if you contact support |
For a complete description of every field, see the API Response Structure page.
Step 3: Add Filters
Add filters to narrow your results. The examples below start with one filter and then combine several:
Filter by language
Get only English-language articles:
curl -H "X-API-Key: YOUR_API_KEY" "https://api.apitube.io/v1/news/everything?language.code=en&per_page=5"Search by title
Find articles with "climate" in the title:
curl -H "X-API-Key: YOUR_API_KEY" "https://api.apitube.io/v1/news/everything?title=climate&language.code=en&per_page=5"Filter by date range
Narrow results to a specific time period:
curl -H "X-API-Key: YOUR_API_KEY" "https://api.apitube.io/v1/news/everything?title=climate&language.code=en&published_at.start=2026-03-01&published_at.end=2026-03-25&per_page=5"Filter by category
Get articles from the "technology" category:
curl -H "X-API-Key: YOUR_API_KEY" "https://api.apitube.io/v1/news/everything?category.id=medtop:13000000&language.code=en&per_page=5"You can combine any of these filters together. See the full Parameters reference for all available options.
Step 4: Try It in Python
Here is the same request using Python and the requests library:
import requests
url = "https://api.apitube.io/v1/news/everything"
headers = {
"X-API-Key": "YOUR_API_KEY"
}
params = {
"title": "climate",
"language.code": "en",
"per_page": 5
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Status: {data['status']}")
print(f"Found {len(data['results'])} articles\n")
for article in data["results"]:
print(f"- {article['title']}")
print(f" {article['href']}\n")Install the requests library with pip install requests if you don't have it yet.
Step 5: Try It in JavaScript
Using the built-in fetch API (Node.js 18+ or any modern browser):
const API_KEY = 'YOUR_API_KEY';
const params = new URLSearchParams({
title: 'climate',
'language.code': 'en',
per_page: '5'
});
const response = await fetch(
`https://api.apitube.io/v1/news/everything?${params}`,
{ headers: { 'X-API-Key': API_KEY } }
);
const data = await response.json();
console.log(`Status: ${data.status}`);
console.log(`Found ${data.results.length} articles\n`);
data.results.forEach(article => {
console.log(`- ${article.title}`);
console.log(` ${article.href}\n`);
});Common Errors
If something goes wrong, check the HTTP status code:
| HTTP Code | Meaning | What to Do |
|---|---|---|
401 | Invalid or missing API key | Check that the X-API-Key header is present and the key is correct |
402 | No points on account | Top up your account balance |
429 | Rate limit exceeded | Wait and retry — see limits below |
400 | Malformed request | Check your parameter names and values |
The free plan allows 100 requests per day (10 requests per minute, 10 articles per request) and returns the first 5 pages of results. If you need higher limits, consider upgrading your plan.
Next Steps
Now that you have made your first API call, explore further:
- Authentication — all authentication methods in detail
- Endpoints — all available API endpoints
- Parameters — full list of filters and options
- Integration examples — code snippets in 30+ programming languages
- Common Workflows — real-world usage patterns and examples
- Interactive Query Builder — build API queries visually
- Rate Limits — understand plan limits and quotas
- Postman Collection — explore the API interactively in Postman
If you have any questions or need assistance, reach out to the support team.