News API

⭐ Beginner's Pick News / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

News API gives you access to breaking news headlines and articles from thousands of global news sources and blogs. It is perfect for building news aggregators, monitoring specific topics, or staying updated with live headlines. With a simple API key and a few lines of code, you can filter news by keyword, source, country, or language.

💡

Beginner Tip

Start with the /v2/top-headlines endpoint to fetch current headlines — it requires just your API key and an optional country or category parameter. Free-tier requests are limited to 100 per day, so cache results when possible.

Available Data

article title and content
publication source
published date
article URL
image URL

Example Response

JSON Response
{
  "totalArticles": 100,
  "articles": [
    {
      "title": "Tech Industry Sees Record Growth",
      "source": {
        "name": "TechNews",
        "url": "https://technews.com"
      },
      "publishedAt": "2025-01-15T08:00:00Z",
      "description": "The technology sector reported unprecedented growth...",
      "image": "https://example.com/article-image.jpg",
      "url": "https://technews.com/article/123"
    }
  ]
}

Field Reference

status Whether the request succeeded ("ok") or failed ("error")
totalResults Total number of articles matching your query
articles[].title Headline text of the article
articles[].url Direct URL to the full article
articles[].publishedAt ISO 8601 timestamp when the article was published
articles[].source.name Name of the news outlet that published the article

Implementation Example

const url = "https://newsapi.org/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Missing or invalid API key in the request
Pass your key as apiKey=YOUR_API_KEY in the query string or as the X-Api-Key header
426 Upgrade Required Your free plan only allows queries for news up to 1 month old or paginating beyond 100 results
Upgrade your plan or limit queries to recent articles within the free-tier constraints
429 Too Many Requests You have exceeded the free-tier rate limit of 100 requests per day
Cache responses locally and wait until the daily limit resets, or upgrade your plan

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category News
Difficulty Intermediate
Verified: 2026-04-04

Alternatives to News

Technical alternatives for different use cases.

Free with no production restrictions

Better For

Budget-friendly news aggregation

Trade-off

Article quality and source reputation data

Google News-backed with free tier for production use

Better For

Production apps on free tier (News API restricts this)

Trade-off

Number of sources and search flexibility

Global coverage with pagination and source filtering

Better For

Paginated news feeds with language filtering

Trade-off

Advanced search operators and query syntax

Premium journalism API with article search and metadata

Better For

High-quality journalism and archive access

Trade-off

Multi-source news aggregation

Similar APIs

View All →