Documentation
Sign up for free!
Get instant access to the API with your free API token. No billing details required!
Getting Started
Introduction
Our API was developed to provide global news from thousands of sources with exceptional response times. On average we add over 1 million articles weekly, so you will never be short of content. Even better, it is completely free!
To get started simply sign up and use your API token in any of the available API endpoints documented below for instant access.
If you have any questions or concerns, feel free to contact us.
Authentication
As mentioned above, when you sign up for free you will find your API token on your dashboard. Simply add this to any of our API endpoints as a GET parameter to gain access. Examples of how this is done can be found below.
API Endpoints
Headlines Available on: Standard plan and above
Endpoint
GET https://api.thenewsapi.com/v1/news/headlines HTTP/1.1
Use this endpoint to find get the latest headlines by category along with similar articles, allowing you to create the perfect news aggregation page similar to Google News .
If you have issues with your requests, please ensure your GET parameters are URL-encoded.
All text data returned is UTF-8.
All dates are in UTC (GMT).
HTTP GET Parameters
| name | required | description |
|---|---|---|
api_token |
true | Your API token which can be found on your account dashboard. |
locale |
false | Comma separated list of country codes to include in the result set. Default is all countries.
Click here for a list of supported countries.
Example: us,ca (US + Canada).
|
domains |
false | Comma separated list of domains to include. List of domains can be obtained through our Sources endpoint, found further down this page. |
exclude_domains |
false | Comma separated list of domains to exclude |
source_ids |
false | Comma separated list of source_ids to include. List of source_ids can be obtained through our Sources endpoint, found further down this page. |
exclude_source_ids |
false | Comma separated list of source_ids to exclude. |
language |
false | Comma separated list of languages to include. Default is all.
Click here for a list of supported languages. Examples: en,es (English + Spanish)
|
published_on |
false | Find headlines for articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-03-07
|
headlines_per_category |
false | Specify the number of articles you want to return per category. The maximum is 10 and the default is 6. |
include_similar |
false | Specify if you wish to include similar articles with each base article. Default is true. |
Response Objects
| name | description |
|---|---|
data > uuid |
The unique identifier for an article in our system. Store this and use it to find specific articles using our single article endpoint. |
data > title |
The article title. |
data > description |
The article meta description. |
data > keywords |
The article meta keywords. |
data > snippet |
The first 60 characters of the article body. |
data > url |
The URL to the article. |
data > image_url |
The URL to the article image. |
data > language |
The language of the source. |
data > published_at |
The datetime the article was published. |
data > source |
The domain of the source. |
data > categories |
Array of strings which the source is categorized as. |
data > locale |
Locale of the source. |
data > similar |
An array of similar articles to the base article. |
If no results are found, the data object will be empty.
Example Request
GET https://api.thenewsapi.com/v1/news/headlines?locale=us&language=en&api_token=YOUR_API_TOKEN
Example Response
{
"data": {
"general": [
{
"uuid": "9b05ddd5-5ffc-46e0-bc51-4abfb3f2d397",
"title": "Iran war threatens Trump's affordability push as rising energy prices complicate Fed rate cuts",
"description": "The war with Iran is quickly becoming an economic problem for the United States — and a policy dilemma for the Federal Reserve",
"keywords": "",
"snippet": "The war with Iran is quickly becoming an economic problem for the United States — and a policy dilemma for the Federal Reserve.\n\nRising oil prices, shipping d...",
"url": "https://www.nbcnews.com/news/us-news/iran-war-threatens-trumps-affordability-push-rising-energy-prices-comp-rcna262206",
"image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2026-03/260301-hormuz-tanker-mb-1132-45e51d.jpg",
"language": "en",
"published_at": "2026-03-07T05:08:14.000000Z",
"source": "nbcnews.com",
"categories": [
"general",
"politics"
],
"locale": "us",
"similar": [
{
"uuid": "3ed95b55-d8ee-417c-97d4-d00686f83e24",
"title": "Iran war deaths could resurface Trump’s complicated history with military sacrifice",
"description": "President Donald Trump will visit Dover Air Force Base in Delaware on Saturday to view the dignified transfer for six soldiers killed during his war with Iran",
"keywords": "Iran war, Politics, War and unrest, Washington news, General news, Article, 130849802",
"snippet": "President Donald Trump will visit Dover Air Force Base in Delaware on Saturday to view the dignified transfer for six soldiers killed during his war with Iran\n\n...",
"url": "https://abcnews.com/US/wireStory/iran-war-deaths-resurface-trumps-complicated-history-military-130849802",
"image_url": "https://i.abcnewsfe.com/a/32408372-4d8c-470a-8bdb-a871b074891e/wirestory_0a150a0cacecb8b5fc6b90cbb2c7baf1_16x9.jpg?w=1600",
"language": "en",
"published_at": "2026-03-07T06:32:17.000000Z",
"source": "abcnews.go.com",
"categories": [
"general",
"politics"
],
"locale": "us"
},
{
"uuid": "27004493-d240-4a56-aad1-bf053fbb87a0",
"title": "Iran war deaths could resurface Trump’s complicated history with military sacrifice",
"description": "President Donald Trump will visit Dover Air Force Base in Delaware on Saturday to view the dignified transfer for six soldiers killed during his war with Iran.",
"keywords": "Iran war, Donald Trump, John McCain, War and unrest, General news, Terry P. Richardson, Eric Slover, Joe Biden, Iran, Government and politics, United States government, Washington news, Qassem Soleimani, Politics",
"snippet": "Add AP News as your preferred source to see more of our stories on Google.\n\nAdd AP News on Google Add AP News as your preferred source to see more of our storie...",
"url": "https://apnews.com/article/donald-trump-veterans-military-service-dover-0a150a0cacecb8b5fc6b90cbb2c7baf1",
"image_url": "https://dims.apnews.com/dims4/default/8c478be/2147483647/strip/true/crop/7925x5281+0+2/resize/980x653!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F76%2F24%2Fb8f448606e1d29fe8c59a6366fb0%2F7d45beba7ac2448f81bcdc8d6c370a26",
"language": "en",
"published_at": "2026-03-07T07:23:02.000000Z",
"source": "apnews.com",
"categories": [
"general"
],
"locale": "us"
},
{
"uuid": "42720de9-5bd9-4f07-a871-cf07023198d3",
"title": "State actors are behind much of the visual misinformation about the Iran war",
"description": "A deluge of misrepresented or fabricated videos has spread widely online since the Iran war began last weekend, fueled in part by state-linked propaganda influence campaigns — particularly around who is winning the war and how bad casualties have been.",
"keywords": "Iran war, General news, War and unrest, Misinformation, Artificial intelligence, Iran government, AP Top News, World news, Censorship, Technology, Melanie Smith, Washington news, Todd Helmus, Iran, Nikita Bier X",
"snippet": "Add AP News as your preferred source to see more of our stories on Google.\n\nAdd AP News on Google Add AP News as your preferred source to see more of our storie...",
"url": "https://apnews.com/article/iran-war-images-misinformation-russia-israel-9e495017dc5c4bf24a0b6152863dbfb1",
"image_url": "https://dims.apnews.com/dims4/default/0928873/2147483647/strip/true/crop/6000x3998+0+1/resize/980x653!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F18%2F4d%2F20370f3f99d45141f304438a424a%2F8611c142394447b698c17d2490a66451",
"language": "en",
"published_at": "2026-03-07T07:23:02.000000Z",
"source": "apnews.com",
"categories": [
"general"
],
"locale": "us"
},
{
"uuid": "a3ba32f4-ba85-4078-bad0-3631616a0d0b",
"title": "Trump warns Iran will be ‘hit very hard’ on Saturday, says regime ‘apologized’ to Middle East neighbors",
"description": "President Trump warned that Iran would be 'hit very hard' on Saturday as the US forces'",
"keywords": "Politics, US News, donald trump, iran, middle east, Operation Epic Fury",
"snippet": "President Trump warned that Iran would be ‘hit very hard’ on Saturday as the US forces’ “Operation Epic Fury” enters its second week.\n\n“Today Iran w...",
"url": "https://nypost.com/2026/03/07/us-news/trump-warns-iran-will-be-hit-very-hard-on-saturday-says-regime-apologized-to-middle-east-neighbors/",
"image_url": "https://nypost.com/wp-content/uploads/sites/2/2026/03/newspress-collage-6fvbekkmu-1772883061074.jpg?quality=75&strip=all&1772865081&w=1200",
"language": "en",
"published_at": "2026-03-07T11:37:43.000000Z",
"source": "nypost.com",
"categories": [
"general"
],
"locale": "us"
}
]
},
{
"uuid": "b983762e-e975-450a-b103-9bf30e7a1362",
"title": "Trump and Hegseth are writing their own rules of war",
"description": "As the Iran war widens, the president and defense secretary’s long support of carnage suddenly matters a lot",
"keywords": "",
"snippet": "One of the reasons so many Americans never believed Donald Trump’s promise to end the “forever wars” was a simple observation. To all but his most fanatic...",
"url": "https://www.salon.com/2026/03/07/trump-and-hegseth-are-writing-their-own-rules-of-war/",
"image_url": "https://www.salon.com/app/uploads/2026/01/trump-hegseth-GettyImages-2249581811.jpg",
"language": "en",
"published_at": "2026-03-07T11:45:16.000000Z",
"source": "salon.com",
"categories": [
"general"
],
"locale": "us",
"similar": [
{
"uuid": "89636471-5af7-4614-9e9f-9ee6f777da1f",
"title": "Camouflage and crudites: Trump wages war and hosts parties at Mar-a-Lago",
"description": "Donald Trump watched “Operation Epic Fury,” the beginning of war with Iran, unfold from a makeshift “situation room\" at Mar-a-Lago.",
"keywords": "",
"snippet": "WEST PALM BEACH, Fla. — Last weekend, President Donald Trump greeted guests at a children’s charity gala inside his private Mar-a-Lago club. “Have a good ...",
"url": "https://www.nbcnews.com/politics/donald-trump/trump-wages-iran-war-situation-room-mar-lago-rcna261389",
"image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2026-03/260228-donald-trump-iran-ww-2129-9afd59.jpg",
"language": "en",
"published_at": "2026-03-07T10:00:00.000000Z",
"source": "nbcnews.com",
"categories": [
"politics",
"general"
],
"locale": "us"
},
{
"uuid": "e55e9c2e-9b6f-44da-a6ce-ce4f44eb22fa",
"title": "Trump fires a Cabinet official, and a fluke injury ends an NBA streak: The news quiz",
"description": "War spreads in the Middle East, a coaching legend dies, and several incumbents face tough primaries.",
"keywords": "",
"snippet": "War spreads in the Middle East, a coaching legend dies, and several incumbents face tough primaries. Test your knowledge of the week in news, and take last week...",
"url": "https://www.nbcnews.com/news/news-quiz/trump-kristi-noem-news-quiz-rcna261997",
"image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2026-03/250925-news-quiz-grid-lr-0d1d50.png",
"language": "en",
"published_at": "2026-03-07T10:15:00.000000Z",
"source": "nbcnews.com",
"categories": [
"general",
"politics"
],
"locale": "us"
},
{
"uuid": "63b747ea-3b79-4391-9942-84e6e2c26f56",
"title": "WATCH: Capitol Hill debate erupts over whether Trump’s Iran strikes amount to ‘war’",
"description": "Trump Iran strikes have sparked congressional debate over how far the administration can take its hostilities before launching a 'war' requiring congressional approval.",
"keywords": "",
"snippet": "NEW You can now listen to Fox News articles!\n\nDebate on Capitol Hill continues to rage over whether President Donald Trump started a \"war\" with the strikes he c...",
"url": "https://www.foxnews.com/politics/capitol-hill-debate-erupts-over-whether-trumps-iran-strikes-amount-to-war",
"image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/03/israel-usa-iran-lebanon-missile-drone-strikes-fox-news-03-04-2026-002.jpg",
"language": "en",
"published_at": "2026-03-07T09:00:30.000000Z",
"source": "foxnews.com",
"categories": [
"general",
"politics"
],
"locale": "us"
}
]
}
],
"business": ...,
"sports": ...,
"tech": ...,
"science": ...,
"health": ...
}
}
Top Stories Available on: All plans
Endpoint
GET https://api.thenewsapi.com/v1/news/top HTTP/1.1
Use this endpoint to find live and historical top stories around the world or filter to get only top stories for specific countries. Filtering by language, category, source and publish date is also possible, as well as advanced searching on title and the main text of the article.
If you have issues with your requests, please ensure your GET parameters are URL-encoded.
All text data returned is UTF-8.
All dates are in UTC (GMT).
HTTP GET Parameters
| name | required | description |
|---|---|---|
api_token |
true | Your API token which can be found on your account dashboard. |
search |
false | Use the search as a basic search tool by entering regular search terms or it has more advanced usage to build search queries:+ signifies AND operation| signifies OR operation- negates a single token" wraps a number of tokens to signify a phrase for searching* at the end of a term signifies a prefix query( and ) signify precedence
To use one of these characters literally, escape it with a preceding backslash ( \).
Example 1: forex + (usd | gbp) -cad (searches for forex articles which include usd or gbp but excludes cad)Example 2: "Apple Inc" (searches for articles with exact matches for "Apple Inc")
For more advanced query examples, see our API Examples section. When using special characters (+, -, |, ", *, ()) you MUST URL-encode this parameter. |
search_fields |
false | Comma separated list of fields to apply the search parameter to.
Supported fields: title | description | keywords | main_text
Example: title,description,keywordsDefault: title,main_text
|
locale |
false | Comma separated list of country codes to include in the result set. Default is all countries.
Click here for a list of supported countries.
Example: us,ca (US + Canada).
|
categories |
false | Comma separated list of categories to include.
Supported categories: general | science | sports | business | health | entertainment | tech | politics | food | travel Example: business,tech
|
exclude_categories |
false | Comma separated list of categories to exclude. |
domains |
false | Comma separated list of domains to include. List of domains can be obtained through our Sources endpoint, found further down this page. |
exclude_domains |
false | Comma separated list of domains to exclude |
source_ids |
false | Comma separated list of source_ids to include. List of source_ids can be obtained through our Sources endpoint, found further down this page. |
exclude_source_ids |
false | Comma separated list of source_ids to exclude. |
language |
false | Comma separated list of languages to include. Default is all.
Click here for a list of supported languages. Examples: en,es (English + Spanish)
|
published_before |
false | Find all articles published before the specified date. Supported formats include:
Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2026-03-07T15:36:20 |
2026-03-07T15:36 |
2026-03-07T15 |
2026-03-07 |
2026-03 |
2026
|
published_after |
false | Find all articles published after the specified date. Supported formats include:
Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2026-03-07T15:36:20 |
2026-03-07T15:36 |
2026-03-07T15 |
2026-03-07 |
2026-03 |
2026
|
published_on |
false | Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-03-07
|
sort |
false | Sort by published_on or relevance_score (only available when used in conjunction with search).
Default is published_at unless search is used and sorting by published_at is not included,
in which case relevance_score is used. |
limit |
false | Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan. |
page |
false | Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2
|
Response Objects
| name | description |
|---|---|
meta > found |
The number of articles found for the request. |
meta > returned |
The number of articles returned on the page.
This is useful to determine the end of the result set as if this is lower than limit, there are no more articles after this page. |
meta > limit |
The limit based on the limit parameter. |
meta > page |
The page number based on the page parameter. |
data > uuid |
The unique identifier for an article in our system. Store this and use it to find specific articles using our single article endpoint. |
data > title |
The article title. |
data > description |
The article meta description. |
data > keywords |
The article meta keywords. |
data > snippet |
The first 60 characters of the article body. |
data > url |
The URL to the article. |
data > image_url |
The URL to the article image. |
data > language |
The language of the source. |
data > published_at |
The datetime the article was published. |
data > source |
The domain of the source. |
data > categories |
Array of strings which the source is categorized as. |
data > relevance_score |
Relevance score based on the search parameter. If the search parameter is not used, this will be null. |
data > locale |
Locale of the source. |
If no results are found, the data object will be empty.
Example Request
GET https://api.thenewsapi.com/v1/news/top?api_token=YOUR_API_TOKEN&locale=us&limit=3
Example Response
{
"meta": {
"found": 1567885,
"returned": 10,
"limit": 10,
"page": 1
},
"data": [
{
"uuid": "4905f5da-6348-4053-ab1e-9d0369eb2bea",
"title": "How investigators tracked down Utah triple murder suspect",
"description": "A manhunt for a triple murder suspect in Utah ended Thursday when Ivan Miller, 22, was arrested in Colorado. Here's what to know about the investigation.",
"keywords": "Murder, Utah, Crime",
"snippet": "How investigators tracked down Utah triple murder suspect A manhunt for a triple murder suspect in Utah ended Thursday when Ivan Miller, 22, was arrested in Col...",
"url": "https://www.cbsnews.com/video/how-investigators-tracked-down-utah-triple-murder-suspect/",
"image_url": "https://assets3.cbsnewsstatic.com/hub/i/r/2026/03/07/3780358f-aa78-4564-b9a6-d32afd518ac8/thumbnail/1200x630/b49234e256e26e2e78c58db5321352da/cbsn-fusion-how-investigators-tracked-down-utah-triple-murder-suspect-thumbnail.jpg",
"language": "en",
"published_at": "2026-03-07T15:10:00.000000Z",
"source": "cbsnews.com",
"categories": [
"general"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "6ea5d2fd-2f95-4a14-bdb4-076d41614e48",
"title": "Mamdani's plan to cut gifted programs in NYC schools driving parents to competitive private education: report",
"description": "Mayor Zohran Mamdani's plan to cut gifted programs in New York City schools has reportedly driven wealthy parents to enroll their kids in already highly competi...",
"keywords": "",
"snippet": "NEW You can now listen to Fox News articles!\n\nParents in New York City are reportedly worried about Mayor Zohran Mamdani’s plan to cut gifted programs in publ...",
"url": "https://www.foxnews.com/media/mamdanis-plan-cut-gifted-programs-nyc-schools-driving-parents-competitive-private-education-report",
"image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/02/mamdani-tax-hike-fox-news-001.jpg",
"language": "en",
"published_at": "2026-03-07T15:00:47.000000Z",
"source": "foxnews.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "3a6c2918-6c48-4a24-8c9a-334e2d6c5e13",
"title": "National park death exposes repeated rule violations as tourists take dangerous risks",
"description": "Hawaii Volcanoes National Park tourist death highlights a dangerous trend of visitors breaking safety rules at national parks, including recent Yellowstone and ...",
"keywords": "",
"snippet": "NEW You can now listen to Fox News articles!\n\nA tourist perished late last week after entering a closed, hazardous area of Hawaii Volcanoes National Park — in...",
"url": "https://www.foxnews.com/travel/national-park-death-exposes-repeated-rule-violations-tourists-take-dangerous-risks",
"image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/03/national-park-rule-breakers.jpg",
"language": "en",
"published_at": "2026-03-07T15:00:40.000000Z",
"source": "foxnews.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "5d8f215d-af17-45d1-919c-d9c0d257fbd6",
"title": "RFK Jr. ‘definitely’ running for president in 2028, says his cousin Jack Schlossberg",
"description": "Robert Kennedy Jr. will use his Make America Healthy Again movement to mount a presidential bid, according to his estranged cousin, Jack Schlossberg.",
"keywords": "Politics, US News, health and human services, jack schlossberg, presidential election 2028, robert f. kennedy jr.",
"snippet": "Robert F. Kennedy Jr. is “definitely” running for president in 2028, according to his estranged cousin, Jack Schlossberg.\n\nThe Secretary of Health and Human...",
"url": "https://nypost.com/2026/03/07/us-news/rfk-jr-definitely-running-for-president-in-2028-says-his-cousin-jack-schlossberg/",
"image_url": "https://nypost.com/wp-content/uploads/sites/2/2026/03/newspress-collage-p2dlotsa7-1772848347202.jpg?quality=75&strip=all&1772830400&w=1200",
"language": "en",
"published_at": "2026-03-07T15:00:00.000000Z",
"source": "nypost.com",
"categories": [
"general"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "90e813ed-94ef-4d1b-96f1-32063243bf02",
"title": "Romance books: Why are so many novels in first person and not third person now?",
"description": "There’s been a profound shift in perspective preferences when it comes to romance novels.",
"keywords": "books, romance",
"snippet": "Jennifer Lee, a 24-year-old pastry chef from Connecticut, has read hundreds of books. She’s partial to romance novels with burning enemies-to-lovers arcs, esp...",
"url": "https://slate.com/culture/2026/03/romance-books-novels-fantasy-romantasy-booktok-pov-first-person-third-person.html?via=rss",
"image_url": "https://compote.slate.com/images/84e643bc-cbe1-4951-b468-f5648f410461.jpeg?crop=1560%2C1040%2Cx0%2Cy0&width=1560",
"language": "en",
"published_at": "2026-03-07T15:00:00.000000Z",
"source": "slate.com",
"categories": [
"general"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "814594c9-a3f5-49be-a09a-03630d526d78",
"title": "Trump meets with Latin American leaders turning his attention to the Western Hemisphere",
"description": "The White House called the gathering of Latin American leaders the",
"keywords": "Venezuela, Trump Administration",
"snippet": "President Trump assembled Latin American leaders on Saturday at his Miami-area golf club as his administration looks to demonstrate it is still committed to sha...",
"url": "https://www.cbsnews.com/news/trump-shield-of-the-americas-summit/",
"image_url": "https://assets1.cbsnewsstatic.com/hub/i/r/2026/03/07/1d92bdb5-59c2-4ebf-9d36-06496015ea26/thumbnail/1200x630/8803c0d2b31aa37a6df2fd95458bd582/ap26066087713554.jpg",
"language": "en",
"published_at": "2026-03-07T14:59:53.000000Z",
"source": "cbsnews.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "91c426d5-58e2-46b7-b5c1-d704a66ab2e8",
"title": "Faith leaders seek access to ICE detention centers during Lent and Ramadan",
"description": "The long-held practice of faith leaders ministering to detained migrants has become far more contentious — and consequential — as detention numbers soar acr...",
"keywords": "Catholic Church, Religion, General news, Immigrant detention, Christianity, Prisons, Immigration, U.S. news, Article, 130852769",
"snippet": "Faith leaders ministering to detained migrants has become far more contentious.\n\nIn this photo provided by the Coalition for Spiritual and Public Leadership, Fa...",
"url": "https://abcnews.com/US/wireStory/faith-leaders-push-access-ice-detention-centers-lent-130852769",
"image_url": "https://i.abcnewsfe.com/a/047514e3-46e4-4c4c-bb11-870ba4aa7f0d/wirestory_cdcf0451b955d531f3f48cc446414106_16x9.jpg?w=1600",
"language": "en",
"published_at": "2026-03-07T14:58:16.000000Z",
"source": "abcnews.go.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "24fb7a11-c2e2-47b8-b6ca-a2059d442dbf",
"title": "Why Jack Osbourne Thinks Dad Ozzy 'Was Done' After Last Show",
"description": "Jack Osbourne reflects on Ozzy Osbourne's death and says after the Black Sabbath farewell he felt his dad 'was done'",
"keywords": "",
"snippet": "The Osbourne family was shocked by Ozzy Osbourne’s death at 76.\n\n“It was a surprise, for sure,” Ozzy’s son Jack Osbourne said on the Wednesday, March 4,...",
"url": "https://www.usmagazine.com/celebrity-news/news/why-jack-osbourne-thinks-dad-ozzy-was-done-after-last-show/",
"image_url": "https://www.usmagazine.com/wp-content/uploads/2026/03/Ozzy-and-Jack-Osbourne-GettyImages-113144316.jpg?crop=0px%2C109px%2C1331px%2C700px&resize=1200%2C630&quality=86&strip=all",
"language": "en",
"published_at": "2026-03-07T14:55:40.000000Z",
"source": "usmagazine.com",
"categories": [
"entertainment",
"general"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "258067e9-9fad-4744-913d-350f00f60ce3",
"title": "Trump ramps up pressure on Tehran",
"description": "President Trump ramped up pressure on Iran Friday, demanding",
"keywords": "Tehran, Iran, Donald Trump, White House, Middle East",
"snippet": "Trump ramps up pressure on Tehran President Trump ramped up pressure on Iran Friday, demanding \"unconditional surrender,\" while the White House made it clear th...",
"url": "https://www.cbsnews.com/video/trump-ramps-up-pressure-on-tehran/",
"image_url": "https://assets2.cbsnewsstatic.com/hub/i/r/2026/03/07/7fa17e56-bde8-45b5-aff8-a5ca397b6d67/thumbnail/1200x630/c2408dd89930533ab083e8c9ad19e80c/cbsn-fusion-trump-ramps-up-pressure-on-tehran-thumbnail.jpg",
"language": "en",
"published_at": "2026-03-07T14:53:00.000000Z",
"source": "cbsnews.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "ab3ed568-6c89-4eda-8ac7-61c0895884bc",
"title": "Jennifer Lopez Details “Really Tough” 3rd Divorce",
"description": "Jennifer Lopez—who shares kids Max and Emme with Marc Anthony—opened up about the “really tough time” following the former couple’s split.",
"keywords": "",
"snippet": "Watch : Jennifer Lopez Celebrates \"Wonder Twins\" Max & Emme's 18th Birthday\n\nJennifer Lopez is getting loud about her and Marc Anthony’s breakup.\n\nThe “On T...",
"url": "https://www.eonline.com/news/1429428/jennifer-lopez-on-marc-anthony-divorce?cmpid=rss-syndicate-genericrss-us-top_stories",
"image_url": "https://akns-images.eonline.com/eol_images/Entire_Site/20260307/df8b2263-bd5d-454b-96a4-ef9682ac9436_1772893804.jpg?fit=around%7C1080:1080&output-quality=90&crop=1080:1080;center,top",
"language": "en",
"published_at": "2026-03-07T14:49:05.000000Z",
"source": "eonline.com",
"categories": [
"entertainment",
"general"
],
"relevance_score": null,
"locale": "us"
}
]
}
All News Available on: All plans
Endpoint
GET https://api.thenewsapi.com/v1/news/all HTTP/1.1
Use this endpoint to find all live and historical articles we collect. Filtering by language, category, source and publish date is also possible, as well as advanced searching on title and the main text of the article.
If you have issues with your requests, please ensure your GET parameters are URL-encoded.
All text data returned is UTF-8.
All dates are in UTC (GMT).
HTTP GET Parameters
| name | required | description |
|---|---|---|
api_token |
true | Your API token which can be found on your account dashboard. |
search |
false | Use the search as a basic search tool by entering regular search terms or it has more advanced usage to build search queries:+ signifies AND operation| signifies OR operation- negates a single token" wraps a number of tokens to signify a phrase for searching* at the end of a term signifies a prefix query( and ) signify precedence
To use one of these characters literally, escape it with a preceding backslash ( \).
Example 1: forex + (usd | gbp) -cad (searches for forex articles which include usd or gbp but excludes cad)Example 2: "Apple Inc" (searches for articles with exact matches for "Apple Inc")
For more advanced query examples, see our API Examples section. When using special characters (+, -, |, ", *, ()) you MUST URL-encode this parameter. |
search_fields |
false | Comma separated list of fields to apply the search parameter to.
Supported fields: title | description | keywords | main_text
Example: title,description,keywordsDefault: title,main_text
|
categories |
false | Comma separated list of categories to include.
Supported categories: general | science | sports | business | health | entertainment | tech | politics | food | travel Example: business,tech
|
exclude_categories |
false | Comma separated list of categories to exclude. |
domains |
false | Comma separated list of domains to include. List of domains can be obtained through our Sources endpoint, found further down this page. |
exclude_domains |
false | Comma separated list of domains to exclude |
source_ids |
false | Comma separated list of source_ids to include. List of source_ids can be obtained through our Sources endpoint, found further down this page. |
exclude_source_ids |
false | Comma separated list of source_ids to exclude. |
language |
false | Comma separated list of languages to include. Default is all.
Click here for a list of supported languages. Examples: en,es (English + Spanish)
|
published_before |
false | Find all articles published before the specified date. Supported formats include:
Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2026-03-07T15:36:20 |
2026-03-07T15:36 |
2026-03-07T15 |
2026-03-07 |
2026-03 |
2026
|
published_after |
false | Find all articles published after the specified date. Supported formats include:
Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2026-03-07T15:36:20 |
2026-03-07T15:36 |
2026-03-07T15 |
2026-03-07 |
2026-03 |
2026
|
published_on |
false | Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-03-07
|
sort |
false | Sort by published_on or relevance_score (only available when used in conjunction with search).
Default is published_at unless search is used and sorting by published_at is not included,
in which case relevance_score is used. |
limit |
false | Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan. |
page |
false | Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2
|
Response Objects
| name | description |
|---|---|
meta > found |
The number of articles found for the request. |
meta > returned |
The number of articles returned on the page.
This is useful to determine the end of the result set as if this is lower than limit, there are no more articles after this page. |
meta > limit |
The limit based on the limit parameter. |
meta > page |
The page number based on the page parameter. |
data > uuid |
The unique identifier for an article in our system. Store this and use it to find specific articles using our single article endpoint. |
data > title |
The article title. |
data > description |
The article meta description. |
data > keywords |
The article meta keywords. |
data > snippet |
The first 60 characters of the article body. |
data > url |
The URL to the article. |
data > image_url |
The URL to the article image. |
data > language |
The language of the source. |
data > published_at |
The datetime the article was published. |
data > source |
The domain of the source. |
data > categories |
Array of strings which the source is categorized as. |
data > relevance_score |
Relevance score based on the search parameter. If the search parameter is not used, this will be null. |
If no results are found, the data object will be empty.
Example Request
GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&language=en&limit=3
Example Response
{
"meta": {
"found": 54515689,
"returned": 10,
"limit": 10,
"page": 1
},
"data": [
{
"uuid": "67fb463f-1fc5-47a2-b4fd-d3355285c2b0",
"title": "立民と公明、統一地方選前の中道合流見送り",
"description": "公明党は来年春の統一地方選までに地方議員を中道改革連合に合流させず、独自候補を擁立する方針を固めた。立憲民?...",
"keywords": "西日本新聞me, 西日本新聞, ニュース, 九州, 福岡",
"snippet": "公明党は来年春の統一地方選までに地方議員を中道改革連合に合流させず、独自候補を擁立する方針を固めた。立憲民?...",
"url": "https://www.nishinippon.co.jp/item/1466714/",
"image_url": "https://www.nishinippon.co.jp/uploads/image/1870899/sns_PN2026021701001280.-.-.CI0003.jpg",
"language": "ja",
"published_at": "2026-03-07T15:35:00.000000Z",
"source": "nishinippon.co.jp",
"categories": [],
"relevance_score": null
},
{
"uuid": "fc230609-2f37-4535-850c-9aeac0ce7442",
"title": "雷军邀请海尔周云杰到小米参观指导 周云杰回应:小米值得学习和借鉴",
"description": "雷军邀请海尔周云杰到小米参观指导 周云杰回应:小米值得学习和借鉴",
"keywords": ", 雷军邀请海尔周云杰到小米参观指导 周云杰回应:小米值得学习和借鉴, 快科技",
"snippet": "雷军邀请海尔周云杰到小米参观指导 周云杰回应:小米值得学习和借鉴\n\n快科技3月7日消息,在今年全国两会期间,全国?...",
"url": "https://news.mydrivers.com/1/1107/1107655.htm",
"image_url": "https://img1.mydrivers.com/img/20260307/71dd3817304343cca34e796dfca41b07.png",
"language": "zh",
"published_at": "2026-03-07T15:34:29.000000Z",
"source": "news.mydrivers.com",
"categories": [
"tech",
"general"
],
"relevance_score": null
},
{
"uuid": "e4351d05-df24-425e-ae9a-f7dac8a03e29",
"title": "2026년 5급 공채 및 외교관후보자, 법원행시 제1차 헌법 정답가안 및 해설",
"description": "2026년도 5급 공채 및 외교과후보자, 법원행시 제1차시험 헌법(나책형) 정답가안 및 해설",
"keywords": "",
"snippet": "변호사ㆍ로스쿨\n\n2025년도 국회사무처 변호사자격 보유 대상 일반직공무원(5급) 경력경쟁채용시험 공고\n\n2025년도 국회사?...",
"url": "http://www.lec.co.kr/news/articleView.html?idxno=751639",
"image_url": "http://www.lec.co.kr/news/thumbnail/202603/751639_95825_2151_v150.jpg",
"language": "ko",
"published_at": "2026-03-07T15:34:26.000000Z",
"source": "lec.co.kr",
"categories": [],
"relevance_score": null
},
{
"uuid": "60aab87e-d1af-42f0-a94d-066a464fd992",
"title": "輸出停滞、産油国貯蔵施設満杯に 減産余儀なく、高騰長期化も",
"description": "【ニューヨーク共同】米国とイスラエルによるイラン攻撃の影響で、ペルシャ湾岸の産油国では原油の輸出停滞が広が?...",
"keywords": "西日本新聞me, 西日本新聞, ニュース, 九州, 福岡",
"snippet": "【ニューヨーク共同】米国とイスラエルによるイラン攻撃の影響で、ペルシャ湾岸の産油国では原油の輸出停滞が広が?...",
"url": "https://www.nishinippon.co.jp/item/1466713/",
"image_url": "https://www.nishinippon.co.jp/assets/nnp/img/base/og_image.png",
"language": "ja",
"published_at": "2026-03-07T15:34:09.000000Z",
"source": "nishinippon.co.jp",
"categories": [],
"relevance_score": null
},
{
"uuid": "642daa76-4c0c-4b57-816c-1a559eabb285",
"title": "Understanding latest developments among Kurds and Iran",
"description": "As Iranian proxies target Iraq's Kurdistan, the US is reportedly courting Kurdish Iranian militias for a ground front. Groups remain split between seizing the m...",
"keywords": "Iran, Kurds, iran israel war, Kurdistan, Israel and Kurdistan, Operation Epic Fury, Operation Roaring Lion",
"snippet": "The Kurds are in the spotlight amid the war in Iran. There are around eight million Kurds in Iran. There are also Kurds in Iraq, Turkey, and Syria. The current ...",
"url": "https://www.jpost.com/middle-east/iran-news/article-889140",
"image_url": "https://images.jpost.com/image/upload/f_auto,fl_lossy/q_auto/c_fill,g_faces:center,h_720,w_1280/710212",
"language": "en",
"published_at": "2026-03-07T15:33:35.000000Z",
"source": "jpost.com",
"categories": [
"general"
],
"relevance_score": null
},
{
"uuid": "5b21663b-465d-4a47-a28d-8400a3970879",
"title": "На ремонт трасс «Кола» и Р-23 у Петербурга направят более 1,5 млрд рублей",
"description": "Подрядчики займутся обновлением участков федеральных дорог во Всеволожском и Гатчинс?...",
"keywords": "",
"snippet": "Итоги конкурсов на содержание участков федеральных трасс Р-21 «Кола» и Р-23 Санкт-Петербу...",
"url": "https://www.sobaka.ru/city/city/211714",
"image_url": "https://static.sobaka.ru/images/post/00/21/17/14/_rotator.jpg?v=1772887046",
"language": "ru",
"published_at": "2026-03-07T15:33:24.000000Z",
"source": "sobaka.ru",
"categories": [
"entertainment"
],
"relevance_score": null
},
{
"uuid": "ec3d49b1-db94-4fb1-aee8-96e413c2cd8d",
"title": "引っ越し、2段階で節約 使わない荷物、一時倉庫に",
"description": "引っ越し時に貸倉庫を活用し、すぐ使わない荷物を一時的に保管する人が増えている。車両サイズや作業員数を抑えて?...",
"keywords": "西日本新聞me, 西日本新聞, ニュース, 九州, 福岡",
"snippet": "引っ越し時に貸倉庫を活用し、すぐ使わない荷物を一時的に保管する人が増えている。車両サイズや作業員数を抑えて?...",
"url": "https://www.nishinippon.co.jp/item/1466712/",
"image_url": "https://www.nishinippon.co.jp/assets/nnp/img/base/og_image.png",
"language": "ja",
"published_at": "2026-03-07T15:33:00.000000Z",
"source": "nishinippon.co.jp",
"categories": [],
"relevance_score": null
},
{
"uuid": "d8f67a5f-07a4-4189-bfca-d623bfef4cf3",
"title": "福岡・嘉麻市の路上で女児が男から「お菓子いる」「何歳」と声かけられる 男は40代くらい",
"description": "福岡県警嘉麻署は7日、嘉麻市内の路上で5日午後4時ごろ、歩行中の女児が男から「お菓子いる」「何歳」などと声をか?...",
"keywords": "西日本新聞me, 西日本新聞, ニュース, 九州, 福岡",
"snippet": "福岡県警嘉麻署は7日、嘉麻市内の路上で5日午後4時ごろ、歩行中の女児が男から「お菓子いる」「何歳」などと声をか?...",
"url": "https://www.nishinippon.co.jp/item/1466710/",
"image_url": "https://www.nishinippon.co.jp/uploads/image/1130841/sns_e38437a2d3.jpg",
"language": "ja",
"published_at": "2026-03-07T15:31:00.000000Z",
"source": "nishinippon.co.jp",
"categories": [],
"relevance_score": null
},
{
"uuid": "ee79a070-a6f2-4274-ba72-04eda84675bf",
"title": "Freilaufkörper Oval Concepts 900 - Ersatz?",
"description": "Hallo liebe Technik-Spezialisten,\n\nder in den Bildern dargestellte Freilaufkörper (Shimano), montiert auf meiner Oval Concepts 981 (80mm Hochprofil) Felge...",
"keywords": "",
"snippet": "Hallo liebe Technik-Spezialisten,der in den Bildern dargestellte Freilaufkörper ( Shimano ), montiert auf meiner Oval Concepts 981 (80mm Hochprofil) Felge hatt...",
"url": "https://www.rennrad-news.de/forum/threads/freilaufk%C3%B6rper-oval-concepts-900-ersatz.206493/",
"image_url": "https://www.rennrad-news.de/forum/styles/default/rennrad-news.de/rennradnews-logo.og.png",
"language": "de",
"published_at": "2026-03-07T15:30:39.000000Z",
"source": "rennrad-news.de",
"categories": [
"sports"
],
"relevance_score": null
},
{
"uuid": "26f7b380-dbff-4539-b699-8a0b5cbe1616",
"title": "\"개미 떠난 자리에 큰돈 들어온다\"...XRP, 매집 타이밍은 '지금'",
"description": "엑스알피(XRP)/챗gpt생성이미지 가상자산시장의변동성속에서도엑스알피(XRP)가장기적인성장잠재력을바탕으로전략적?...",
"keywords": "",
"snippet": "",
"url": "https://www.coinreaders.com/221951",
"image_url": "https://www.coinreaders.com/imgdata/coinreaders_com/202506/800_800_2025061402585667.jpg",
"language": "ko",
"published_at": "2026-03-07T15:30:00.000000Z",
"source": "coinreaders.com",
"categories": [],
"relevance_score": null
}
]
}
Similar News Available on: All plans
Endpoint
GET https://api.thenewsapi.com/v1/news/similar/uuid HTTP/1.1
Use this endpoint to find similar stories to a specific article based on its UUID.
If you have issues with your requests, please ensure your GET parameters are URL-encoded.
All text data returned is UTF-8.
All dates are in UTC (GMT).
HTTP GET Parameters
| name | required | description |
|---|---|---|
api_token |
true | Your API token which can be found on your account dashboard. |
categories |
false | Comma separated list of categories to include.
Supported categories: general | science | sports | business | health | entertainment | tech | politics | food | travel Example: business,tech
|
exclude_categories |
false | Comma separated list of categories to exclude. |
domains |
false | Comma separated list of domains to include. List of domains can be obtained through our Sources endpoint, found further down this page. |
exclude_domains |
false | Comma separated list of domains to exclude |
source_ids |
false | Comma separated list of source_ids to include. List of source_ids can be obtained through our Sources endpoint, found further down this page. |
exclude_source_ids |
false | Comma separated list of source_ids to exclude. |
language |
false | Comma separated list of languages to include. Default is all.
Click here for a list of supported languages. Examples: en,es (English + Spanish)
|
published_before |
false | Find all articles published before the specified date. Supported formats include:
Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2026-03-07T15:36:20 |
2026-03-07T15:36 |
2026-03-07T15 |
2026-03-07 |
2026-03 |
2026
|
published_after |
false | Find all articles published after the specified date. Supported formats include:
Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2026-03-07T15:36:20 |
2026-03-07T15:36 |
2026-03-07T15 |
2026-03-07 |
2026-03 |
2026
|
published_on |
false | Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-03-07
|
limit |
false | Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan. |
page |
false | Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2
|
Response Objects
| name | description |
|---|---|
meta > found |
The number of articles found for the request. |
meta > returned |
The number of articles returned on the page.
This is useful to determine the end of the result set as if this is lower than limit, there are no more articles after this page. |
meta > limit |
The limit based on the limit parameter. |
meta > page |
The page number based on the page parameter. |
data > uuid |
The unique identifier for an article in our system. Store this and use it to find specific articles using our single article endpoint. |
data > title |
The article title. |
data > description |
The article meta description. |
data > keywords |
The article meta keywords. |
data > snippet |
The first 60 characters of the article body. |
data > url |
The URL to the article. |
data > image_url |
The URL to the article image. |
data > language |
The language of the source. |
data > published_at |
The datetime the article was published. |
data > source |
The domain of the source. |
data > categories |
Array of strings which the source is categorized as. |
data > relevance_score |
Relevance score based on the article provided. |
If no results are found, the data object will be empty.
Example Request
GET https://api.thenewsapi.com/v1/news/similar/cc11e3ab-ced0-4a42-9146-e426505e2e67?api_token=YOUR_API_TOKEN&language=en&published_on=2020-12-01
Example Response
{
"meta": {
"found": 3571,
"returned": 3,
"limit": 3,
"page": 1
},
"data": [
{
"uuid": "df4ad427-a672-4c67-b6c6-6f81aa00e164",
"title": "Tesla stock jumps after announcement it will join S&P 500 in one go",
"description": "Tesla's stock price surged early Tuesday after the company b...",
"keywords": "Business, s&p 500, stocks, tesla",
"snippet": "Tesla’s stock price surged early Tuesday after the company...",
"url": "https://nypost.com/2020/12/01/tesla-stock-jumps-on-news-it-will-join-sp-500-in-one-shot/",
"image_url": "https://nypost.com/wp-content/uploads/sites/2/2020/12/tesla-52.jpg?quality=90&strip=all&w=1200",
"language": "en",
"published_at": "2020-12-01T14:35:46.000000Z",
"source": "nypost.com",
"categories": [
"business"
],
"relevance_score": 153.61266
},
{
"uuid": "c9a23881-12dd-4005-8982-7b6552a2eb50",
"title": "Tesla To Join S&P 500 With Full Market Cap On December 21",
"description": "Tesla will be added to the S&P 500 index all at once at its ...",
"keywords": "Tesla, S&P500, EV, Automotive, Stocks, Investing",
"snippet": "Tesla (NASDAQ: TSLA) will be added to the S&P 500 index all ...",
"url": "https://oilprice.com/Latest-Energy-News/World-News/Tesla-To-Join-SP-500-With-Full-Market-Cap-On-December-21.html",
"image_url": "https://d32r1sh890xpii.cloudfront.net/news/718x300/2020-12-01_xwjdajwctl.jpg",
"language": "en",
"published_at": "2020-12-01T16:30:00.000000Z",
"source": "oilprice.com",
"categories": [
"general",
"business"
],
"relevance_score": 146.92773
},
{
"uuid": "18afdb1c-7742-4016-bf8c-a2f114e11199",
"title": "Tesla to Enter S&P 500 at Full Weight in December",
"description": "The electric-vehicle maker will be added to the broad stock-...",
"keywords": "Motor Vehicles, Alternative Fuel Vehicles, Trusts Funds Financial Vehicles, Diversified Holding Companies, Automotive",
"snippet": "S&P Dow Jones Indices said it will add Tesla Inc.’s full w...",
"url": "https://www.wsj.com/articles/tesla-to-enter-s-p-500-at-full-weight-in-december-11606780897?mod=pls_whats_news_us_business_f",
"image_url": "https://images.wsj.net/im-265933/social",
"language": "en",
"published_at": "2020-12-01T00:01:00.000000Z",
"source": "online.wsj.com",
"categories": [
"business"
],
"relevance_score": 128.22346
}
]
}
News by UUID Available on: All plans
Endpoint
GET https://api.thenewsapi.com/v1/news/uuid/uuid HTTP/1.1
Use this endpoint to find specific articles by the UUID which is returned on our search endpoints. This is useful if you wish to store the UUID to return the article later.
If you have issues with your requests, please ensure your GET parameters are URL-encoded.
All text data returned is UTF-8.
All dates are in UTC (GMT).
HTTP GET Parameters
| name | required | description |
|---|---|---|
api_token |
true | Your API token which can be found on your account dashboard. |
Response Objects
| name | description |
|---|---|
uuid |
The unique identifier for an article in our system. Store this and use it to find specific articles using our single article endpoint. |
title |
The article title. |
description |
The article meta description. |
keywords |
The article meta keywords. |
snippet |
The first 60 characters of the article body. |
url |
The URL to the article. |
image_url |
The URL to the article image. |
language |
The language of the source. |
published_at |
The datetime the article was published. |
source |
The domain of the source. |
categories |
Array of strings which the source is categorized as. |
If no results are found, a resource_not_found error will be returned.
Example Request
GET https://api.thenewsapi.com/v1/news/uuid/147013d8-6c2c-4d50-8bad-eb3c8b7f5740?api_token=YOUR_API_TOKEN
Example Response
{
"uuid": "147013d8-6c2c-4d50-8bad-eb3c8b7f5740",
"title": "These Are The Four American Companies Worth Over $1 Trillion Each – 24",
"description": "America’s major market indexes set records in the early pa...",
"keywords": "",
"snippet": "These Are The Four American Companies Worth Over $1 Trillion...",
"url": "https://247wallst.com/investing/2020/10/17/these-are-the-four-american-companies-worth-over-1-trillion-each/",
"image_url": "https://247wallst.com/wp-content/uploads/2020/08/imageForEntry2-Qrj.jpg",
"language": "en",
"published_at": "2020-10-17T11:16:20.000000Z",
"source": "247wallst.com",
"categories": [
"business"
]
}
Sources Available on: All plans
Endpoint
GET https://api.thenewsapi.com/v1/news/sources HTTP/1.1
Use this endpoint to sources to use in your news API requests. Note that the limit is 50 for all requests.
If you have issues with your requests, please ensure your GET parameters are URL-encoded.
All text data returned is UTF-8.
HTTP GET Parameters
| name | required | description |
|---|---|---|
categories |
false | Comma separated list of categories to include
Example: business,tech
|
exclude_categories |
false | Comma separated list of categories to exclude |
language |
false | Comma separated list of languages to include. Default is all.
Click here for a list of supported languages. Examples: en,es (English + Spanish)
|
page |
false | Use this to paginate through the result set. Default is 1.
Example: page=2
|
Response Objects
| name | description |
|---|---|
meta > found |
The number of sources found for the request. |
meta > returned |
The number of sources returned on the page. |
meta > limit |
The limit is 50. This currently can not be changed. |
meta > page |
The page number based on the page parameter. |
data > source_id |
The unique ID of the source feed. Use this for the source_ids or exclude_source_ids parameters in the news endpoints.
There may be many source_ids for each domain, therefore we would generally suggest using the domains filter instead the source_ids filter. |
data > domain |
The domain of the source. You can use this for the domains or exclude_domains parameters in the news endpoints. |
data > language |
The source language. |
data > locale |
The source locale. Note that only select sources have locales. |
data > categories |
Array of strings which the source is categorized as. |
If no results are found, the data object will be empty.
Example Request
GET https://api.thenewsapi.com/v1/news/sources?api_token=YOUR_API_TOKEN&language=en
Example Response
{
"meta": {
"found": 15453,
"returned": 50,
"limit": 50,
"page": 1
},
"data": [
{
"source_id": "arstechnica.com-1",
"domain": "arstechnica.com",
"language": "en",
"locale": null,
"categories": [
"tech"
]
},
{
"source_id": "adweek.com-1",
"domain": "adweek.com",
"language": "en",
"locale": null,
"categories": [
"business"
]
},
...
Errors
Errors
If your request was unsuccessful, you will receive a JSON formatted error. Below you will find the potential errors you may encounter when using the API.
Errors
| error code | HTTP status | description |
|---|---|---|
malformed_parameters |
400 |
Validation of parameters failed. The failed parameters are usually shown in the error message. |
invalid_api_token |
401 |
Invalid API token. |
usage_limit_reached |
402 |
Usage limit of your plan has been reached. Usage limit and remaining requests can be found on the X-UsageLimit-Limit header. |
endpoint_access_restricted |
403 |
Access to the endpoint is not available on your current subscription plan. |
resource_not_found |
404 |
Resource could not be found. |
invalid_api_endpoint |
404 |
API route does not exist. |
rate_limit_reached |
429 |
Too many requests in the past 60 seconds. Rate limit and remaining requests can be found on the X-RateLimit-Limit header. |
server_error |
500 |
A server error occured. |
maintenance_mode |
503 |
The service is currently under maintenance. |
Example Error Response
{
"error": {
"code": "malformed_parameters",
"message": "The published_before parameter(s) are incorrectly formatted."
}
}
Examples
API Examples
Our endpoints are very useful for filtering to find only specific resources you need. Follow each example request below to see how you can build dynamic queries.
Example Request 1
This is a basic request which will return all articles which match the search term "usd" within the title or body of the article:
GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=usd
Example Request 2
This will return all articles which match the search term "usd" OR "gbp":
GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=usd%20%7C%20gbp
Example Request 3
This will return all articles which match the search term "usd" AND "gbp":
GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=usd%20%2B%20gbp
Example Request 4
This will return all articles which match the search term "usd" AND "gbp" but removes any articles which mentions "cad":
GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=usd%20%2B%20gbp%20-cad
Example Request 5
This will return all articles which match the search term "forex" AND "usd" OR "gbp" but removes any articles which mentions "cad":
GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=forex%20%2B%20%28usd%20%7C%20gbp%29%20-cad
Example Request 6
This is the same as Example Request 5 but will also ensure the articles returned are in English and categorized by business or tech but not travel, and are published within the last week:
GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=forex%20%2B%20%28usd%20%7C%20gbp%29%20-cad&language=en&categories=business%2Ctech&exclude_categories=travel&published_after=2026-02-28
Code Examples
See our prepared examples below to quickly get started implementing our API into your next project.
PHP
$queryString = http_build_query([
'api_token' => 'YOUR_API_TOKEN',
'categories' => 'business,tech',
'search' => 'apple',
'limit' => 50,
]);
$ch = curl_init(sprintf('%s?%s', 'https://api.thenewsapi.com/v1/news/all', $queryString));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($ch);
curl_close($ch);
$apiResult = json_decode($json, true);
print_r($apiResult);
Python
# Python 3
import http.client, urllib.parse
conn = http.client.HTTPSConnection('api.thenewsapi.com')
params = urllib.parse.urlencode({
'api_token': 'YOUR_API_TOKEN',
'categories': 'business,tech',
'limit': 50,
})
conn.request('GET', '/v1/news/all?{}'.format(params))
res = conn.getresponse()
data = res.read()
print(data.decode('utf-8'))
Go
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://thenewsapi.com")
baseURL.Path += "v1/news/all"
params := url.Values{}
params.Add("api_token", "YOUR_API_TOKEN")
params.Add("categories", "business,tech")
params.Add("search", "apple")
params.Add("limit", "50")
baseURL.RawQuery = params.Encode()
req, _ := http.NewRequest("GET", baseURL.String(), nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
JavaScript
var requestOptions = {
method: 'GET'
};
var params = {
api_token: 'YOUR_API_TOKEN',
categories: 'business,tech',
search: 'apple',
limit: '50'
};
var esc = encodeURIComponent;
var query = Object.keys(params)
.map(function(k) {return esc(k) + '=' + esc(params[k]);})
.join('&');
fetch("https://api.thenewsapi.com/v1/news/all?" + query, requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
C#
var client = new RestClient("https://api.thenewsapi.com/v1/news/all");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddQueryParameter("api_token", "YOUR_API_TOKEN");
request.AddQueryParameter("categories", "business,tech");
request.AddQueryParameter("search", "apple");
request.AddQueryParameter("limit", "50");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
HttpUrl.Builder httpBuilder = HttpUrl.parse("https://api.thenewsapi.com/v1/news/all").newBuilder();
httpBuilder.addQueryParameter("api_token", "YOUR_API_TOKEN");
httpBuilder.addQueryParameter("categories", "business,tech");
httpBuilder.addQueryParameter("search", "apple");
httpBuilder.addQueryParameter("limit", "50");
Request request = new Request.Builder().url(httpBuilder.build()).build();
Response response = client.newCall(request).execute();