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: 2025-01-16
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": "86b473db-7834-4af4-b8e3-5102acec34b5",
                "title": "Trump claims credit for Gaza ceasefire deal. Here’s what we know.",
                "description": "Does Trump deserve credit for the Gaza ceasefire deal? It's impossible to know fully, but his influence and team involvement seem to have at least played a role in reaching an agreement.",
                "keywords": "",
                "snippet": "Confirmation of a ceasefire and hostage release deal couldn’t have come a moment sooner for the more than 2 million Palestinians in Gaza who have been living ...",
                "url": "https://www.msnbc.com/opinion/msnbc-opinion/israel-hamas-ceasefire-hostage-deal-trump-biden-credit-rcna187831",
                "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-05/240502-Donald-Trump-Benjamin-Netanyahu-ch-1018-230085.jpg",
                "language": "en",
                "published_at": "2025-01-16T11:00:00.000000Z",
                "source": "msnbc.com",
                "categories": [
                    "general",
                    "politics"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "39eff1f4-3ace-4211-bc56-62eb44364b10",
                        "title": "Biden warns of 'ultra-wealthy' 'oligarchy' after Big Tech CEOs warm to Trump",
                        "description": "President Biden in his farewell speech warned of an \"ultra-wealthy\" \"oligarchy\" posing a threat to America as CEOs from big tech companies recently have been warming up to President-elect Trump.",
                        "keywords": "",
                        "snippet": "President Biden warned in his farewell speech of an \"ultra-wealthy\" \"oligarchy\" posing a threat to America as big tech CEOS have been warming up to President-el...",
                        "url": "https://www.foxnews.com/politics/biden-warns-ultra-wealthy-oligarchy-after-big-tech-ceos-warm-trump",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2025/01/elon-musk-donald-trump-2.jpg",
                        "language": "en",
                        "published_at": "2025-01-16T13:30:29.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "d5f7e617-9cc3-4479-bd15-792d7d718de8",
                        "title": "Daniel Levy, Muhammad Shehada, Jeremy Scahill on Ceasefire Deal, Trump’s Role & Palestine’s Future",
                        "description": "We host a roundtable on the planned Gaza ceasefire with former Israeli peace negotiator Daniel Levy of the U.S./Middle East Project, Gazan analyst Muhammad Shehada of the Euro-Mediterranean Human Rights Monitor and journalist Jeremy Scahill of Drop Site News. We discuss how incoming President Trump’s Middle East envoy Steve Witkoff pressured Israel to accept the deal and what it reveals about the outgoing Biden administration’s refusal to use its own leverage for the same end. “Joe Biden could have ended this long ago,” and that he chose not to “exposes the utter moral rot that existed within the Biden White House,” says Scahill. Still, our guests say it’s unlikely that the ceasefire announcement signifies true relief for Palestinians beset by Israel’s genocidal violence. Levy says Netanyahu is already working to renege on the deal and continue a war that has helped him retain his political power, while Shehada warns that all signs point to the continued subjugation of the Occupied Palestinian Territories in conditions “more painful than the war.”",
                        "keywords": "",
                        "snippet": "We host a roundtable on the planned Gaza ceasefire with former Israeli peace negotiator Daniel Levy of the U.S./Middle East Project, Gazan analyst Muhammad Sheh...",
                        "url": "https://www.democracynow.org/2025/1/16/gaza_ceasefire_deal_analysis",
                        "image_url": "https://www.democracynow.org/images/story/79/75379/full_hd/seg-Gaza-trio-comments.jpg",
                        "language": "en",
                        "published_at": "2025-01-16T13:25:36.000000Z",
                        "source": "democracynow.org",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "f1419e1c-fe65-409b-9cd8-6f066c9acf91",
                        "title": "Nolte: Far-left NBC Sends Anti-Trump Activist Yamiche Alcindor to White House Briefing Room",
                        "description": "NBC News is signaling nothing will change by announcing that anti-Trump activist Yamiche Alcindor will return to the White House.",
                        "keywords": "",
                        "snippet": "Far-left NBC News is signaling nothing will change by announcing anti-Trump activist Yamiche Alcindor will return to the White House briefing room.\n\n“I’m he...",
                        "url": "https://www.breitbart.com/the-media/2025/01/16/nolte-far-left-nbc-sends-anti-trump-activist-yamiche-alcindor-to-white-house-briefing-room/",
                        "image_url": "https://media.breitbart.com/media/2025/01/Yamiche-Alcindor-640x335.jpg",
                        "language": "en",
                        "published_at": "2025-01-16T15:06:01.000000Z",
                        "source": "breitbart.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "74245466-378d-460c-8dea-24460f8e82aa",
                        "title": "Anti-Trump columnist delivers withering assessment of 'failed' Biden presidency as he leaves office",
                        "description": "Anti-Trump columnist for The Washington Post, George Will, wrote a scathing op-ed of President Biden's actions as president as he prepares to leave office.",
                        "keywords": "",
                        "snippet": "Anti-Trump columnist with The Washington Post, George Will, offered a scathing assessment of President Biden's \"failed\" presidency in a Wednesday column.\n\n\"Joe ...",
                        "url": "https://www.foxnews.com/media/anti-trump-columnist-delivers-withering-assessment-failed-biden-presidency-leaves-office",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2021/03/Biden-washington-post.jpg",
                        "language": "en",
                        "published_at": "2025-01-16T18:51:11.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "a56c4bb4-7365-464d-9f22-5dc3a32c9c5e",
                        "title": "Progressive foreign policy experts credit Trump in striking Israel-Hamas cease-fire deal",
                        "description": "Progressive foreign policy leaders credited President-elect Trump for being a considerable influence on the cease-fire deal between Israel and Hamas.",
                        "keywords": "",
                        "snippet": "Progressive leaders in the foreign policy sphere are admitting that President-elect Donald Trump’s influence led to the cease-fire deal between Israel and ter...",
                        "url": "https://www.foxnews.com/media/progressive-foreign-policy-experts-credit-trump-israel-hamas-cease-fire-deal",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2020/10/donald-trump-control1.jpg",
                        "language": "en",
                        "published_at": "2025-01-16T19:00:43.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    }
                ]
            },
            {
                "uuid": "13f3be1a-c888-4d5c-b162-e981627633a9",
                "title": "Jeff Bezos' New Glenn rocket reaches orbit on first test flight",
                "description": "Blue Origin launched its massive new rocket on its first test flight Thursday, sending up a prototype satellite to orbit thousands of miles above Earth.",
                "keywords": "",
                "snippet": "CAPE CANAVERAL, Fla. — Blue Origin launched its massive new rocket on its first test flight Thursday, sending up a prototype satellite to orbit thousands of m...",
                "url": "https://www.nbcnews.com/science/space/jeff-bezos-new-glenn-rocket-reaches-orbit-first-test-flight-rcna187929",
                "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2025-01/250116-blue-origin-mb-1307-91edb4.jpg",
                "language": "en",
                "published_at": "2025-01-16T13:51:34.000000Z",
                "source": "nbcnews.com",
                "categories": [
                    "general",
                    "politics"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "c7874670-fd8f-4a90-9242-27bf30ecf31e",
                        "title": "Jeff Bezos' Blue Origin launches New Glenn rocket into orbit",
                        "description": "Jeff Bezos' Blue Origin launches its massive new rocket, called the New Glenn, into orbit the Earth on its first test flight. The space company attempted to land the rocket’s booster on a barrage in the Atlantic Ocean, but it was lost during reentry through the atmosphere.",
                        "keywords": "",
                        "snippet": "\n\nCopied\n\nJeff Bezos' Blue Origin launches its massive new rocket, called the New Glenn, into orbit the Earth on its first test flight. The space company attemp...",
                        "url": "https://www.today.com/video/jeff-bezos-blue-origin-launches-new-glenn-rocket-into-orbit-229466693625",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_social_share_1200x630_center,f_auto,q_auto:best/mpx/2704722219/2025_01/1737035282221_tdy_news_8a_blue_origin_250116_1920x1080-00zng2.jpg",
                        "language": "en",
                        "published_at": "2025-01-16T13:48:06.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "tech"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "10e1d638-72c2-4e74-874c-03be245bc39a",
                        "title": "Blue Origin successfully launches new Glenn rocket, booster fails to land safely",
                        "description": "Blue Origin launched its new Glenn rocket early Thursday, sending a test satellite into orbit. The mission wasn't a complete success though, the booster crashed while trying to land on a platform in the Atlantic Ocean.",
                        "keywords": "Blue Origin, Atlantic Ocean",
                        "snippet": "Blue Origin successfully launches new Glenn rocket, booster fails to land safely Blue Origin launched its new Glenn rocket early Thursday, sending a test satell...",
                        "url": "https://www.cbsnews.com/video/blue-origin-successfully-launches-new-glenn-rocket-booster-fails-to-land-safely/",
                        "image_url": "https://assets2.cbsnewsstatic.com/hub/i/r/2025/01/16/da1f30fa-fc26-4aab-a405-186892d4cf0f/thumbnail/1200x630/a9235185359cfaabe9c3e37c94782ac4/cbsn-fusion-blue-origin-successfully-launches-new-glenn-rocket-booster-fails-to-land-safely-thumbnail.jpg?v=b96653698c03046ba0de2764525fc2d3",
                        "language": "en",
                        "published_at": "2025-01-16T14:16:00.000000Z",
                        "source": "cbsnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "7777732e-b320-44f6-8a9d-45d7e2023115",
                        "title": "New Glenn Rocket Launch Marks a Big Moment for Jeff Bezos' Blue Origin",
                        "description": "The New Glenn makes it safely into orbit for the inaugural test flight of a rocket that could rival those in Elon Musk's SpaceX fleet.",
                        "keywords": "",
                        "snippet": "Amazon founder Jeff Bezos' space dreams are taking flight on a new level.\n\nOn Thursday, Bezos' Blue Origin company launched its big rocket, called New Glenn. It...",
                        "url": "https://www.cnet.com/science/space/new-glenn-rocket-launch-marks-a-big-moment-for-jeff-bezos-blue-origin/#ftag=CAD590a51e",
                        "image_url": "https://www.cnet.com/a/img/resize/adb28e24b551f2d0823764143bf3e1757535f3dc/hub/2025/01/07/f79930b9-0b14-48e4-85f4-93a6b2dc026b/newglenn.jpg?auto=webp&fit=crop&height=675&width=1200",
                        "language": "en",
                        "published_at": "2025-01-16T16:15:51.000000Z",
                        "source": "cnet.com",
                        "categories": [
                            "tech",
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "0303c986-7a55-42bd-87bc-9290a65a143d",
                        "title": "Blue Origin conducts 1st test flight of massive rocket",
                        "description": "The Jeff Bezos-founded space company conducted a mostly successful test flight of its 320-foot-tall New Glenn rocket",
                        "keywords": "",
                        "snippet": "What happened\n\nBlue Origin, the space company founded by Amazon's Jeff Bezos, conducted the first test flight of its 320-foot-tall New Glenn rocket Thursday mor...",
                        "url": "https://theweek.com/science/blue-origin-new-glenn-rocket-launch",
                        "image_url": "https://cdn.mos.cms.futurecdn.net/nyeoSAVKXYRtiMqhPvqVQW-1200-80.jpg",
                        "language": "en",
                        "published_at": "2025-01-16T17:25:48.000000Z",
                        "source": "theweek.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "2a0d91f9-14ff-4825-8c78-9152be112212",
                        "title": "Details on Blue Origin's launch of its New Glenn rocket",
                        "description": "Blue Origin's New Glenn rocket was launched Thursday morning in Florida following a three-day delay. Derrick Pitts, chief astronomer from the Franklin Institute, joined CBS News to discuss the launch.",
                        "keywords": "Blue Origin, Space",
                        "snippet": "Details on Blue Origin's launch of its New Glenn rocket Blue Origin's New Glenn rocket was launched Thursday morning in Florida following a three-day delay. Der...",
                        "url": "https://www.cbsnews.com/video/details-on-blue-origins-launch-of-its-new-glenn-rocket/",
                        "image_url": "https://assets2.cbsnewsstatic.com/hub/i/r/2025/01/16/f7771888-1985-46ff-a33e-7794de45c78b/thumbnail/1200x630/5290e07c67cc9cf0a65d3e3bf7fee836/cbsn-fusion-details-on-blue-origins-launch-of-its-new-glenn-rocket-thumbnail.jpg?v=b96653698c03046ba0de2764525fc2d3",
                        "language": "en",
                        "published_at": "2025-01-16T16:58:00.000000Z",
                        "source": "cbsnews.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,keywords
Default: 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: 2025-01-16T22:42:20 | 2025-01-16T22:42 | 2025-01-16T22 | 2025-01-16 | 2025-01 | 2025
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: 2025-01-16T22:42:20 | 2025-01-16T22:42 | 2025-01-16T22 | 2025-01-16 | 2025-01 | 2025
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2025-01-16
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": 1209411,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "aed25bfa-d776-42bd-939d-7bc0eeb27da5",
            "title": "Looking for his father, a worried son went to fire evacuation zone but found death and devastation",
            "description": "An 84-year-old man who was killed in the California wildfires had immigrated to the U.S. from China in 1989, and loved his Altadena home and the California fres...",
            "keywords": "Wildfires, Los Angeles Area wildfires, California, Los Angeles, China, Fires, General news, Domestic News, CA State Wire, Lyft, Inc., U.S. news",
            "snippet": "LOS ANGELES (AP) — Shaw Zhao was worried even before he arrived in Los Angeles last week: His father’s neighborhood was in an evacuation zone as deadly wild...",
            "url": "https://apnews.com/article/california-wildfires-victim-zhao-altadena-a59f2cf70d1b0f6736b4819031b3727c",
            "image_url": "https://dims.apnews.com/dims4/default/6904878/2147483647/strip/true/crop/6000x3375+0+312/resize/1440x810!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F26%2F08%2F57bf4d73ca6ac77421b67fded47e%2F5cd15fad6b764048b497b83e7e5726b7",
            "language": "en",
            "published_at": "2025-01-16T22:23:04.000000Z",
            "source": "apnews.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "ca8d5ad2-82ec-4662-bd17-59f24942e3e3",
            "title": "AP Exclusive: Egypt’s chief diplomat urges Israel and Hamas to enact ceasefire ‘without any delay’",
            "description": "Egypt’s chief diplomat is calling on Israel and Hamas to implement a Gaza ceasefire plan “without any delay.”",
            "keywords": "Israel-Hamas war, Benjamin Netanyahu, Egypt, Joe Biden, Hamas, Israel, Donald Trump, Badr Abdelatty, Israel government, Middle East, International agreements, Europe, War and unrest, General news, Palestinian territories government, European Union, Egypt government, World news, United States government",
            "snippet": "NEW ADMINISTRATIVE CAPITAL, Egypt (AP) — Egypt’s chief diplomat on Thursday called on Israel and Hamas to implement a Gaza ceasefire plan “without any del...",
            "url": "https://apnews.com/article/ceasefire-egypt-gaza-hamas-israel-eu-war-3e434d5612f62ee5b188acf74f65f1fb",
            "image_url": "https://dims.apnews.com/dims4/default/d7cb79e/2147483647/strip/true/crop/4724x2657+0+246/resize/1440x810!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F14%2Fb2%2Fdbf26d9373db9e1b37b3a9bae45b%2F2ca2db62997542b685c1b09dc637a348",
            "language": "en",
            "published_at": "2025-01-16T22:23:04.000000Z",
            "source": "apnews.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "2a564298-48f7-4cdb-807a-dfea8754407a",
            "title": "The Office Star Brian Baumgartner 'Proud' to Be Aaron Rodgers' Friend",
            "description": "In an exclusive interview with Us Weekly, ‘The Office’ star Brian Baumgartner discussed misconceptions about his good ‘misunderstood’ friend Aaron Rodge...",
            "keywords": "",
            "snippet": "The Office star Brian Baumgartner debunked some of the unsavory narratives surrounding his friend, Aaron Rodgers.\n\nThe actor, 52, met the NFL quarterback in the...",
            "url": "https://www.usmagazine.com/entertainment/news/the-office-star-brian-baumgartner-proud-to-be-aaron-rodgers-friend/",
            "image_url": "https://www.usmagazine.com/wp-content/uploads/2025/01/The-Office-Star-Brian-Baumgartner-Proud-to-Be-Aaron-Rodgers-Friend-1.jpg?crop=0px%2C0px%2C1998px%2C1051px&resize=1200%2C630&quality=78&strip=all",
            "language": "en",
            "published_at": "2025-01-16T22:15:02.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "9ee7f770-d234-4c0a-8439-3e1609c18177",
            "title": "CDC urges faster testing to find human bird flu cases",
            "description": "The CDC on Thursday urged labs nationwide to determine within 24 hours of admission whether people hospitalized with the flu have seasonal influenza or are infe...",
            "keywords": "",
            "snippet": "The Centers for Disease Control and Prevention on Thursday urged labs nationwide to determine within 24 hours of admission whether people hospitalized with the ...",
            "url": "https://www.nbcnews.com/health/health-news/cdc-urges-faster-testing-find-human-bird-flu-cases-rcna187870",
            "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-09/240916-chickens-al-0903-779339.jpg",
            "language": "en",
            "published_at": "2025-01-16T22:14:50.000000Z",
            "source": "nbcnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "70c50388-37a3-419f-9ee1-cb8fd058e044",
            "title": "Watch SpaceX launch Starship flight testing how it will deploy satellites in space",
            "description": "SpaceX is set to launch the seventh test flight of its Starship rocket on Thursday.",
            "keywords": "Space industry, Technology, Aerospace and defense industry, Transportation, Business, The Edge, Breaking News: Technology, Breaking News: Business, Science, Brownsville, Elon Musk, business news",
            "snippet": "SpaceX is set to launch the seventh test flight of its Starship rocket on Thursday, as the company looks to push development of the mammoth vehicle further, inc...",
            "url": "https://www.cnbc.com/2025/01/16/spacex-launch-starship-flight-seven-starlink-satellite-test.html",
            "image_url": "https://image.cnbcfm.com/api/v1/image/108087954-1737061639456-gettyimages-2193392421-AFP_36TX99C.jpeg?v=1737061693&w=1920&h=1080",
            "language": "en",
            "published_at": "2025-01-16T22:14:02.000000Z",
            "source": "cnbc.com",
            "categories": [
                "general",
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "20a1e60b-fe12-4f3d-b290-9a7db8ac5e93",
            "title": "Snap shares drop as FTC refers MyAI chatbot complaint to the DOJ",
            "description": "Snap shares closed down 5% on Thursday after the Federal Trade Commission said it would refer a complaint against the company to the Department of Justice.",
            "keywords": "Breaking News: Technology, Social media, Mobile, Technology, Internet, Snap Inc, business news",
            "snippet": "Snap shares closed down 5% on Thursday after the Federal Trade Commission said it would refer a complaint against the company to the Department of Justice.\n\nThe...",
            "url": "https://www.cnbc.com/2025/01/16/snap-shares-drop-as-ftc-refers-complaint-to-the-doj.html",
            "image_url": "https://image.cnbcfm.com/api/v1/image/108035471-1726677566677-108035471-1726600240512-SPIEGEL_3.jpg?v=1726677573&w=1920&h=1080",
            "language": "en",
            "published_at": "2025-01-16T22:12:20.000000Z",
            "source": "cnbc.com",
            "categories": [
                "general",
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "80836b38-7d14-4279-8190-408891dfc533",
            "title": "The rise of illegal gold mining in Africa",
            "description": "In South Africa, a months-long standoff between police and illegal gold miners has resulted in over 100 deaths. This surge in illegal gold mining has highlighte...",
            "keywords": "",
            "snippet": "In South Africa, a months-long standoff between police and illegal gold miners has resulted in over 100 deaths. This surge in illegal gold mining has highlighte...",
            "url": "https://www.nbcnews.com/now/video/the-rise-of-illegal-gold-mining-in-africa-229522501519",
            "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/mpx/2704722219/2025_01/1737065240540_now_daily_b_goldmining_africa_250116_1920x1080-kt95gw.jpg",
            "language": "en",
            "published_at": "2025-01-16T22:07:28.000000Z",
            "source": "nbcnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "7814f94a-8a90-4ae6-b73d-75221c1355aa",
            "title": "Commanders kicker Zane Gonzalez embraces OCD after viral pregame kick routine: 'It's who I am'",
            "description": "Zane Gonzalez, the kicker who hit the game-winning field goal in the wild-card round, has an unorthodox game day routine – but it has little to do with style.",
            "keywords": "",
            "snippet": "Zane Gonzalez is opening up about his relationship with obsessive-compulsive disorder (OCD) after television cameras captured his pre-kick routine during this p...",
            "url": "https://www.foxnews.com/sports/commanders-kicker-zane-gonzalez-embraces-ocd-after-viral-pregame-kick-routine-its-who-i-am",
            "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2025/01/zane-gonzalez-washington.jpg",
            "language": "en",
            "published_at": "2025-01-16T22:05:21.000000Z",
            "source": "foxnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "5a95c5f4-644a-439b-9692-fc3f888ba660",
            "title": "Filmmaker behind homelessness documentary lost home to California fire",
            "description": "ABC News' Linsey Davis speaks to filmmaker Ondi Timoner about her new film",
            "keywords": "Article, 117697564",
            "snippet": "Filmmaker Ondi Timoner discusses her new film \"The INN Between,\" which documents the year she spent capturing the lives of hospice residents who finally have a ...",
            "url": "https://abcnews.go.com/US/filmmaker-homelessness-documentary-lost-home-california-fire/story?id=117697564",
            "image_url": "https://i.abcnewsfe.com/a/fa415bfd-2b55-46f2-bc2b-cdc2eead9f0b/ondi-timoner-gty-jef-250116_1737059315060_hpMain_16x9.jpg?w=1600",
            "language": "en",
            "published_at": "2025-01-16T22:04:01.000000Z",
            "source": "abcnews.go.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "3163b29b-450f-4518-a994-1964876f40cf",
            "title": "Politics: Donald Trump's Cabinet picks will go through without a hitch",
            "description": "Pete Hegseth fails at the Capitol but Republicans will graduate him to the Pentagon",
            "keywords": "",
            "snippet": "This week, Emily Bazelon, John Dickerson, and David Plotz discuss the Senate confirmation hearings of Donald Trump’s Cabinet nominees, including Pete Hegseth ...",
            "url": "https://slate.com/podcasts/political-gabfest/2025/01/politics-donald-trumps-cabinet-pete-hegseth-secretary-defense-jack-smith-report-joe-biden?via=rss",
            "image_url": "https://compote.slate.com/images/196383ed-f02e-4256-9c2e-54ea84532eb6.jpeg?crop=5818%2C3879%2Cx0%2Cy0&width=1560",
            "language": "en",
            "published_at": "2025-01-16T22:00:00.000000Z",
            "source": "slate.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,keywords
Default: 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: 2025-01-16T22:42:20 | 2025-01-16T22:42 | 2025-01-16T22 | 2025-01-16 | 2025-01 | 2025
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: 2025-01-16T22:42:20 | 2025-01-16T22:42 | 2025-01-16T22 | 2025-01-16 | 2025-01 | 2025
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2025-01-16
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": 50058102,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "8581df6a-a726-42a4-8f2e-594e651ea23c",
            "title": "基礎年金改革29年以降に判断 厚労省、給付水準底上げ先送り|【西日本新聞me】",
            "description": "厚生労働省は、全ての国民が受け取る基礎年金(国民年金)を底上げする改革を実施するかどうかの判断を2029年以降に...",
            "keywords": "西日本新聞me, 西日本新聞, ニュース, 九州, 福岡",
            "snippet": "厚生労働省は、全ての国民が受け取る基礎年金(国民年金)を底上げする改革を実施するかどうかの判断を2029年以降に...",
            "url": "https://www.nishinippon.co.jp/item/o/1304557/",
            "image_url": "https://www.nishinippon.co.jp/assets/nnp/img/base/og_image.png",
            "language": "ja",
            "published_at": "2025-01-16T22:42:43.000000Z",
            "source": "nishinippon.co.jp",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "81670abf-b911-4858-967b-6b9d20900af9",
            "title": "百万卡宴借给朋友 肇事逃逸后保险拒赔!车主索赔20万贬值损失",
            "description": "百万卡宴借给朋友 肇事逃逸后保险拒赔!车主索赔20万贬值损失",
            "keywords": ", 百万卡宴借给朋友 肇事逃逸后保险拒赔!车主索赔20万贬值损失, 快科技",
            "snippet": "百万卡宴借给朋友 肇事逃逸后保险拒赔!车主索赔20万贬值损失\n\n快科技1月16日消息,据博主“检车家”透露,成都一位?...",
            "url": "https://news.mydrivers.com/1/1025/1025768.htm",
            "image_url": "https://img1.mydrivers.com/img/20250116/7ab075d251604420b8080f3ab625343f.png",
            "language": "zh",
            "published_at": "2025-01-16T22:42:14.000000Z",
            "source": "news.mydrivers.com",
            "categories": [
                "tech",
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "61c8a920-48b3-4571-83bf-1be1142b6836",
            "title": "New Study Finds 73% of Hoteliers Believe AI Will Transform Hospitality",
            "description": "Findings reveal that the majority of hoteliers are allocating significant budgets for AI tools.",
            "keywords": "",
            "snippet": "Canary Technologies\n\n, a Guest Management System, announced the release of its research report on AI trends in the hospitality industry, titled\n\nNavigating AI: ...",
            "url": "https://hospitalitytech.com/news-briefs/2025-01-16?article=new-study-finds-73-hoteliers-believe-ai-will-transform-hospitality",
            "image_url": "https://hospitalitytech.com/images/v/16_x_9_480/s3fs-public/s3/2025-01/canary_tech_ai_report_2025.jpg",
            "language": "en",
            "published_at": "2025-01-16T22:42:09.000000Z",
            "source": "hospitalitytech.com",
            "categories": [
                "travel"
            ],
            "relevance_score": null
        },
        {
            "uuid": "53fb4f8f-a06f-4686-9748-f07c6ed53ca8",
            "title": "最新研发的人工智能模型能即时翻译101种语言—新闻—科学网",
            "description": "",
            "keywords": "《自然》, 人工智能, 模型, 即时翻译, [mynews.keys]",
            "snippet": "",
            "url": "https://news.sciencenet.cn/htmlnews/2025/1/537626.shtm",
            "image_url": "https://news.sciencenet.cn//upload/news/images/2025/1/2025114221462920.jpg",
            "language": "zh",
            "published_at": "2025-01-16T22:41:00.000000Z",
            "source": "news.sciencenet.cn",
            "categories": [
                "general",
                "science",
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "6b0c0c90-ca04-4b7e-a92c-69c4591a21d2",
            "title": "\"Come Ridevamo\" con Arbore e Telesforo",
            "description": "Mezzo secolo di risate",
            "keywords": "",
            "snippet": "Quando Renzo Arbore e Roberto Benigni portarono le loro mamme in Tv: accadde nel 1980 in una storica ed esilarante gag nella trasmissione “Drim”, con Franco...",
            "url": "https://www.rai.it/ufficiostampa/assets/template/us-articolo.html?ssiPath=/articoli/2025/01/Come-Ridevamo-con-Arbore-e-Telesforo-f591cd8e-57b2-4f62-b7bc-d2d98cf25cf7-ssi.html",
            "image_url": "http://www.rai.it/cropgd/560x292/dl/img/2025/01/07/1600x900_1736255744646_tommorw%20series%20-%202025-01-07T142213.711.jpg",
            "language": "it",
            "published_at": "2025-01-16T22:40:00.000000Z",
            "source": "rai.it",
            "categories": [
                "business"
            ],
            "relevance_score": null
        },
        {
            "uuid": "550c69ab-9110-44b3-bbe4-956bba647c1f",
            "title": "트럼프, XRP·솔라나·USDC 전략 비축 검토…美 암호화폐 정책 대전환?",
            "description": "미국비트코인   16일(현지시간)암호화폐전문매체코인게이프에따르면,도널드트럼프대통령당선인이리플(XRP),솔라나(SOL)...",
            "keywords": "",
            "snippet": "",
            "url": "https://www.coinreaders.com/141288",
            "image_url": "https://www.coinreaders.com/imgdata/coinreaders_com/202411/800_450_2024112226062950.jpg",
            "language": "ko",
            "published_at": "2025-01-16T22:40:00.000000Z",
            "source": "coinreaders.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "943fc46d-163d-4daa-be6f-8ebddc685fd0",
            "title": "桂格即食燕麦片1478g*2 券后35.7元包邮",
            "description": "全谷物营养健康,燕麦遇多种食材的碰撞,含有膳食纤维和多种营养元素,轻松赶走饥饿,早餐省力又营养,美味随心享?...",
            "keywords": "",
            "snippet": "注意:商品是限时、限量、限地区促销,下单时可能已变化,请您核对并理解。",
            "url": "http://www.kiees.com/2021/01/22/858790.html",
            "image_url": "",
            "language": "zh",
            "published_at": "2025-01-16T22:39:38.000000Z",
            "source": "kiees.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "6ab4ecf0-e327-4f99-9ad8-d1c91bd217c1",
            "title": "Bulletin épigraphique 2021 : Thessalie",
            "description": "",
            "keywords": "",
            "snippet": "Article Dans Une Revue Revue des Études Grecques Année : 2021\n\nBruno Helly\n\nIdRef : 03063718X\n\nJean-Claude Decourt\n\nAfficher plus de détails\n\nDomaines Histoi...",
            "url": "https://hal.science/hal-04763519v1",
            "image_url": "https://hal.science/assets/favicon/apple-touch-icon.png",
            "language": "fr",
            "published_at": "2025-01-16T22:39:20.000000Z",
            "source": "hal.archives-ouvertes.fr",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "26ef6395-c38f-43f5-ba59-468a388b1c4f",
            "title": "【速報】横綱照ノ富士が現役引退の意向を固める|【西日本新聞me】",
            "description": "大相撲の横綱照ノ富士が現役引退の意向を固めたことが16日、分かった。日本相撲協会関係者が明らかにした。大相撲?...",
            "keywords": "西日本新聞me, 西日本新聞, ニュース, 九州, 福岡",
            "snippet": "大相撲の横綱照ノ富士が現役引退の意向を固めたことが16日、分かった。日本相撲協会関係者が明らかにした。",
            "url": "https://www.nishinippon.co.jp/item/o/1304550/",
            "image_url": "https://www.nishinippon.co.jp/uploads/image/1740470/sns_PN2025011601000559.-.-.CI0003.jpg",
            "language": "ja",
            "published_at": "2025-01-16T22:38:00.000000Z",
            "source": "nishinippon.co.jp",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "1bcedd5f-1e52-4a85-96ba-4aa8d016f457",
            "title": "Б.Л. Ерофалов. Символы архитектуры, или нумерологическое испытание архитектурной формы",
            "description": "",
            "keywords": "",
            "snippet": "",
            "url": "http://cwer.ru/node/569199/",
            "image_url": "http://cwer.ru/media/favicon.ico",
            "language": "ru",
            "published_at": "2025-01-16T22:37:37.000000Z",
            "source": "cwer.ru",
            "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: 2025-01-16T22:42:20 | 2025-01-16T22:42 | 2025-01-16T22 | 2025-01-16 | 2025-01 | 2025
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: 2025-01-16T22:42:20 | 2025-01-16T22:42 | 2025-01-16T22 | 2025-01-16 | 2025-01 | 2025
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2025-01-16
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=2025-01-09
    

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();