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-09-09
|
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": "164999f9-145f-4b2a-9eef-2fe6ef9aae60",
"title": "U.S. Strikes Iranian Tankers, Iran Attacks Jordan, Oil Surges Past $100",
"description": "The U.S. destroyed five Iranian oil tankers on Tuesday, and Iran retaliated by attacking civilian vessels and launching missiles at Jordan.",
"keywords": "",
"snippet": "Hostilities between the U.S. and Iran continued to escalate on Tuesday night, as the U.S. destroyed five Iranian oil tankers, and Iran retaliated by attacking n...",
"url": "https://www.breitbart.com/national-security/2026/09/09/u-s-strikes-iranian-tankers-iran-attacks-jordan-oil-surges-past-100/",
"image_url": "https://media.breitbart.com/media/2026/07/us-fires-missile-640x335.jpg",
"language": "en",
"published_at": "2026-09-09T13:04:16.000000Z",
"source": "breitbart.com",
"categories": [
"general",
"politics"
],
"locale": "us",
"similar": [
{
"uuid": "051e9be7-ab59-405e-bb85-4ff8c9d3d462",
"title": "Oil rises past $100 a barrel after the latest wave of Middle East attacks",
"description": "The price of oil has surpassed $100 a barrel for the first time in almost six weeks after attacks on oil facilities and ships in the Middle East threatened to debilitate an already weakened supply chain.",
"keywords": "Iran war, Oil and gas industry, Energy markets, Energy industry, Middle East, Fires, Saudi Arabia, General news, Business, World news, Iran government, Transportation and shipping, Donald Trump, Bank of America Corp., Iran, World News",
"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/oil-prices-iran-attack-saudi-brent-crude-7538e6386a819bcdc2547d530ec3472e",
"image_url": "https://dims.apnews.com/dims4/default/9aacab3/2147483647/strip/true/crop/4063x2707+0+1/resize/980x653!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F47%2F83%2F2f8e43daccdbb5c44010936c177b%2F669c945ff9e8440ea435b84e7ba62db7",
"language": "en",
"published_at": "2026-09-09T09:23:01.000000Z",
"source": "apnews.com",
"categories": [
"general"
],
"locale": "us"
},
{
"uuid": "50196703-fb79-44b7-903f-ea405ed4062b",
"title": "Oil prices climb over $100 per barrel as US war in Iran continues",
"description": "Brent crude oil prices, a benchmark for global trading, climbed on Wednesday.",
"keywords": "",
"snippet": "Oil prices climb over $100 per barrel as US war in Iran continues\n\nIranian crude oil carriers before being struck, which U.S. Central Command says it targeted a...",
"url": "https://abcnews.com/Business/oil-prices-climb-100-barrel-us-war-iran/story?id=136296130",
"image_url": "https://i.abcnewsfe.com/a/9d6a1b41-3ac8-44e2-8d49-9ef75e066b23/iran-main_1788949471455_hpMain_16x9.jpg?w=1600",
"language": "en",
"published_at": "2026-09-09T10:34:49.000000Z",
"source": "abcnews.go.com",
"categories": [
"general"
],
"locale": "us"
},
{
"uuid": "456e6164-fab6-4f2f-b0bb-dd7ec006e6ad",
"title": "US Destroys 5 Iranian Oil Tankers as War Escalates Once Again",
"description": "The United States struck five Iranian oil tankers in the Gulf of Oman following an attack on an American warship by Iran. Now, the growing tensions are triggering yet another major spike in oil and gas prices. It comes as President Donald Trump is threatening to ban some food and alcohol imports from Canada. NBC’s Gabe Gutierrez reports for TODAY.",
"keywords": "",
"snippet": "\n\nCopied\n\nThe United States struck five Iranian oil tankers in the Gulf of Oman following an attack on an American warship by Iran. Now, the growing tensions ar...",
"url": "https://www.today.com/video/new-strikes-on-iran-trigger-another-spike-in-oil-and-gas-prices-269529157838",
"image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_social_share_1200x630_center,f_auto,q_auto:best/mpx/2704722219/2026_09/1788952319625_tdy_news_7a_gutierrez_iran_strikes_260909_S3_1920x1080-ytl532.jpg",
"language": "en",
"published_at": "2026-09-09T11:12:04.000000Z",
"source": "nbcnews.com",
"categories": [
"general",
"politics"
],
"locale": "us"
}
]
},
{
"uuid": "7bb0ce14-f5d5-4c4d-85b5-28242dfc3e9e",
"title": "Tennis star Carlos Alcaraz vomits in towel during US Open thriller after trying to shoo cameras away",
"description": "Carlos Alcaraz vomited into his towel before the fifth set of his U.S. Open loss to Ben Shelton at Arthur Ashe Stadium in a match that ended at 3:33 a.m. ET.",
"keywords": "outkick sports, us open tennis, tennis",
"snippet": "In front of a packed Arthur Ashe Stadium, it’s hard for tennis players to have a moment of privacy when they need one, especially when they need to vomit.\n\nBe...",
"url": "https://www.foxnews.com/outkick-sports/tennis-star-carlos-alcaraz-vomits-towel-us-open-thriller-trying-shoo-cameras-away",
"image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/09/carlos-alcaraz-us-open-quarterfinal_001.jpg",
"language": "en",
"published_at": "2026-09-09T15:01:43.000000Z",
"source": "foxnews.com",
"categories": [
"general",
"politics"
],
"locale": "us",
"similar": [
{
"uuid": "4c8b31d9-7918-4b46-be66-68a11fb7200b",
"title": "Ben Shelton beats Carlos Alcaraz in latest-finishing match in U.S. Open history",
"description": "Ben Shelton ended Carlos Alcaraz's title reign in the latest-finishing match in U.S. Open history, pulling out the victory in a marathon tussle that ended at 3:33 a.m. Wednesday.",
"keywords": "Carlos Alcaraz, U.S. Open",
"snippet": "New York — Ben Shelton ended Carlos Alcaraz's title reign in the latest-finishing match in U.S. Open history, pulling out a 6-7 (5), 6-1, 6-3, 1-6, 7-6 (10-7)...",
"url": "https://www.cbsnews.com/news/ben-shelton-carlos-alcaraz-us-open-latest-finish/",
"image_url": "https://assets1.cbsnewsstatic.com/hub/i/r/2026/09/09/e96f53ba-d711-44bf-a812-677d9e758b2a/thumbnail/1200x630/6948d8d8cbe79a2e84718b399b1c2926/gettyimages-2293733007.jpg",
"language": "en",
"published_at": "2026-09-09T08:54:18.000000Z",
"source": "cbsnews.com",
"categories": [
"general",
"politics"
],
"locale": "us"
},
{
"uuid": "321566e9-3b98-4fde-ad7b-1475c229212a",
"title": "Ben Shelton takes down Carlos Alcaraz to earn the biggest win of his career in latest US Open match ever",
"description": "Ben Shelton defeated Carlos Alcaraz in a historic US Open quarterfinal at Arthur Ashe Stadium, ending at 3:33 a.m. He faces Francis Tiafoe in the semifinal.",
"keywords": "outkick sports, us open tennis, tennis",
"snippet": "It may have happened during a quarter-final match, and it may have taken place while most of the country was asleep, but Ben Shelton officially became the face ...",
"url": "https://www.foxnews.com/outkick-sports/ben-shelton-takes-down-carlos-alcaraz-earn-biggest-win-career-latest-us-open-match",
"image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/09/ben-shelton-alcaraz-featured.jpg",
"language": "en",
"published_at": "2026-09-09T11:17:07.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-09-09T16:26:21 |
2026-09-09T16:26 |
2026-09-09T16 |
2026-09-09 |
2026-09 |
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-09-09T16:26:21 |
2026-09-09T16:26 |
2026-09-09T16 |
2026-09-09 |
2026-09 |
2026
|
published_on |
false | Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-09-09
|
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": 1700568,
"returned": 10,
"limit": 10,
"page": 1
},
"data": [
{
"uuid": "5323f234-26da-456e-8c15-264f646a0538",
"title": "Upscale Officially Launches As One-Stop Shop For Microdramas",
"description": "Upscale Media Films, which is making vertical shows with Hartbeat, is formally launching as a full-service production company for microdramas.",
"keywords": "",
"snippet": "EXCLUSIVE: Upscale Media Films, which is making a suite of vertical shows with Hartbeat, is formally launching as a full-service production company for the micr...",
"url": "https://deadline.com/2026/09/upscale-launches-microdrama-producer-1237072180/",
"image_url": "https://deadline.com/wp-content/uploads/2026/09/Upscale-Malik-Davis.jpg?w=1024",
"language": "en",
"published_at": "2026-09-09T16:08:38.000000Z",
"source": "deadline.com",
"categories": [
"entertainment"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "34089a9b-09ae-4665-a288-381c587215ae",
"title": "'Digger' Trailer: Tom Cruise Movie From Alejandro G. Iñárritu",
"description": "The trailer for Alejandro G. Iñárritu’s 'Digger' starring Tom Cruise gives glimpse political comedy movie cloaked in secrecy.",
"keywords": "",
"snippet": "UPDATED with final trailer: The final trailer for Warner Bros’ Digger starring Tom Cruise was released Thursday. Watch it above.\n\nThe pic, a political satire ...",
"url": "https://deadline.com/2026/09/digger-trailer-tom-cruise-1236980669/",
"image_url": "https://deadline.com/wp-content/uploads/2025/12/Tom-Cruise-in-Digger.jpg?w=1024",
"language": "en",
"published_at": "2026-09-09T16:07:03.000000Z",
"source": "deadline.com",
"categories": [
"entertainment"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "646bf122-b6a2-454b-abfc-b8c42749b5e7",
"title": "Abramorama Acquires 'One More Time' With Theater Trio Tackling Beckett",
"description": "Abramorama Acquires 'One More Time' About New York Theater Trio Tackling Beckett's 'Endgame'; Scorsese Exec-Produces; Watch Trailer",
"keywords": "",
"snippet": "EXCLUSIVE: AB2 Media Group and Abramorama have acquired North American distribution rights to One More Time, the Telluride world premiere documentary about a tr...",
"url": "https://deadline.com/2026/09/abramorama-one-more-time-andre-gregory-endgame-1237072262/",
"image_url": "https://deadline.com/wp-content/uploads/2026/09/One-More-Time.jpeg?w=1024",
"language": "en",
"published_at": "2026-09-09T16:05:00.000000Z",
"source": "deadline.com",
"categories": [
"entertainment"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "29bc6663-2ae0-4392-bf5c-7615811b5b78",
"title": "Norah O'Donnell shares how she rewards herself when she donates blood",
"description": "Norah O'Donnell is a frequent blood donor. She shares what she does before and after she gives blood and how she rewards herself.",
"keywords": "",
"snippet": "Norah O'Donnell shares how she rewards herself when she donates blood Norah O'Donnell is a frequent blood donor. She shares what she does before and after she g...",
"url": "https://www.cbsnews.com/video/norah-odonnell-shares-how-she-rewards-herself-when-she-donates-blood/",
"image_url": "https://assets1.cbsnewsstatic.com/hub/i/r/2026/09/09/feb17dbd-66f0-4137-a50d-ee92bc37784a/thumbnail/1200x630/75a364d73ce315d7cfbb579673d9e947/untitled-design-3.jpg",
"language": "en",
"published_at": "2026-09-09T16:00:15.000000Z",
"source": "cbsnews.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "6a80889c-6dc1-4348-9217-9a94cd106851",
"title": "Adam Carolla credits Jimmy Kimmel for comedy career, warns society collapses when comics stop telling truth",
"description": "Adam Carolla says Jimmy Kimmel was the first person to tell him he was funny after they met through boxing lessons that began at KROQ radio station.",
"keywords": "hangout with hannity podcast, jimmy kimmel, interviews, fn flash, comedy, fox news media",
"snippet": "NEW You can now listen to Fox News articles!\n\nComedian Adam Carolla said Jimmy Kimmel was the first person in his life to tell him he was funny and should pursu...",
"url": "https://www.foxnews.com/media/adam-carolla-credits-jimmy-kimmel-comedy-career-warns-society-collapses-when-comics-stop-telling-truth",
"image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/09/adam-carolla-rodney-comedy-club.jpg",
"language": "en",
"published_at": "2026-09-09T15:58:57.000000Z",
"source": "foxnews.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "836de31e-6e50-43a5-8cc7-6ab2d9fb9b87",
"title": "The Gentlemen’s Kaya Scodelario Teases Possibility of Meghan Markle Joining Season 3 Amid Rumors",
"description": "‘The Gentlemen’ actress Kaya Scodelario weighed in on swirling speculation that Meghan Markle will make an appearance in season 3",
"keywords": "",
"snippet": "Meghan Markle’s potential The Gentlemen casting is still unknown to the show’s stars.\n\n“I, unfortunately, have no decision-making abilities,” Kaya Scode...",
"url": "https://www.usmagazine.com/entertainment/news/the-gentlemens-kaya-scodelario-on-meghan-markle-cameo-rumor/",
"image_url": "https://www.usmagazine.com/wp-content/uploads/2026/09/Kaya-Scodelario-On-Meghan-Markle-Casting-Rumors.jpg?crop=0px%2C0px%2C2000px%2C1051px&resize=1200%2C630&quality=86&strip=all",
"language": "en",
"published_at": "2026-09-09T15:57:57.000000Z",
"source": "usmagazine.com",
"categories": [
"entertainment",
"general"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "381bb8b4-9e18-4cb8-976d-3d3ad0e4c7b7",
"title": "National Guardsman in D.C. as part of Trump crackdown on crime charged after pointing gun at colleague",
"description": "Zion Mitchell, 21, was arrested earlier this month and faces firearms and assault charges after he admitted he pointed his gun at a fellow National Guard member...",
"keywords": "National Guard of the United States, Washington",
"snippet": "A National Guardsman assigned to patrol the streets of Washington, D.C., as part of President Trump's crackdown on crime is now facing criminal charges himself ...",
"url": "https://www.cbsnews.com/news/national-guardsman-d-c-pointing-gun-at-colleague/",
"image_url": "https://assets2.cbsnewsstatic.com/hub/i/r/2026/09/09/6683bb9e-e0b7-4843-a73a-8080517f35b3/thumbnail/1200x630g2/8cefc511766a4b09669b9e81400e28a3/ap26219789281286.jpg",
"language": "en",
"published_at": "2026-09-09T15:56:41.000000Z",
"source": "cbsnews.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "82ebad73-3946-4212-8e33-07dccce335e0",
"title": "My Husband Surprised Me With Some “Toys” in Bed. What He Wants Me to Do With Them Is a Nonstarter.",
"description": "I'm repulsed.",
"keywords": "advice, sex, slate-plus",
"snippet": "Sign up for the Slatest to get the most insightful analysis, criticism, and advice out there, delivered to your inbox daily.\n\nHow to Do It is Slate’s sex advi...",
"url": "https://slate.com/advice/2026/09/sex-advice-husband-toys-exploration.html?via=rss",
"image_url": "https://compote.slate.com/images/ec3c93d3-21df-4c02-aa83-d0fc5339bed8.gif?crop=1560%2C1040%2Cx0%2Cy0&width=1560",
"language": "en",
"published_at": "2026-09-09T15:56:35.000000Z",
"source": "slate.com",
"categories": [
"general"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "3018fdf1-220a-480a-a551-5855ce3655fe",
"title": "‘The View’s Whoopi Goldberg Shuts Down Audience Boos At Ted Cruz Mention: “We Don’t Gel With Them Always, But We Are Respectful”",
"description": "Whoopi Goldberg shut down dissent from the audience at The View after audible boos were heard following a mention of Republican Senator Ted Cruz.",
"keywords": "",
"snippet": "Whoopi Goldberg shut down dissent from the audience at The View after audible boos were heard following a mention of Republican Senator Ted Cruz.\n\nThe ABC dayti...",
"url": "https://deadline.com/2026/09/the-view-whoopi-goldberg-audience-boos-ted-cruz-1237072288/",
"image_url": "https://deadline.com/wp-content/uploads/2026/09/whoopi-goldberg-the-view.jpg?w=1024",
"language": "en",
"published_at": "2026-09-09T15:52:02.000000Z",
"source": "deadline.com",
"categories": [
"entertainment"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "3dff5e72-e6d5-41f5-a006-1a083a07f235",
"title": "Netanyahu rejects claim he was warned ahead of Oct. 7, as 2023 attack fuels pre-election furor",
"description": "Israel's leader says a report claiming the UAE warned him in advance of Hamas' 2023 terror attack is politically motivated lies, but it's fueling fierce pre-ele...",
"keywords": "United Arab Emirates, Terrorism, Hamas, Israel, Election, Middle East, Benjamin Netanyahu",
"snippet": "As Israelis prepare to vote next month in a tightly contested legislative race that will determine the country's next government, they're still debating how the...",
"url": "https://www.cbsnews.com/news/netanyahu-october-7-uae-warning-malicious-libel-2023-attack-election-furor/",
"image_url": "https://assets1.cbsnewsstatic.com/hub/i/r/2026/09/09/0eed1648-e0e8-47a2-9375-6d24b61fae47/thumbnail/1200x630/6c571dbd7ddb27826161146352c41cf5/netanyahu-syria.jpg",
"language": "en",
"published_at": "2026-09-09T15:50:34.000000Z",
"source": "cbsnews.com",
"categories": [
"general",
"politics"
],
"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-09-09T16:26:21 |
2026-09-09T16:26 |
2026-09-09T16 |
2026-09-09 |
2026-09 |
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-09-09T16:26:21 |
2026-09-09T16:26 |
2026-09-09T16 |
2026-09-09 |
2026-09 |
2026
|
published_on |
false | Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-09-09
|
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": 54667043,
"returned": 10,
"limit": 10,
"page": 1
},
"data": [
{
"uuid": "3322f75c-51c0-4882-8147-80e6c044363d",
"title": "도봉구, 재건축·재개발 갈등 줄이고 사업 속도 높인다 - 신아일보",
"description": "서울 도봉구가 재건축·재개발 과정에서 발생할 수 있는 주민 갈등과 시행착오를 줄이고 사업 추진 속도를 높이기 위한 ?...",
"keywords": "",
"snippet": "도봉구는 정비사업 주민소통협의체와 전문가 자문단을 운영하고, 주민을 대상으로 정비사업 아카데미와 맞춤형 설명회?...",
"url": "https://www.shinailbo.co.kr/news/articleView.html?idxno=5060572",
"image_url": "https://cdn.shinailbo.co.kr/news/photo/202609/5060572_2058326_432.jpg",
"language": "ko",
"published_at": "2026-09-09T16:26:56.000000Z",
"source": "shinailbo.co.kr",
"categories": [],
"relevance_score": null
},
{
"uuid": "c531b21b-4f5e-47d9-a307-de20ef375704",
"title": "고양시, 모바일 전자고지로 1억1000만원 절감…공공혁신 우수사례 - 신아일보",
"description": "경기 고양특례시가 카카오 알림톡을 활용한 모바일 전자고지로 약 1억1000만원의 우편 발송비를 절감해 '2026 카카오 공공?...",
"keywords": "",
"snippet": "[사진=고양시]\n\n경기 고양특례시가 카카오 알림톡을 활용한 모바일 전자고지로 약 1억1000만원의 우편 발송비를 절감해 '20...",
"url": "https://www.shinailbo.co.kr/news/articleView.html?idxno=5060594",
"image_url": "https://cdn.shinailbo.co.kr/news/photo/202609/5060594_2058360_264.jpg",
"language": "ko",
"published_at": "2026-09-09T16:26:37.000000Z",
"source": "shinailbo.co.kr",
"categories": [],
"relevance_score": null
},
{
"uuid": "054053ce-aec5-49d3-b8d3-bcc8f0a470cd",
"title": "서울 배수지 102개소 순차 청소…아리수 위생관리 강화 - 건설타임즈",
"description": "(건설타임즈) 김주열 기자 = 서울시가 아리수의 위생성과 공급 안정성을 높이기 위해 이달부터 배수지 102개소의 하반기 ?...",
"keywords": "",
"snippet": "배수지 내 물탱크를 고압세척으로 청소하는 장면 [사진=서울시]\n\n(건설타임즈) 김주열 기자 = 서울시가 아리수의 위생성?...",
"url": "https://www.constimes.co.kr/news/articleView.html?idxno=313536",
"image_url": "https://cdn.constimes.co.kr/news/photo/202609/313536_71357_2613.jpg",
"language": "ko",
"published_at": "2026-09-09T16:26:34.000000Z",
"source": "constimes.co.kr",
"categories": [],
"relevance_score": null
},
{
"uuid": "1e54a896-81aa-437d-aeeb-b064a888eed4",
"title": "«Аврора-шаттлы» до Выборга остаются! Рейсы на двухэтажных поездах продлят до зимы",
"description": "Но их график изменят.",
"keywords": "",
"snippet": "Утренняя и дневная пара будут ездить по прежнему графику: в 8:06 и 15:18 — из Петербурга, в 12:...",
"url": "https://www.sobaka.ru/city/transport/220745",
"image_url": "https://static.sobaka.ru/images/post/00/22/07/45/_rotator.jpeg?v=1788960964",
"language": "ru",
"published_at": "2026-09-09T16:26:27.000000Z",
"source": "sobaka.ru",
"categories": [
"entertainment"
],
"relevance_score": null
},
{
"uuid": "f820bb3c-428d-4ec5-bb61-e5a98b8a7521",
"title": "영등포구, 추석 앞두고 선물세트 과대포장 집중 점검 - 신아일보",
"description": "서울 영등포구가 추석 명절을 앞두고 지역 내 대형 유통업체를 대상으로 선물세트 과대포장과 분리배출 표시 실태를 집?...",
"keywords": "",
"snippet": "서울 영등포구가 추석 명절을 앞두고 지역 내 대형 유통업체를 대상으로 선물세트 과대포장과 분리배출 표시 실태를 집?...",
"url": "https://www.shinailbo.co.kr/news/articleView.html?idxno=5060576",
"image_url": "https://cdn.shinailbo.co.kr/news/photo/202609/5060576_2058332_83.jpg",
"language": "ko",
"published_at": "2026-09-09T16:26:24.000000Z",
"source": "shinailbo.co.kr",
"categories": [],
"relevance_score": null
},
{
"uuid": "8be35d0f-3140-4d74-b612-f4bfaef2e7fe",
"title": "한국국제교류재단, 제주에서 공공외교 아카데미 개최",
"description": "제주지역 신문, 주제별 기사, 칼럼, 문화, 스포츠, 포토 뉴스 수록.",
"keywords": "",
"snippet": "한국국제교류재단(이사장 송기도)는 9일 제주도청 제2청사에서 2026 찾아가는 공공외교 아카데미를 개최한다.\n\n이날 아카?...",
"url": "http://www.jejunews.com/news/articleView.html?idxno=2227646",
"image_url": "http://www.jejunews.com/news/photo/202609/2227646_257745_2125.jpg",
"language": "ko",
"published_at": "2026-09-09T16:26:16.000000Z",
"source": "jejunews.com",
"categories": [],
"relevance_score": null
},
{
"uuid": "18444e47-178a-48b6-a75d-00b6c4f060e3",
"title": "원·달러 1300원대 안착··· 4대 금융지주 '추가 주주환원' 에 쏠리는 시선 - 그린포스트코리아",
"description": "원·달러 환율이 1300원대로 내려앉으면서 국내 4대 금융지주의 추가 주주환원 가능성에 시선이 쏠리고 있다. 환율 하락은...",
"keywords": "",
"snippet": "원·달러 환율이 1300원대로 내려오면서 국내 금융지주의 추가 주주환원 가능성에 관심이 쏠리고 있다./인공지능(AI) 생성 ...",
"url": "https://www.greenpostkorea.co.kr/news/articleView.html?idxno=307426",
"image_url": "https://cdn.greenpostkorea.co.kr/news/photo/202609/307426_311065_2049.png",
"language": "ko",
"published_at": "2026-09-09T16:26:15.000000Z",
"source": "greenpostkorea.co.kr",
"categories": [],
"relevance_score": null
},
{
"uuid": "ebef6201-fab8-4bb5-9914-27556b0ea2d1",
"title": "신장식 “검찰개혁 후퇴시 與와 관계 심각히 검토” [정치오늘] < 정치 < 뉴스 < 기사본문",
"description": "[시사오늘(시사ON)=이윤혁 기자] 신장식 “검찰개혁 후퇴시 與와 관계 심각히 검토”신장식 조국혁신당 대표가 정부의 공...",
"keywords": "",
"snippet": "[시사오늘(시사ON)=이윤혁 기자]\n\n신장식 조국혁신당 대표가 9일 서울 여의도 국회에서 열린 제439회국회(정기회) 5차 본회?...",
"url": "https://www.sisaon.co.kr/news/articleView.html?idxno=204276",
"image_url": "https://cdn.sisaon.co.kr/news/photo/202609/204276_306355_4142.jpg",
"language": "ko",
"published_at": "2026-09-09T16:26:13.000000Z",
"source": "sisaon.co.kr",
"categories": [],
"relevance_score": null
},
{
"uuid": "88c2a9e9-2651-46f2-8e74-89a5b077265c",
"title": "중구, 현직자 취업 비결 듣는 ‘힙지로 달빛 커리어 포차’ 개최 - 신아일보",
"description": "서울 중구가 취업을 준비하는 청년들이 대기업 현직자에게 실질적인 조언을 들을 수 있는 토크 콘서트를 마련한다.중구?...",
"keywords": "",
"snippet": "중구는 오는 21일 오후 6시 중구청 7층 중구홀에서 청년 커리어 토크 콘서트 ‘힙지로 달빛 커리어 포차’를 개최한다고 ?...",
"url": "https://www.shinailbo.co.kr/news/articleView.html?idxno=5060566",
"image_url": "https://cdn.shinailbo.co.kr/news/photo/202609/5060566_2058322_5816.jpg",
"language": "ko",
"published_at": "2026-09-09T16:26:04.000000Z",
"source": "shinailbo.co.kr",
"categories": [],
"relevance_score": null
},
{
"uuid": "0f7ffe64-9962-41d5-8a88-aa66f2c4c6a2",
"title": "마포구 곳곳서 주민 주도 가을 마을축제 열린다 - 신아일보",
"description": "선선한 가을을 맞아 서울 마포구 곳곳에서 주민들이 직접 기획하고 운영하는 마을축제가 잇따라 열린다.마포구는 주민?...",
"keywords": "",
"snippet": "마포구는 주민참여예산을 활용한 동 단위 마을축제를 9월부터 연이어 개최한다고 밝혔다. 주민이 축제의 기획부터 운영?...",
"url": "https://www.shinailbo.co.kr/news/articleView.html?idxno=5060564",
"image_url": "https://cdn.shinailbo.co.kr/news/photo/202609/5060564_2058321_553.jpg",
"language": "ko",
"published_at": "2026-09-09T16:25:43.000000Z",
"source": "shinailbo.co.kr",
"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-09-09T16:26:21 |
2026-09-09T16:26 |
2026-09-09T16 |
2026-09-09 |
2026-09 |
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-09-09T16:26:21 |
2026-09-09T16:26 |
2026-09-09T16 |
2026-09-09 |
2026-09 |
2026
|
published_on |
false | Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-09-09
|
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-09-02
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();