NewsAPI · Example Payload
Newsapi Top Headlines Example
NewsHeadlinesArticlesSearchMediaContentRESTJSON
Newsapi Top Headlines Example is an example object payload from NewsAPI, with 2 top-level fields. It illustrates the shape of data this provider's APIs accept or return.
Top-level fields
requestresponse
Example Payload
{
"request": {
"method": "GET",
"url": "https://newsapi.org/v2/top-headlines",
"parameters": {
"country": "us",
"category": "technology",
"apiKey": "YOUR_API_KEY"
},
"headers": {
"X-Api-Key": "YOUR_API_KEY"
}
},
"response": {
"status": "ok",
"totalResults": 38,
"articles": [
{
"source": {
"id": "bbc-news",
"name": "BBC News"
},
"author": "BBC News",
"title": "Tech giants face new EU digital market rules",
"description": "Major technology companies must comply with new EU regulations designed to ensure fairer digital markets.",
"url": "https://www.bbc.com/news/technology-67890123",
"urlToImage": "https://ichef.bbci.co.uk/news/1024/branded_news/12345.jpg",
"publishedAt": "2024-01-26T14:00:00Z",
"content": "Major technology companies operating in the European Union must now comply with sweeping new digital market regulations... [+2500 chars]"
},
{
"source": {
"id": "wired",
"name": "Wired"
},
"author": "Sarah Connor",
"title": "AI Breakthroughs Reshaping the Tech Landscape",
"description": "A look at how recent AI advances are changing industries from healthcare to finance.",
"url": "https://www.wired.com/story/ai-breakthroughs-2024",
"urlToImage": "https://media.wired.com/photos/ai-breakthrough.jpg",
"publishedAt": "2024-01-26T12:30:00Z",
"content": "Artificial intelligence advances in 2024 are reshaping industries at a pace many researchers did not anticipate... [+3200 chars]"
}
]
}
}
Work with this as data
Every example here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for examples
4 MCP tools reach this
find_examplesBrowse and filter every example in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This example
curl "https://apis.io/api/v1/examples/newsapi-top-headlines-example"
All examples
curl "https://apis.io/api/v1/examples?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.