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-07-27
|
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": "07a2c37c-7769-406c-8fe4-1dcfd976a247",
"title": "TikTokker voiced concerns about Seattle Center food festival security day before mass shooting that left 3 dead",
"description": "A Washington content creator appeared to be surprised by the apparent lack of security at the \"Bite of Seattle\" food festival – just one day before at least three people died in a mass shooting.",
"keywords": "US News, mass shootings, seattle",
"snippet": "See more of our coverage in your search results.\n\nA Washington-based content creator appeared to be surprised by the apparent lack of security at the “Bite of...",
"url": "https://nypost.com/2026/07/27/us-news/tiktokker-voiced-concerns-about-seattle-center-food-festival-security-day-before-mass-shooting-that-left-3-dead/",
"image_url": "https://nypost.com/wp-content/uploads/sites/2/2026/07/135642483.jpg?quality=75&strip=all&w=1200",
"language": "en",
"published_at": "2026-07-27T09:20:57.000000Z",
"source": "nypost.com",
"categories": [
"general"
],
"locale": "us",
"similar": [
{
"uuid": "92d8462e-8ba2-4680-8dac-54ce05dc0565",
"title": "Multiple people shot in mass shooting at Seattle Center, police say",
"description": "Multiple people were shot on Sunday in a mass shooting incident at the Seattle Center, according to police. Police have not confirmed whether any suspects were taken into custody.",
"keywords": "seattle, washington, us, crime world, mass shootings",
"snippet": "NEW You can now listen to Fox News articles!\n\nMultiple people were shot on Sunday in a mass shooting incident at the Seattle Center, according to police.\n\nPolic...",
"url": "https://www.foxnews.com/us/multiple-people-shot-mass-shooting-seattle-center-police-say",
"image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2024/09/seattle-police.jpg",
"language": "en",
"published_at": "2026-07-27T02:22:19.000000Z",
"source": "foxnews.com",
"categories": [
"general",
"politics"
],
"locale": "us"
},
{
"uuid": "a6e388f1-0d30-4cee-8f6d-e342b723168c",
"title": "Multiple people wounded in mass shooting at Seattle Center, police say",
"description": "Multiple people were wounded on Sunday in a mass shooting incident at the Seattle Center, according to police. Police have not confirmed whether any suspects were taken into custody.",
"keywords": "seattle, washington, us, crime world, mass shootings",
"snippet": "NEW You can now listen to Fox News articles!\n\nMultiple people were wounded on Sunday in a mass shooting incident at the Seattle Center, according to police.\n\nPo...",
"url": "https://www.foxnews.com/us/multiple-people-wounded-mass-shooting-seattle-center-police-say",
"image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/07/seattle-shooting-fox-news-001.jpg",
"language": "en",
"published_at": "2026-07-27T02:22:19.000000Z",
"source": "foxnews.com",
"categories": [
"general",
"politics"
],
"locale": "us"
},
{
"uuid": "114147af-7b23-4c05-bb91-404fe92010ce",
"title": "At least 2 killed in shooting at Seattle Center food festival that sent attendees running for their lives: ‘Pure chaos’",
"description": "Multiple people were shot at the Seattle Center Sunday evening, where thousands were attending the Bite of Seattle food festival — sending massive crowds running from a hail of bullets, according to cops and witnesses.",
"keywords": "US News, mass shootings, seattle, shootings",
"snippet": "See more of our coverage in your search results.\n\nAt least two people were killed and five were wounded in a mass shooting at a Seattle food festival on Sunday ...",
"url": "https://nypost.com/2026/07/26/us-news/multiple-people-shot-at-seattle-center-food-festival-sending-attendees-running-for-their-lives/",
"image_url": "https://nypost.com/wp-content/uploads/sites/2/2026/07/seattle-center-shooting-at-bite-of-seattle.jpg?quality=75&strip=all&1785108629&w=1200",
"language": "en",
"published_at": "2026-07-27T03:20:26.000000Z",
"source": "nypost.com",
"categories": [
"general"
],
"locale": "us"
},
{
"uuid": "708a84b8-f842-4ba8-8ee5-91b3767ccb79",
"title": "Three people killed in shooting at Seattle food festival",
"description": "Seattle Police say three people were killed and four others injured in a shooting during the Bite of Seattle food festival. One suspect is in custody and another is believed to still be at large, and the suspects may have been shooting at each other, according to police.",
"keywords": "",
"snippet": "Seattle Police say three people were killed and four others injured in a shooting during the Bite of Seattle food festival. One suspect is in custody and anothe...",
"url": "https://www.nbcnews.com/video/three-people-killed-in-shooting-at-seattle-food-festival-267296837775",
"image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/mpx/2704722219/2026_07/1785132512120_nbc_spec_seattle_presser_update_late_260726_S3_1920x1080-wiuqtl.jpg",
"language": "en",
"published_at": "2026-07-27T06:08:39.000000Z",
"source": "nbcnews.com",
"categories": [
"general",
"politics"
],
"locale": "us"
}
]
},
{
"uuid": "e99eadb4-9098-4b61-a338-bdc508db3cc9",
"title": "2 dead, 5 injured after shooting at Seattle food festival",
"description": "The Seattle Police Department is investigating a shooting that left multiple people injured at the Seattle Center on Sunday, July 26.",
"keywords": "Katie Wilson, Seattle Center, Seattle Mayor, Bite of Seattle, Seattle, Seattle Fire Department, mass shooting",
"snippet": "Police in Seattle are investigating a mass shooting near the city's iconic Space Needle on July 26 that left two people dead and five others injured, including ...",
"url": "https://www.yahoo.com/news/us/articles/multiple-victims-shooting-seattle-center-022325921.html",
"image_url": "https://s.yimg.com/lo/mysterio/api/9e910213ea6d9243ce68e4af9278dc0527d188c93fd6d92d1cc2fdc4448812f8/lightyear_networkapi/resizefill_w1200;quality_80;format_webp/https:%2F%2Fmedia.zenfs.com%2Fen%2Fusa_today_news_641%2F113f966c1d50ef984531c67d72ec9302",
"language": "en",
"published_at": "2026-07-27T02:23:25.000000Z",
"source": "yahoo.com",
"categories": [
"general",
"business",
"sports",
"entertainment"
],
"locale": "us",
"similar": [
{
"uuid": "e85e58f3-8c93-45b6-a98a-d4857cbbf0fe",
"title": "Multiple people injured in Seattle Center shooting, police say",
"description": "Multiple people were injured as gunfire erupted at Seattle Center, police said, a gathering place for cultural and arts events that was hosting a major food festival over the weekend.",
"keywords": "",
"snippet": "Multiple people were injured as gunfire erupted at Seattle Center, police said, a gathering place for cultural and arts events that was hosting a major food fes...",
"url": "https://www.nbcnews.com/news/us-news/multiple-people-injured-seattle-center-shooting-police-say-rcna589371",
"image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2026-07/260726-seattle-skyline-ww-1903-c53578.jpg",
"language": "en",
"published_at": "2026-07-27T02:10:37.000000Z",
"source": "nbcnews.com",
"categories": [
"general",
"politics"
],
"locale": "us"
},
{
"uuid": "2808ca95-7238-4887-bbc9-ad13d74cab47",
"title": "At least two dead, five injured in Seattle shooting",
"description": "At least two people were killed and five others injured in a shooting during the Bite of Seattle food festival at Seattle Center. NBC News and KING report.",
"keywords": "",
"snippet": "At least two dead, five injured in Seattle shooting\n\nAt least two people were killed and five others injured in a shooting during the Bite of Seattle food festi...",
"url": "https://www.nbcnews.com/video/seattle-shooting-kills-at-least-two-people-five-others-injured-267294789759",
"image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/mpx/2704722219/2026_07/1785123953727_nbc_spec_seattle_deaths_king_260726_S3_1920x1080-pt1iv7.jpg",
"language": "en",
"published_at": "2026-07-27T03:46:00.000000Z",
"source": "nbcnews.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-07-27T10:57:59 |
2026-07-27T10:57 |
2026-07-27T10 |
2026-07-27 |
2026-07 |
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-07-27T10:57:59 |
2026-07-27T10:57 |
2026-07-27T10 |
2026-07-27 |
2026-07 |
2026
|
published_on |
false | Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-07-27
|
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": 1672824,
"returned": 10,
"limit": 10,
"page": 1
},
"data": [
{
"uuid": "7a8d206f-ec03-4a60-aa96-ae9366860f09",
"title": "Here’s a Cool Reality Check. These Meta Quest 3 Deals Can Get You Free Xbox Game Pass and More",
"description": "Save with freebies like subscriptions and game trials when you buy the next Meta Quest 3.",
"keywords": "",
"snippet": "Meta/CNET\n\nWant to escape reality for a while? The Meta Quest 3 can take you to an immersive virtual world where plenty of fun games await. The Meta Quest 3 sta...",
"url": "https://www.cnet.com/deals/best-meta-quest-3-deals/",
"image_url": "https://www.cnet.com/wp-content/uploads/sites/2/93fbdf21-8e01-46b8-8061-0c3c3a5a2629.png",
"language": "en",
"published_at": "2026-07-27T10:45:10.000000Z",
"source": "cnet.com",
"categories": [
"tech",
"general"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "1e21d8ab-4a50-4fe4-90b9-03211d11833f",
"title": "Five killed in Ukrainian drone strike – Russian governor — RT Russia & Former Soviet Union",
"description": "Ukrainian drone attacks have killed five civilians in the Russian city of Rostov-on-Don overnight, according to Governor Yury Slyusar",
"keywords": "",
"snippet": "Kiev has stepped up attacks on civilians while political and military turmoil deepens in Ukraine\n\nA Ukrainian drone attack killed five civilians in the Russian ...",
"url": "https://www.rt.com/russia/643510-ukraine-drone-raids-russia/",
"image_url": "https://mf.b37mrtl.ru/files/2026.07/article/6a671a1485f5400dd53379f3.png",
"language": "en",
"published_at": "2026-07-27T10:36:01.000000Z",
"source": "rt.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "a2297d85-3a93-4b41-99f3-a620321602fe",
"title": "Live Updates: U.S.-Iran war appears to pause as Trump gives space for talks to end Strait of Hormuz standoff",
"description": "The U.S. and Iran hold fire amid work on a deal to reopen the Strait of Hormuz, but the Trump administration says a military buildup continues.",
"keywords": "War, Iran, Donald Trump, United States Military, Oman, Middle East, Strait of Hormuz",
"snippet": "2 days since latest U.S. strikes on Iran",
"url": "https://www.cbsnews.com/live-updates/us-iran-war-trump-strait-of-hormuz-talks-oman/",
"image_url": "https://assets1.cbsnewsstatic.com/hub/i/r/2026/07/27/90729fd3-38e8-44d1-8f35-8a0c57af92eb/thumbnail/1200x630g2/b655c61e8836538bdde4789d42fc2925/iran-oman-2286944338.jpg",
"language": "en",
"published_at": "2026-07-27T10:34:55.000000Z",
"source": "cbsnews.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "b3049950-26aa-441e-808b-3c708e5ca9f9",
"title": "New Delhi summons Ukrainian ambassador over naval drone attack — RT India",
"description": "India condemned the attack on commercial vessel MV Omorfi near Russia, which killed a sailor, and warned against endangering civilian seafarers.",
"keywords": "",
"snippet": "The move comes after an Indian sailor was killed in a strike on a vessel in the Black Sea near Russia\n\nIndia has summoned Ukraine’s envoy to protest an attack...",
"url": "https://www.rt.com/india/643518-india-summons-ukrainian-ambassador/",
"image_url": "https://mf.b37mrtl.ru/files/2026.07/article/6a67323720302718f715a6e6.png",
"language": "en",
"published_at": "2026-07-27T10:32:22.000000Z",
"source": "rt.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "475efa88-270c-494e-b37f-6650a50cea25",
"title": "Meet Thomas Jefferson and Sally Hemings’ queer descendants",
"description": "Five generations later, the founding father's legacy continues to grow more complicated and colorful",
"keywords": "",
"snippet": "Dorothy Westerinen celebrated the Fourth of July the way she usually does, by barbecuing and hanging out around the pool with her wife and close friends. But he...",
"url": "https://www.salon.com/2026/07/27/meet-thomas-jefferson-and-sally-hemings-queer-descendants/",
"image_url": "https://www.salon.com/app/uploads/2021/09/thomas-jefferson-0902211.jpg",
"language": "en",
"published_at": "2026-07-27T10:30:09.000000Z",
"source": "salon.com",
"categories": [
"general"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "18fbb0dd-ad90-4412-98bd-b9cb2b7b3f5b",
"title": "NYC’s plan for 500 unsightly bike lockers leaves locals wheelie confused as cost could be $26M",
"description": "The Department of Transportation is asking New Yorkers where to place 500 new bike lockers across the five boroughs -- with the lockers costing about $52,000 ap...",
"keywords": "Metro, US News, bikers, bikes, department of transportation, parking",
"snippet": "See more of our coverage in your search results.\n\nThe Big Apple’s plan to install 500 bike lockers all over the five boroughs could cost $26 million — as lo...",
"url": "https://nypost.com/2026/07/27/us-news/nycs-plan-for-500-unsightly-bike-lockers-leaves-locals-wheelie-annoyed-as-cost-could-be-26m/",
"image_url": "https://nypost.com/wp-content/uploads/sites/2/2026/07/135206138.jpg?quality=75&strip=all&w=1200",
"language": "en",
"published_at": "2026-07-27T10:30:00.000000Z",
"source": "nypost.com",
"categories": [
"general"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "e989e071-2616-46da-8abb-0004db2a00d2",
"title": "RT reports from aftermath of Ukrainian strike on Russian tourist resort (VIDEO) — RT Russia & Former Soviet Union",
"description": "Footage from Kirilovka shows shattered rooms and burned buildings after a Ukrainian drone attack killed 12 people at a seaside hotel in Russia’s Zaporozhye Re...",
"keywords": "",
"snippet": "Twelve people, including five children, were killed when drones attacked a seaside hotel in Zaporozhye Region\n\nRT has visited the ruins of a seaside resort in R...",
"url": "https://www.rt.com/russia/643515-zaporozhye-hotel-ukraine-strike-aftermath/",
"image_url": "https://mf.b37mrtl.ru/files/2026.07/article/6a67269085f5400dd53379f6.jpg",
"language": "en",
"published_at": "2026-07-27T10:28:04.000000Z",
"source": "rt.com",
"categories": [
"general",
"politics"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "90c97641-369d-4606-9b91-7603250691d2",
"title": "Prime Video Inks Multi-Year Deal With CJ ENM Bringing More Than 100 Korean Shows To India",
"description": "Multi-year deal with Korean studio CJ ENM covers 26 new titles, including Yumi's Cells Season 3, alongside library titles.",
"keywords": "",
"snippet": "Prime Video India has signed a multi-year deal with Korean studio CJ ENM through which a slate of 26 new titles will be rolled out in India over the next two ye...",
"url": "https://deadline.com/2026/07/prime-video-india-cj-enm-korean-shows-1237004230/",
"image_url": "https://deadline.com/wp-content/uploads/2026/07/PV-x-CJ-ENM.jpeg?w=1024",
"language": "en",
"published_at": "2026-07-27T10:04:27.000000Z",
"source": "deadline.com",
"categories": [
"entertainment"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "98e29f76-f4a5-4b09-870a-f8d6c21f267e",
"title": "Why the right is freaking out about “third worldism”",
"description": "Conservatives are ginning up a familiar panic about subversive leftists — but also getting at something real.",
"keywords": "",
"snippet": "is a senior correspondent at Vox, where he covers ideology and challenges to democracy, both at home and abroad. His book on democracy,, was published 0n July 1...",
"url": "https://www.vox.com/politics/496566/third-worldism-trump-rubio-cuba",
"image_url": "https://platform.vox.com/wp-content/uploads/sites/2/2026/07/gettyimages-802512056.jpg?quality=90&strip=all&crop=0%2C16.27372884078%2C100%2C67.45254231844&w=1200",
"language": "en",
"published_at": "2026-07-27T10:03:57.000000Z",
"source": "vox.com",
"categories": [
"general",
"politics",
"entertainment"
],
"relevance_score": null,
"locale": "us"
},
{
"uuid": "e4b9ed8f-2f08-47ea-83ac-bb704b9bea15",
"title": "Iran live updates: 'No negotiations' ongoing with US, Iranian official says",
"description": "President Donald Trump announced \"major combat operations\" against Iran on Feb. 28, with massive joint U.S.-Israeli strikes.",
"keywords": "LiveBlog, 135110405",
"snippet": "Amid the brief pause in the war between the U.S. and Iran, Iranian Foreign Ministry spokesperson Esmaeil Baghaei told journalists at his weekly press conference...",
"url": "https://abcnews.com/International/live-updates/iran-live-updates-tehran-progress-made-strait-hormuz/?id=135110405",
"image_url": "https://i.abcnewsfe.com/a/2e651ca0-90e6-4294-acac-086a3ee617cd/CENTCOM-tanker-DB-260727_1785146447820_hpMain_16x9.jpg?w=1600",
"language": "en",
"published_at": "2026-07-27T10:03:29.000000Z",
"source": "abcnews.go.com",
"categories": [
"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-07-27T10:57:59 |
2026-07-27T10:57 |
2026-07-27T10 |
2026-07-27 |
2026-07 |
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-07-27T10:57:59 |
2026-07-27T10:57 |
2026-07-27T10 |
2026-07-27 |
2026-07 |
2026
|
published_on |
false | Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-07-27
|
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": 54246070,
"returned": 10,
"limit": 10,
"page": 1
},
"data": [
{
"uuid": "1ac0fd60-98ea-4ff4-9b6e-ad164329a575",
"title": "코스모로보틱스, 뇌파로 재활로봇 제어하는 기술 장착 - 로봇신문",
"description": "글로벌 웨어러블 재활로봇 전문기업 코스모로보틱스가 뇌파 헤드셋을 통해 사용자가 직접 재활로봇을 제어할 수 있는 ?...",
"keywords": "",
"snippet": "▲보행 장애를 겪고 있는 한 성인이 23일 중국 정저우의 허난산보(河南三博)뇌병원에서 ‘뇌-컴퓨터 인터페이스(BCI)’ 기...",
"url": "https://www.irobotnews.com/news/articleView.html?idxno=47616",
"image_url": "https://cdn.irobotnews.com/news/photo/202607/47616_102195_5721.jpg",
"language": "ko",
"published_at": "2026-07-27T10:57:58.000000Z",
"source": "irobotnews.com",
"categories": [
"tech"
],
"relevance_score": null
},
{
"uuid": "8dd1c33e-4858-4c47-bde0-86c4bc058500",
"title": "LG CNS, 글로벌 AI 신소재 연합 창립멤버 선정 - 정보통신신문",
"description": "[정보통신신문=박남수기자]LG CNS가 인공지능(AI) 신소재 개발 협력체에 한국 IT 분야 대표 멤버로 합류하며 국내 소재 기업...",
"keywords": "",
"snippet": "LG CNS 본사 전경\n\n[정보통신신문=박남수기자]\n\nLG CNS가 인공지능(AI) 신소재 개발 협력체에 한국 IT 분야 대표 멤버로 합류하...",
"url": "https://www.koit.co.kr/news/articleView.html?idxno=208172",
"image_url": "https://cdn.koit.co.kr/news/photo/202607/208172_97932_5730.jpg",
"language": "ko",
"published_at": "2026-07-27T10:57:42.000000Z",
"source": "koit.co.kr",
"categories": [
"tech"
],
"relevance_score": null
},
{
"uuid": "56ecca93-6cb9-45b8-8970-add7446b426e",
"title": "중국 CXMT 드디어 상장...장중, 중국 반도체주는 '뚝'",
"description": "[초이스경제 최원석 기자] 27일 해당 증권거래소에 따르면 이날 오전 장초반(한국시각 오전 10시 38분 기준) 중국증시 주요...",
"keywords": "",
"snippet": "중국 상하이 시내. /사진=신화통신, 뉴시스\n\n[초이스경제 최원석 기자] 27일 해당 증권거래소에 따르면 이날 오전 장초반(?...",
"url": "http://www.choicenews.co.kr/news/articleView.html?idxno=168798",
"image_url": "https://cdn.choicenews.co.kr/news/thumbnail/202607/168798_128603_53_v150.jpg",
"language": "ko",
"published_at": "2026-07-27T10:57:41.000000Z",
"source": "choicenews.co.kr",
"categories": [],
"relevance_score": null
},
{
"uuid": "3e736f31-fb96-41f3-b4eb-9bb88ab500ad",
"title": "好货囤住:冈本SKIN经典15片18.9元到手",
"description": "好货囤住:冈本SKIN经典15片18.9元到手",
"keywords": ", 好货囤住:冈本SKIN经典15片18.9元到手, 快科技",
"snippet": "作者私密文章,无浏览权限\n\n因版权限制,过往内容只提供给老鸟级别及以上用户访问",
"url": "https://news.mydrivers.com/1/1139/1139212.htm",
"image_url": "https://img1.mydrivers.com/img/20260727/2dc9873972c644d79f67d3a5e877817e.png",
"language": "zh",
"published_at": "2026-07-27T10:57:30.000000Z",
"source": "news.mydrivers.com",
"categories": [
"tech",
"general"
],
"relevance_score": null
},
{
"uuid": "0ffef4e3-3d17-40f5-bbc1-48a13d8abe38",
"title": "CJ대한통운, AI로 과대포장 줄인다…한국환경공단과 검증체계 구축",
"description": "CJ대한통운이 한국환경공단과 함께 인공지능(AI)을 활용해 과대포장 규제 준수를 지원하는 검증 체계를 마련하고, 적정포...",
"keywords": "",
"snippet": "▲'AI 기반 스마트 적정포장 체계 구축 및 운영'을 위한 업무협약식에 참석한 문갑생 한국환경공단 자원순환이사(왼쪽), ?...",
"url": "https://www.klnews.co.kr/news/articleView.html?idxno=322049",
"image_url": "https://cdn.klnews.co.kr/news/thumbnail/202607/322049_65362_5642_v150.jpg",
"language": "ko",
"published_at": "2026-07-27T10:57:15.000000Z",
"source": "klnews.co.kr",
"categories": [
"general"
],
"relevance_score": null
},
{
"uuid": "34c22b81-4e01-4b5a-b959-b9add7aab773",
"title": "特步儿童跳绳日常价29元 领10元券 叠加淘金币9块钱到手",
"description": "特步儿童跳绳日常价29元 领10元券 叠加淘金币9块钱到手",
"keywords": ", 特步儿童跳绳日常价29元 领10元券 叠加淘金币9块钱到手, 快科技",
"snippet": "作者私密文章,无浏览权限\n\n因版权限制,过往内容只提供给老鸟级别及以上用户访问",
"url": "https://news.mydrivers.com/1/1139/1139211.htm",
"image_url": "https://img1.mydrivers.com/img/20260727/0517441c5bae49c2a08d705d3562a74b.png",
"language": "zh",
"published_at": "2026-07-27T10:57:10.000000Z",
"source": "news.mydrivers.com",
"categories": [
"tech",
"general"
],
"relevance_score": null
},
{
"uuid": "f93fb047-db74-49ea-aed5-57b28efb83b9",
"title": "'백투백' 전망 확산 속 터미널 금리 상향 가능성에도 '촉각'",
"description": "8월에 기준금리를 연속 인상하는 백투백 전망이 확산하는 가운데 이번 인상 사이클에서 최종금리, 즉 터미널 레이트가 ?...",
"keywords": "",
"snippet": "(서울=연합인포맥스) 정선미 기자 = 8월에 기준금리를 연속 인상하는 백투백 전망이 확산하는 가운데 이번 인상 사이클에...",
"url": "https://news.einfomax.co.kr/news/articleView.html?idxno=4427005",
"image_url": "https://cdn.news.einfomax.co.kr/news/thumbnail/202607/4427005_332265_572_v150.jpg",
"language": "ko",
"published_at": "2026-07-27T10:56:04.000000Z",
"source": "t240.ndsoftnews.com",
"categories": [],
"relevance_score": null
},
{
"uuid": "93e42401-848d-4b42-9561-b3f5a72b9ab6",
"title": "하나증권, 외국인통합계좌 거래 개시...글로벌 네트워크 강화",
"description": "하나증권은 홍콩에 기반을 둔 푸투증권과 외국인통합계좌 서비스를 이달 말부터 시작한다고 27일 밝혔다. 지난해 10월 국...",
"keywords": "하나증권, 외국인통합계좌",
"snippet": "하나증권은 홍콩에 기반을 둔 푸투증권과 외국인통합계좌 서비스를 이달 말부터 시작한다고 27일 밝혔다. 사진=하나증권...",
"url": "http://www.ftoday.co.kr/news/articleView.html?idxno=362620",
"image_url": "https://cdn.ftoday.co.kr/news/thumbnail/202607/362620_371418_488_v150.jpg",
"language": "ko",
"published_at": "2026-07-27T10:56:03.000000Z",
"source": "ftoday.co.kr",
"categories": [],
"relevance_score": null
},
{
"uuid": "3319d7d0-602d-4853-b692-d2b285a5fa6b",
"title": "Arabian Pipes, Al Naqool go ex-bonus today",
"description": "Shares of Tadawul-listed Arabian Pipes Co. and Nomu-listed Mohammed Hasan Al Naqool Sons Co. have their ex-bonus today, July 27, if the general assemb",
"keywords": "At Argaam Plus, you get up to date news on Saudi Stock Market tadawul, stock quotes, company performance, Market data and analysis. Top companies Sabic, Maaden, Banks, Petrochemicals",
"snippet": "Agree\n\nArgaam Investment Company has updated the Privacy Policy of its services and digital platforms. Know more about our Privacy Policy here.\n\nArgaam uses coo...",
"url": "https://www.argaam.com/en/article/articledetail/id/1923321",
"image_url": "https://argaamplus.s3.amazonaws.com/c10f4e3a-9da4-439b-a5ea-4c9f21d8e62a.png",
"language": "en",
"published_at": "2026-07-27T10:56:00.000000Z",
"source": "argaam.com",
"categories": [
"business"
],
"relevance_score": null
},
{
"uuid": "9d0d4042-e24b-4d20-aabb-ce9c07a43cdf",
"title": "이종배 의원 ‘교육교부금 지출 성과 매년 분석·공개’ 개정안 대표발의",
"description": "[충청투데이 김의상 기자] 이종배 국민의힘 의원(충북 충주·4선)은 27일 지방교육재정교부금의 지출 성과를 매년 분석·?...",
"keywords": "교육재정, 대통령령, 중등교육, 다문화, 미래세, 인건비, 필요성, 교육청",
"snippet": "이종배 4선 국회의원.\n\n[충청투데이 김의상 기자] 이종배 국민의힘 의원(충북 충주·4선)은 27일 지방교육재정교부금의 지?...",
"url": "https://www.cctoday.co.kr/news/articleView.html?idxno=2233835",
"image_url": "https://cdn.cctoday.co.kr/news/photo/202607/2233835_690908_5904.jpg",
"language": "ko",
"published_at": "2026-07-27T10:55:48.000000Z",
"source": "cctoday.co.kr",
"categories": [
"general"
],
"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-07-27T10:57:59 |
2026-07-27T10:57 |
2026-07-27T10 |
2026-07-27 |
2026-07 |
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-07-27T10:57:59 |
2026-07-27T10:57 |
2026-07-27T10 |
2026-07-27 |
2026-07 |
2026
|
published_on |
false | Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-07-27
|
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-07-20
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();