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-10-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": "866534f9-523c-4408-bf45-814f308edb68",
                "title": "Ex-FBI Director James Comey Charged with Federal Crimes in New Case",
                "description": "Ex-FBI Director James Comey has been charged with federal crimes for actions he took in distributing national defense information.",
                "keywords": "",
                "snippet": "Ex-FBI Director James Comey has been charged with federal crimes for actions he took in distributing national defense information to an individual not entitled ...",
                "url": "https://www.breitbart.com/politics/2026/10/26/ex-fbi-director-james-comey-charged-with-federal-crimes-in-new-case/",
                "image_url": "https://media.breitbart.com/media/2026/09/GettyImages1078703438-640x335.jpg",
                "language": "en",
                "published_at": "2026-10-26T22:46:00.000000Z",
                "source": "breitbart.com",
                "categories": [
                    "general",
                    "politics"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "2ca8b050-14cf-4d1f-8847-559f1db17c59",
                        "title": "Judge orders DOJ to reinstate former federal prosecutor Maurene Comey, daughter of former FBI director",
                        "description": "A federal judge ruled Monday that former Assistant United States Attorney Maurene Comey, the daughter of former FBI Director James Comey, was “unlawfully terminated” and ordered that she be reinstated to her job.",
                        "keywords": "",
                        "snippet": "A federal judge ruled Monday that former Assistant United States Attorney Maurene Comey, the daughter of former FBI Director James Comey, was “unlawfully term...",
                        "url": "https://www.nbcnews.com/politics/trump-administration/doj-justice-maurene-comey-court-reinstate-rcna605720",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2026-10/261026-maurene-comey-mn-1140-ee1967.jpg",
                        "language": "en",
                        "published_at": "2026-10-26T16:10:24.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "a6c8e386-6547-4d70-95a4-45f2caeef40c",
                        "title": "James Comey charged for a third time by the Trump administration",
                        "description": "Former FBI Director James Comey has been charged by federal prosecutors with transmission of national defense information and conspiracy to transmit national defense information.",
                        "keywords": "",
                        "snippet": "Former FBI Director James Comey has been charged by federal prosecutors with transmission of national defense information and conspiracy to transmit national de...",
                        "url": "https://www.nbcnews.com/politics/justice-department/former-fbi-james-comey-charged-third-time-trump-national-security-rcna342963",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2026-04/260430-james-comey-vl-307p-2a39f0.jpg",
                        "language": "en",
                        "published_at": "2026-10-26T21:21:01.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "6130373d-0666-4c25-a021-7945635e7be0",
                        "title": "Ex-FBI Director James Comey facing charges for third time by Trump admin",
                        "description": "Former FBI Director James Comey is facing fresh criminal charges Monday for allegedly leaking sensitive national defense information.",
                        "keywords": "Politics, US News, department of justice, donald trump, fbi, FBI investigations, james comey",
                        "snippet": "Former FBI Director James Comey is facing fresh criminal charges Monday for allegedly leaking sensitive national defense information.\n\nThe two counts against Co...",
                        "url": "https://nypost.com/2026/10/26/us-news/ex-fbi-director-james-comey-facing-charges-for-third-time-by-trump-admin/",
                        "image_url": "https://nypost.com/wp-content/uploads/sites/2/2026/10/crop-41529017.jpg?quality=75&strip=all&w=1200",
                        "language": "en",
                        "published_at": "2026-10-26T21:53:41.000000Z",
                        "source": "nypost.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "ad6e028a-2bd8-4dbb-a178-0ba9a0d47fb4",
                        "title": "James Comey faces two new federal charges",
                        "description": "Former FBI Director James Comey has been charged by federal prosecutors with transmission of national defense information and conspiracy to transmit national defense information. NBC News’ Ryan Reilly explains the charges.",
                        "keywords": "",
                        "snippet": "Former FBI Director James Comey has been charged by federal prosecutors with transmission of national defense information and conspiracy to transmit national de...",
                        "url": "https://www.nbcnews.com/video/james-comey-faces-two-new-federal-charges-272257605808",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/mpx/2704722219/2026_10/1793051558808_now_hallie_rre_comey_new_charges_261026_S3_1920x1080-fiwu67.jpg",
                        "language": "en",
                        "published_at": "2026-10-26T21:52:44.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "1b318c90-5fe3-4979-afa4-a889ade83b45",
                        "title": "James Comey faces new DOJ case over alleged national defense disclosure",
                        "description": "Prosecutors allege ex-FBI Director James Comey knowingly disclosed national defense information in 2016 to a person who was not authorized to receive it.",
                        "keywords": "james comey, politics, crime world, donald trump, fbi, justice department",
                        "snippet": "NEW You can now listen to Fox News articles!\n\nThe Justice Department filed a criminal information against former FBI Director James Comey over allegations that ...",
                        "url": "https://www.foxnews.com/politics/james-comey-faces-new-doj-case-over-alleged-national-defense-disclosure",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2025/09/james.comey_.jpg",
                        "language": "en",
                        "published_at": "2026-10-26T21:46:28.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    }
                ]
            },
            {
                "uuid": "a3da9946-5cbc-4eda-a69d-c8c85c294b4d",
                "title": "BetMGM Bonus Code FOXNEWS: Cover Your First Eagles vs Cowboys, Rays vs Brewers Bets up to $1500",
                "description": "Use BetMGM bonus code FOXNEWS to wager on Cowboys-Eagles or Brewers-Rays and get up to $1,500 in bonus bets if your first bet loses. Terms apply.",
                "keywords": "betting",
                "snippet": "The sports gods have treated us to a World Series game and Monday Night Football tonight. BetMGM is offering new users the promo code FOXNEWS to wager on either...",
                "url": "https://www.foxnews.com/outkick-betting/betmgm-bonus-code-foxnews-cover-your-first-eagles-vs-cowboys-rays-vs-brewers-bets-up-1500",
                "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/10/asante-samuel-interception-philadelphia-eagles.jpg",
                "language": "en",
                "published_at": "2026-10-26T20:47:02.000000Z",
                "source": "foxnews.com",
                "categories": [
                    "general",
                    "politics"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "824fe758-d22b-4b07-a703-13a53c505015",
                        "title": "Underdog Promo Code FOXNEWS: Play $10, Get $50 on Eagles vs Cowboys",
                        "description": "Use Underdog promo code FOXNEWS to play $10 and get $50 in bonus cash on the Eagles-Cowboys matchup. See how to claim the offer.",
                        "keywords": "betting",
                        "snippet": "Monday Night Football returns to action tonight with an NFC East battle between the Eagles and the Cowboys. Underdog is offering new users a chance to earn $50 ...",
                        "url": "https://www.foxnews.com/outkick-betting/underdog-promo-code-foxnews-play-10-get-50-eagles-vs-cowboys",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/09/NFL-Cowboys-Dak-Prescott-092126-1.jpg",
                        "language": "en",
                        "published_at": "2026-10-26T19:29:24.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "5d389537-e0c1-4625-b14f-e98861f1f592",
                        "title": "Fanatics Sportsbook Promo Code FOXNEWS350: Bet $20, Get $350 for Rays vs Brewers Game 3",
                        "description": "New users who sign up with Fanatics Sportsbook and use promo code FOXNEWS350 can receive a special offer before World Series Game 3 between the Rays and Brewers.",
                        "keywords": "betting",
                        "snippet": "Baseball is back in action after a travel day yesterday and the Rays host the Brewers in Game 3. Fanatics Sportsbook is offering new users promo code FOXNEWS350...",
                        "url": "https://www.foxnews.com/outkick-betting/fanatics-sportsbook-promo-code-foxnews350-bet-20-get-350-rays-vs-brewers-game-3",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/10/mlb-rays-freddy-peralta-102626-1.jpg",
                        "language": "en",
                        "published_at": "2026-10-26T19:31:25.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "84334852-8758-4c74-99fe-1af7ef807eb3",
                        "title": "Underdog Promo Code FOXNEWS: Unlock Play $10, Get $50 Promo for Rays-Brewers World Series Game 3",
                        "description": "Use Underdog promo code FOXNEWS to play $10 and get $50 in bonus cash for Rays-Brewers World Series Game 3. See how to claim the offer.",
                        "keywords": "betting",
                        "snippet": "Game 3 of the World Series is tonight as the series shifts over to Tampa, with the Brewers leading 2-0. Underdog is offering new users $50 in bonuses on a $10 w...",
                        "url": "https://www.foxnews.com/outkick-betting/underdog-promo-code-foxnews-unlock-play-10-get-50-promo-rays-brewers-world-series-game-3",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/10/jacob-misiorowski-brewers-world-series.jpg",
                        "language": "en",
                        "published_at": "2026-10-26T19:41:18.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "20f8a3f2-f836-42d1-b0ad-4d5616590f3a",
                        "title": "Betr Promo Code FOXNEWS: Get $200 and Four Free Picks for Eagles-Cowboys on MNF",
                        "description": "Use Betr promo code FOXNEWS to get up to $200 in bonuses and four free picks for Cowboys-Eagles on Monday Night Football. Terms apply.",
                        "keywords": "betting",
                        "snippet": "We have a day with all four major sports taking place, which doesn’t happen often, but the night is highlighted by the Cowboys taking on the Eagles. Betr is o...",
                        "url": "https://www.foxnews.com/outkick-betting/betr-promo-code-foxnews-get-200-four-free-picks-eagles-cowboys-mnf",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/10/ceedee-lamb-touchdown-celebration-nrg-stadium.jpg",
                        "language": "en",
                        "published_at": "2026-10-26T20:08:41.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    }
                ]
            }
        ],
        "business": ...,
        "sports": ...,
        "tech": ...,
        "science": ...,
        "health": ...
    }
}
            
        

Top Stories Available on: All plans

Endpoint

            
                GET https://api.thenewsapi.com/v1/news/top HTTP/1.1
            
        

Use this endpoint to find live and historical top stories around the world or filter to get only top stories for specific countries. Filtering by language, category, source and publish date is also possible, as well as advanced searching on title and the main text of the article.

If you have issues with your requests, please ensure your GET parameters are URL-encoded.

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

name required description
api_token true Your API token which can be found on your account dashboard.
search false Use the search as a basic search tool by entering regular search terms or it has more advanced usage to build search queries:
+ signifies AND operation
| signifies OR operation
- negates a single token
" wraps a number of tokens to signify a phrase for searching
* at the end of a term signifies a prefix query
( and ) signify precedence

To use one of these characters literally, escape it with a preceding backslash (\).

Example 1: forex + (usd | gbp) -cad (searches for forex articles which include usd or gbp but excludes cad)
Example 2: "Apple Inc" (searches for articles with exact matches for "Apple Inc")

For more advanced query examples, see our API Examples section.

When using special characters (+, -, |, ", *, ()) you MUST URL-encode this parameter.
search_fields false Comma separated list of fields to apply the search parameter to.
Supported fields: title | description | keywords | main_text
Example: title,description,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: 2026-10-27T01:30:57 | 2026-10-27T01:30 | 2026-10-27T01 | 2026-10-27 | 2026-10 | 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-10-27T01:30:57 | 2026-10-27T01:30 | 2026-10-27T01 | 2026-10-27 | 2026-10 | 2026
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-10-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": 1727936,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "0f05db3c-461d-4b81-885e-0faffbece7d0",
            "title": "Former Beauty Queen Accuses Donald Trump of Rape, Joining Over 2-Dozen Women in Sexual Assault Claims",
            "description": "The House Judiciary Committee published new accusations from former beauty queen Beatrice Keul that she was raped by President Donald Trump in 1993",
            "keywords": "",
            "snippet": "President Donald Trump is being accused of historic rape allegations by a former beauty queen as part of a House Judiciary Committee report on the former realit...",
            "url": "https://www.usmagazine.com/celebrity-news/news/beauty-queen-accuses-donald-trump-of-rape-in-epstein-report/",
            "image_url": "https://www.usmagazine.com/wp-content/uploads/2026/10/GettyImages-681946576-Donald-Trump-Accused-of-Rape-in-Report-Linking-President-to-Jeffrey-Epstein-e1793061898760.jpg?crop=0px%2C229px%2C1393px%2C730px&resize=1200%2C630&quality=86&strip=all",
            "language": "en",
            "published_at": "2026-10-27T01:07:23.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "a46757b6-16df-4a0a-8b8d-e06ab7a7949f",
            "title": "Below Deck’s Chef Moe Removes His Belt as Cast Is Accosted by Aggressive Strangers",
            "description": "A crew night out on 'Below Deck' took a turn when Chef Moe Vilomar got ready to get into a physical altercation with aggressive strangers",
            "keywords": "",
            "snippet": "A crew night out on Below Deck took a shocking turn when Chef Moe Vilomar got ready to get into a physical altercation with aggressive strangers.\n\nIn a preview ...",
            "url": "https://www.usmagazine.com/entertainment/news/below-deck-chef-gets-into-physical-fight-with-aggressive-strangers/",
            "image_url": "https://www.usmagazine.com/wp-content/uploads/2026/10/NUP_210139_00409.jpg?crop=0px%2C82px%2C800px%2C420px&resize=1200%2C630&quality=86&strip=all",
            "language": "en",
            "published_at": "2026-10-27T00:59:54.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "c3985052-9ff9-4e25-b7ca-3d0b666e906f",
            "title": "New details emerge after United ‘hijacking’ threat — as 25-year-old suspect’s chilling messages are revealed",
            "description": "New details reveal a United flight was locked down after a passenger was arrested for threatening midair to hijack the Newark-bound plane.",
            "keywords": "Metro, US News, las vegas, terrorism, united airlines",
            "snippet": "Chilling new details have emerged in a terrifying midair security crisis that prompted a United Airlines pilot to place a Newark-bound flight on immediate lockd...",
            "url": "https://nypost.com/2026/10/26/us-news/chilling-messages-revealed-in-united-flight-hijack-threat/",
            "image_url": "https://nypost.com/wp-content/uploads/sites/2/2026/10/146578326.jpg?quality=75&strip=all&w=1200",
            "language": "en",
            "published_at": "2026-10-27T00:53:29.000000Z",
            "source": "nypost.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "5aa77245-d839-41c4-8586-9141d26e7b5d",
            "title": "Milcho Manchevski Talks ‘Sister Brother Manhole Cover’ — Tokyo",
            "description": "Coccinelle Film is handling world sales on ‘Sister Brother Manhole Cover'.",
            "keywords": "",
            "snippet": "This week, Macedonian filmmaker Milcho Manchevski returns with Sister Brother Manhole Cover, his second feature of the year, which screens in competition at the...",
            "url": "https://deadline.com/2026/10/milcho-manchevski-sister-brother-manhole-cover-tokyo-1237202859/",
            "image_url": "https://deadline.com/wp-content/uploads/2026/10/39001CMP12_4.jpg?w=920",
            "language": "en",
            "published_at": "2026-10-27T00:48:10.000000Z",
            "source": "deadline.com",
            "categories": [
                "entertainment"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "dd2b989d-b515-4158-b60a-9693a7814eee",
            "title": "Mom arrested for leaving four children home alone during days-long work trip across the country",
            "description": "Florida mom Irene Miller was arrested for leaving her four kids home alone during a Las Vegas trip after her 9-year-old was hit by a dumbbell.",
            "keywords": "US News, child endangerment, florida, las vegas, negligence, photography",
            "snippet": "A Florida photographer’s child was allegedly hit in the head by a falling dumbbell after the mom ditched her four kids at home alone for days while on a work ...",
            "url": "https://nypost.com/2026/10/26/us-news/florida-mom-arrested-for-leaving-four-children-home-alone-during-days-long-work-trip/",
            "image_url": "https://nypost.com/wp-content/uploads/sites/2/2026/10/mom-arrested-comp.jpg?quality=75&strip=all&w=1200",
            "language": "en",
            "published_at": "2026-10-27T00:46:44.000000Z",
            "source": "nypost.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "f7f5303b-ac90-4860-b263-9b578cabbd02",
            "title": "DHS suspends visa-free travel program for Chinese nationals amid birth tourism, security concerns",
            "description": "Visa-free travel for Chinese nationals to the Northern Mariana Islands is suspended by the Trump administration over birth tourism and espionage concerns.",
            "keywords": "politics, immigration, homeland security, national security, foreign, china, state department, markwayne mullin",
            "snippet": "NEW You can now listen to Fox News articles!\n\nThe Trump administration is suspending a visa-free travel program for Chinese nationals visiting a U.S. island ter...",
            "url": "https://www.foxnews.com/politics/dhs-suspends-visa-free-travel-program-chinese-nationals-amid-birth-tourism-security-concerns",
            "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2026/08/Trump-Visa.png",
            "language": "en",
            "published_at": "2026-10-27T00:37:54.000000Z",
            "source": "foxnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "827344fc-f1b8-4ac3-9595-1e0f8ecc1917",
            "title": "Searchlight Pictures Marketing EVP Michelle Hooper Leaving Studio",
            "description": "Searchlight Pictures' EVP Marketing Michelle Hooper, who helped score several Oscar nominations and wins during her 2-decade tenure, is exiting.",
            "keywords": "",
            "snippet": "EXCLUSIVE: We hear that Searchlight Pictures‘ EVP of Marketing Michelle Hooper, who delivered the specialty label numerous Oscar nominations and wins during h...",
            "url": "https://deadline.com/2026/10/searchlight-michelle-hooper-leaving-1237202751/",
            "image_url": "https://deadline.com/wp-content/uploads/2026/10/Michelle-Hooper-Searchlight-Pictures.jpg?w=1000",
            "language": "en",
            "published_at": "2026-10-27T00:31:25.000000Z",
            "source": "deadline.com",
            "categories": [
                "entertainment"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "1e935ea1-b87f-4265-b303-99a29f4821c9",
            "title": "Los Angeles residents sue city over Hollywood sign crowds: \"Reached its peak\"",
            "description": "A group of residents who live near the world-famous Hollywood Sign, which attracts millions of visitors from around the world every year, have filed public nuis...",
            "keywords": "",
            "snippet": "A group of residents who live near the world-famous Hollywood Sign, which attracts millions of visitors from around the world every year, have filed public nuis...",
            "url": "https://www.cbsnews.com/losangeles/news/hollywood-sign-los-angeles-residents-file-public-nuisance-lawsuit/",
            "image_url": "https://assets3.cbsnewsstatic.com/hub/i/r/2026/10/26/089e2134-f267-48d0-8d7c-26e243a05a8b/thumbnail/1200x630/4705aa4bda585d1931f373ed4fc43970/hollywood-sign-parking-cci.png",
            "language": "en",
            "published_at": "2026-10-27T00:24:50.000000Z",
            "source": "cbsnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "425de972-d1b8-45a3-a6c6-ea2234325e2c",
            "title": "Why DOJ's attempt to charge James Comey again is highly unusual",
            "description": "The Department of Justice took steps to charge former FBI director James Comey for the third time on Monday. CBS News senior Justice Department reporter Sarah L...",
            "keywords": "James Comey, Donald Trump, United States Department of Justice, Trump Administration",
            "snippet": "Why DOJ's attempt to charge Comey is unusual The Department of Justice took steps to charge former FBI director James Comey for the third time on Monday. CBS Ne...",
            "url": "https://www.cbsnews.com/video/why-dojs-attempt-charge-james-comey-again-highly-unusual/",
            "image_url": "https://assets1.cbsnewsstatic.com/hub/i/r/2026/10/27/f8a5917d-31ff-406b-b94d-6a4487280786/thumbnail/1200x630/b8ba5c96176aa7691792123e144a849c/cbsn-fusion-why-dojs-attempt-charge-james-comey-again-highly-unusual-thumbnail.jpg",
            "language": "en",
            "published_at": "2026-10-27T00:24:00.000000Z",
            "source": "cbsnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "72cee8e9-fa9f-4438-a856-454502142653",
            "title": "Legal analysis of DOJ taking steps to charge James Comey again",
            "description": "The Trump administration is attempting to charge former FBI director James Comey again. Comey said he remains innocent. CBS News legal contributor Rebecca Roiph...",
            "keywords": "James Comey, Donald Trump, United States Department of Justice, Trump Administration",
            "snippet": "James Comey says he remains innocent The Trump administration is attempting to charge former FBI director James Comey again. Comey said he remains innocent. CBS...",
            "url": "https://www.cbsnews.com/video/legal-analysis-doj-taking-steps-charge-james-comey-again/",
            "image_url": "https://assets2.cbsnewsstatic.com/hub/i/r/2026/10/27/4efe8a8b-abfb-44c3-9d09-3e1de8ec77fe/thumbnail/1200x630/11f85ecd7bb25bdb181ad2442abc018b/cbsn-fusion-legal-analysis-doj-taking-steps-charge-james-comey-again-thumbnail.jpg",
            "language": "en",
            "published_at": "2026-10-27T00:20:02.000000Z",
            "source": "cbsnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        }
    ]
}
            
        

All News Available on: All plans

Endpoint

            
                GET https://api.thenewsapi.com/v1/news/all HTTP/1.1
            
        

Use this endpoint to find all live and historical articles we collect. Filtering by language, category, source and publish date is also possible, as well as advanced searching on title and the main text of the article.

If you have issues with your requests, please ensure your GET parameters are URL-encoded.

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

name required description
api_token true Your API token which can be found on your account dashboard.
search false Use the search as a basic search tool by entering regular search terms or it has more advanced usage to build search queries:
+ signifies AND operation
| signifies OR operation
- negates a single token
" wraps a number of tokens to signify a phrase for searching
* at the end of a term signifies a prefix query
( and ) signify precedence

To use one of these characters literally, escape it with a preceding backslash (\).

Example 1: forex + (usd | gbp) -cad (searches for forex articles which include usd or gbp but excludes cad)
Example 2: "Apple Inc" (searches for articles with exact matches for "Apple Inc")

For more advanced query examples, see our API Examples section.

When using special characters (+, -, |, ", *, ()) you MUST URL-encode this parameter.
search_fields false Comma separated list of fields to apply the search parameter to.
Supported fields: title | description | keywords | main_text
Example: title,description,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: 2026-10-27T01:30:57 | 2026-10-27T01:30 | 2026-10-27T01 | 2026-10-27 | 2026-10 | 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-10-27T01:30:57 | 2026-10-27T01:30 | 2026-10-27T01 | 2026-10-27 | 2026-10 | 2026
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-10-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": 54538546,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "79c9b052-2641-4ff5-809e-c76a82df95c0",
            "title": "Matt Coronato explains what he was thinking before his first NHL fight",
            "description": "",
            "keywords": "",
            "snippet": "Matt Coronato explains what he was thinking before his first NHL fight\n\nOn this edition of Luke in the Box, Luke Gazdic is joined by Calgary Flames forward Matt...",
            "url": "https://www.sportsnet.ca/nhl/video/matt-coronato-explains-what-he-was-thinking-before-his-first-nhl-fight/",
            "image_url": "https://www.sportsnet.ca/sn_favicon.ico",
            "language": "en",
            "published_at": "2026-10-27T01:30:57.000000Z",
            "source": "sportsnet.ca",
            "categories": [
                "sports"
            ],
            "relevance_score": null
        },
        {
            "uuid": "b1f7b4cc-85e9-482a-abb9-72de3cbd7ef5",
            "title": "HTML 标签",
            "description": "HTML标签实例链接到菜鸟教程:访问菜鸟教程!尝试一下»(更多实例见页面底部)浏览器支持...",
            "keywords": "",
            "snippet": "HTML\n\n实例 链接到菜鸟教程 : < a href = \" https://www.runoob.com \" > 访问菜鸟教程! a > 尝试一下 » (更多实例见页面底部)\n\n浏览...",
            "url": "http://www.tretars.com/2935393.html",
            "image_url": "https://www.runoob.com/images/tryitimg.gif",
            "language": "zh",
            "published_at": "2026-10-27T01:29:37.000000Z",
            "source": "tretars.com",
            "categories": [
                "sports"
            ],
            "relevance_score": null
        },
        {
            "uuid": "ab6f912c-687a-44a5-8449-ed30b48e5c91",
            "title": "Blog elhacker.NET",
            "description": "",
            "keywords": "",
            "snippet": "",
            "url": "https://blog.elhacker.net/feeds/4325458435499710552/comments/default",
            "image_url": "",
            "language": "es",
            "published_at": "2026-10-27T01:26:14.000000Z",
            "source": "blog.elhacker.net",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "1c0b3dab-5469-4904-b6dd-6930d168d12b",
            "title": "Blog elhacker.NET",
            "description": "",
            "keywords": "",
            "snippet": "",
            "url": "https://blog.elhacker.net/feeds/172104776162211781/comments/default",
            "image_url": "",
            "language": "es",
            "published_at": "2026-10-27T01:26:14.000000Z",
            "source": "blog.elhacker.net",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "dac35f98-11f8-4295-b868-41965b1a197f",
            "title": "Blog elhacker.NET",
            "description": "",
            "keywords": "",
            "snippet": "",
            "url": "https://blog.elhacker.net/feeds/6198940794784221260/comments/default",
            "image_url": "",
            "language": "es",
            "published_at": "2026-10-27T01:26:14.000000Z",
            "source": "blog.elhacker.net",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "c4dd994b-ccec-4df1-93fd-6e8c4c8837a7",
            "title": "Blog elhacker.NET",
            "description": "",
            "keywords": "",
            "snippet": "",
            "url": "https://blog.elhacker.net/feeds/5439603401801715368/comments/default",
            "image_url": "",
            "language": "es",
            "published_at": "2026-10-27T01:26:14.000000Z",
            "source": "blog.elhacker.net",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "d0e68171-f76d-4631-bdaf-21f3bec86959",
            "title": "Blog elhacker.NET",
            "description": "",
            "keywords": "",
            "snippet": "",
            "url": "https://blog.elhacker.net/feeds/5357735514630535939/comments/default",
            "image_url": "",
            "language": "es",
            "published_at": "2026-10-27T01:26:14.000000Z",
            "source": "blog.elhacker.net",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "cf7b21a1-8f0a-469d-ad22-301f389d02a1",
            "title": "Blog elhacker.NET",
            "description": "",
            "keywords": "",
            "snippet": "",
            "url": "https://blog.elhacker.net/feeds/8496495317914506202/comments/default",
            "image_url": "",
            "language": "es",
            "published_at": "2026-10-27T01:26:14.000000Z",
            "source": "blog.elhacker.net",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "84b49abe-1287-4f22-94f6-b75aba24d3f2",
            "title": "Blog elhacker.NET",
            "description": "",
            "keywords": "",
            "snippet": "",
            "url": "https://blog.elhacker.net/feeds/6675536230674463250/comments/default",
            "image_url": "",
            "language": "es",
            "published_at": "2026-10-27T01:26:14.000000Z",
            "source": "blog.elhacker.net",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "1919ad4b-17b1-4260-93be-fbc9c7a0c07e",
            "title": "Blog elhacker.NET",
            "description": "",
            "keywords": "",
            "snippet": "",
            "url": "https://blog.elhacker.net/feeds/1428730445095031841/comments/default",
            "image_url": "",
            "language": "es",
            "published_at": "2026-10-27T01:26:14.000000Z",
            "source": "blog.elhacker.net",
            "categories": [
                "tech"
            ],
            "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-10-27T01:30:57 | 2026-10-27T01:30 | 2026-10-27T01 | 2026-10-27 | 2026-10 | 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-10-27T01:30:57 | 2026-10-27T01:30 | 2026-10-27T01 | 2026-10-27 | 2026-10 | 2026
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2026-10-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-10-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();