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 extract article data from live links, check out articlextractor API .

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: 2024-03-04
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": "ecfa2377-6291-4fe5-b432-6591ccb9908b",
                "title": "The Supreme Court could decide Monday whether Trump can be barred from the 2024 ballot",
                "description": "Former President Donald Trump could learn Monday whether the Supreme Court will let him appear on this year’s ballot as he tries to close in on the Republican presidential nomination.",
                "keywords": "Colorado, Donald Trump, Courts, 2020 United States presidential election, Voting, General news, Trump, Elections, Government and politics, w, Washington news, n, Maine state government, Colorado state government, p, Illinois state government, Politics",
                "snippet": "WASHINGTON (AP) — Former President Donald Trump could learn Monday whether the Supreme Court will let him appear on this year’s ballot as the leading Republ...",
                "url": "https://apnews.com/article/supreme-court-trump-insurrection-election-colorado-51e79c0f03013034c8a042cb278b6446",
                "image_url": "https://dims.apnews.com/dims4/default/e2c3b46/2147483647/strip/true/crop/4496x2529+0+234/resize/1440x810!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F2c%2F7a%2F6e3e3698b75d472cf44bd82c9f1a%2F4913e5ff250b4ade971c32f599ef785a",
                "language": "en",
                "published_at": "2024-03-04T06:23:02.000000Z",
                "source": "apnews.com",
                "categories": [
                    "general"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "ab28d82a-fdb1-4511-bccc-384c5dbcbd3b",
                        "title": "Super Tuesday: Trump could sweep, but Haley may surprise in these states",
                        "description": "Donald Trump has huge leads over Nikki Haley in many polls focused on Super Tuesday states, but there are some states where his advantage isn’t as massive.",
                        "keywords": "article_normal, trump, haley, supertuesday, super, tuesday, election, 2024, Aerospace/Defense, Construction/Real Estate, Financial Services, Industrial Goods, Investing/Securities, Media, Regulation/Government Policy, Analyst Comment/Recommendation, Corporate/Industrial News, Political/General News, Politics/International Relations, Domestic Politics, Elections, National/Presidential Elections, Content Types, Factiva Filters, C&E Exclusion Filter, C&E Industry News Filter, Trump, Haley, SuperTuesday, Super, Tuesday, Election, regulation, government policy, analyst comment, recommendation, corporate, industrial news, political, general news, politics, international relations, domestic politics, elections, national, presidential elections, content types, factiva filters, c&e exclusion filter, c&e industry news filter, aerospace, defense, construction, real estate, financial services, industrial goods, investing, securities, media",
                        "snippet": "Voters in 15 U.S. states will cast their ballots Tuesday in the Republican presidential primary, with Donald Trump aiming for big wins that could push Nikki Hal...",
                        "url": "https://www.marketwatch.com/story/super-tuesday-trump-could-sweep-but-haley-may-surprise-in-these-states-24db53ac?mod=mw_rss_topstories",
                        "image_url": "https://images.mktw.net/im-44534492/social",
                        "language": "en",
                        "published_at": "2024-03-04T12:00:00.000000Z",
                        "source": "marketwatch.com",
                        "categories": [
                            "business",
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "49002e13-0c28-4cf1-8f2b-fff0c4525a3a",
                        "title": "Ex-Trump Organization CFO Allen Weisselberg to plead guilty to perjury charges: Sources",
                        "description": "Ex-Trump Organization CFO Allen Weisselberg will plead guilty Monday to perjury charges related to his testimony during Trump’s civil fraud trial, sources tell ABC News.",
                        "keywords": "Article, 107767924",
                        "snippet": "Allen Weisselberg, the ex-chief financial officer of former President Donald Trump's family real estate company, will plead guilty Monday to perjury charges tha...",
                        "url": "https://abcnews.go.com/US/trump-organization-cfo-allen-weisselberg-plead-guilty-perjury/story?id=107767924",
                        "image_url": "https://i.abcnewsfe.com/a/eb8e39ba-069a-4db6-9021-ccb4ebb1aabe/weisselberg-plea_hpMain_20220818-104239_16x9.jpg?w=1600",
                        "language": "en",
                        "published_at": "2024-03-04T12:57:04.000000Z",
                        "source": "abcnews.go.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "630ab199-4c00-40ac-8d35-c62cd12102d5",
                        "title": "Another GOP senator announces she won’t vote for Trump in 2024",
                        "description": "And then there were two: Lisa Murkowski and Mitt Romney are incumbent Republican senators who’ve publicly said they won’t vote for Donald Trump in 2024.",
                        "keywords": "",
                        "snippet": "After launching her Republican presidential campaign in February 2023, Nikki Haley received zero endorsements from the Senate Republican conference. Late last w...",
                        "url": "https://www.msnbc.com/rachel-maddow-show/maddowblog/another-gop-senator-announces-wont-vote-trump-2024-rcna141606",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-03/240304-Lisa-Murkowski-al-0719-ccd2fd.jpg",
                        "language": "en",
                        "published_at": "2024-03-04T13:00:16.000000Z",
                        "source": "msnbc.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "35eddb7b-d414-470f-b9b9-441d31247c3e",
                        "title": "Biden calls Trump ungraceful 'loser,' taunts media and predicts 2024 victory in rare interview",
                        "description": "President Biden insulted former President Trump in a rare interview, calling him a “loser\" and predicting a 2024 re-election victory in November.",
                        "keywords": "",
                        "snippet": "Join Fox News for access to this content Plus special access to select articles and other premium content with your account - free of charge. Please enter a val...",
                        "url": "https://www.foxnews.com/media/biden-calls-trump-ungraceful-loser-taunts-media-predicts-2024-victory-rare-interview",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2023/08/trump-biden-split.jpg",
                        "language": "en",
                        "published_at": "2024-03-04T14:24:36.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "9143c93c-a251-43a6-8a64-f839acd5a95f",
                        "title": "Forget about Super Tuesday. For Trump, it’s going to be March Madness in court.",
                        "description": "Just as the presidential-campaign season kicks into high gear with the Super Tuesday primaries, Donald Trump finds himself mired in a perfect storm of legal...",
                        "keywords": "article_normal, Real Estate/Construction, Real Estate, Political/General News, Crime/Legal Action, Disasters/Accidents, Fraud, Storms, Natural Disasters, Politics/International Relations, Domestic Politics, Risk News, Elections, National/Presidential Elections, Weather, Content Types, Factiva Filters, C&E Executive News Filter, political, general news, crime, legal action, disasters, accidents, fraud, storms, natural disasters, politics, international relations, domestic politics, risk news, elections, national, presidential elections, weather, content types, factiva filters, c&e executive news filter, real estate, construction",
                        "snippet": "Who has time to run for office?\n\nJust as the presidential-campaign season kicks into high gear with the Super Tuesday primaries, Donald Trump finds himself mire...",
                        "url": "https://www.marketwatch.com/story/forget-about-super-tuesday-for-trump-its-going-to-be-march-madness-in-court-30974cdf?mod=mw_rss_topstories",
                        "image_url": "https://images.mktw.net/im-60481097/social",
                        "language": "en",
                        "published_at": "2024-03-04T14:48:00.000000Z",
                        "source": "marketwatch.com",
                        "categories": [
                            "business",
                            "general"
                        ],
                        "locale": "us"
                    }
                ]
            },
            {
                "uuid": "62194193-7b86-4f88-9a03-e018f45d763f",
                "title": "JetBlue and Spirit Airlines terminate $3.8 billion merger agreement",
                "description": "JetBlue and Spirit Airlines had appealed a federal judge's decision to block their merger earlier in January.",
                "keywords": "Breaking News: Business, Business, Airlines, Transportation, JetBlue Airways Corp, Spirit Airlines Inc, business news",
                "snippet": "JetBlue Airways aircraft are pictured at departure gates at John F. Kennedy International Airport in New York on June 15, 2013.\n\nJetBlue Airways and Spirit Airl...",
                "url": "https://www.cnbc.com/2024/03/04/jetblue-spirit-airlines-merger-called-off.html",
                "image_url": "https://image.cnbcfm.com/api/v1/image/107244266-16845327762023-05-19t212640z_1967640313_rc2w11apq5rv_rtrmadp_0_american-airlines-jetblue-airways-antitrust.jpeg?v=1698248022&w=1920&h=1080",
                "language": "en",
                "published_at": "2024-03-04T13:37:01.000000Z",
                "source": "cnbc.com",
                "categories": [
                    "general",
                    "business"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "c0441d52-59b8-460f-a950-88a1ac6468e0",
                        "title": "JetBlue and Spirit Airlines agree to terminate their 2022 merger agreement after regulatory pushback",
                        "description": "But in January, the deal was put in peril when a court sided with the Justice Department in saying that a merger between low-cost JetBlue and ultra-low-cost...",
                        "keywords": "article_normal, Airlines, Passenger Airlines, Trusts/Funds/Financial Vehicles, Private Equity, Air Transport, Alternative Investments, Financial Services, Investing/Securities, Low Cost Airlines, Transportation/Logistics, Venture Capital, Regulation/Government Policy, Financial Performance, Share Price Movement/Disruptions, Ownership Changes, Acquisitions/Mergers/Shareholdings, Acquisitions/Mergers, Corporate Actions, Corporate/Industrial News, Mergers, Content Types, Factiva Filters, C&E Exclusion Filter, C&E Industry News Filter, JetBlue Airways Corp., JBLU, Spirit Airlines Inc., SAVE, regulation, government policy, financial performance, share price movement, disruptions, ownership changes, acquisitions, mergers, shareholdings, corporate actions, corporate, industrial news, content types, factiva filters, c&e exclusion filter, c&e industry news filter, airlines, passenger airlines, trusts, funds, financial vehicles, private equity, air transport, alternative investments, financial services, investing, securities, low cost airlines, transportation, logistics, venture capital",
                        "snippet": "JetBlue Airways Corp. and Spirit Airlines Inc. said Monday they have reached an agreement to terminate their July 2022 merger agreement, sending the former’s ...",
                        "url": "https://www.marketwatch.com/story/jetblue-and-spirit-airlines-agree-to-terminate-their-2022-merger-agreement-after-regulatory-pushback-e31a8d89?mod=mw_rss_topstories",
                        "image_url": "https://images.mktw.net/im-88860569/social",
                        "language": "en",
                        "published_at": "2024-03-04T13:59:00.000000Z",
                        "source": "marketwatch.com",
                        "categories": [
                            "business",
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "91a49464-da12-4c93-9894-cae9e6319b39",
                        "title": "JetBlue and Spirit Airlines are calling off their $3.8 billion merger after losing an antitrust lawsuit",
                        "description": "JetBlue stock soared on the news, even as Sprit stock crashed into the ground",
                        "keywords": "JetBlue, Spirit Airlines, Business, Finance, Airline, US Airways, u.s. department of justice, Ted Christie, American Airlines Group, Quartz",
                        "snippet": "JetBlue and Spirit Airlines are officially doing away with their $3.8 billion merger attempt just weeks after a federal judge blocked the deal.\n\n\n\nIs it too lat...",
                        "url": "https://qz.com/spirit-airlines-jetblue-merger-terminated-1851304886",
                        "image_url": "https://i.kinja-img.com/image/upload/c_fill,h_675,pg_1,q_80,w_1200/b4a6841604f0b4959670467a83facddf.jpg",
                        "language": "en",
                        "published_at": "2024-03-04T14:27:00.000000Z",
                        "source": "qz.com",
                        "categories": [
                            "general",
                            "business",
                            "tech",
                            "entertainment"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "0167cdf5-ffe6-4af3-957c-a73fa5a2f139",
                        "title": "JetBlue Airways, facing pushback from antitrust regulators in US, ends bid to buy Spirit Airlines",
                        "description": "JetBlue Airways, facing pushback from antitrust regulators in US, ends bid to buy Spirit Airlines",
                        "keywords": "Business, U.S. news, General news, Article, 107769571",
                        "snippet": "JetBlue Airways, facing pushback from antitrust regulators in US, ends bid to buy Spirit Airlines\n\nJetBlue Airways, facing pushback from antitrust regulators in...",
                        "url": "https://abcnews.go.com/US/wireStory/jetblue-airways-facing-pushback-antitrust-regulators-us-ends-107769571",
                        "image_url": "https://s.abcnews.com/images/US/abc_news_default_2000x2000_update_16x9_992.jpg",
                        "language": "en",
                        "published_at": "2024-03-04T13:57:58.000000Z",
                        "source": "abcnews.go.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "a48c57d8-ed19-45cf-bcba-18c8f1f6c9f9",
                        "title": "JetBlue, Spirit ending $3.8B deal to combine after court ruling blocked their merger",
                        "description": "JetBlue and Spirit Airlines are ending their proposed $3.8 billion combination after a court ruling blocked their merger",
                        "keywords": "Courts, Business, U.S. news, General news, Article, 107770279",
                        "snippet": "JetBlue and Spirit Airlines are ending their proposed $3.8 billion combination after a court ruling blocked their merger\n\nJetBlue and Spirit Airlines are ending...",
                        "url": "https://abcnews.go.com/US/wireStory/jetblue-spirit-ending-38b-deal-combine-after-court-107770279",
                        "image_url": "https://i.abcnewsfe.com/a/a21c8e82-2c40-424f-a025-c295e34a102e/wirestory_2d9a640e7f7ecb87d5f60c1cbffbc163_16x9.jpg?w=1600",
                        "language": "en",
                        "published_at": "2024-03-04T14:30:30.000000Z",
                        "source": "abcnews.go.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: 2024-03-04T15:42:19 | 2024-03-04T15:42 | 2024-03-04T15 | 2024-03-04 | 2024-03 | 2024
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: 2024-03-04T15:42:19 | 2024-03-04T15:42 | 2024-03-04T15 | 2024-03-04 | 2024-03 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-03-04
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": 980037,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "e9a2b017-24a9-438c-8dac-b4ad2f2a17ab",
            "title": "Wall Street exuberance just hit an extreme",
            "description": "Exuberance among stock market timers is very likely at or close to its peak for this market cycle",
            "keywords": "article_normal, Financial Services, Investing/Securities, Political/General News, Personal Investments in Stocks, Personal Finance, Personal Investments, Equity Markets, Commodity/Financial Market News, Content Types, Commentary/Opinion, Factiva Filters, C&E Exclusion Filter, C&E Executive News Filter, Stock Market Commentary, political, general news, personal investments in stocks, personal finance, personal investments, equity markets, commodity, financial market news, content types, commentary, opinion, factiva filters, c&e exclusion filter, c&e executive news filter, stock market commentary, financial services, investing, securities",
            "snippet": "The clock is ticking on the end of the stock market’s powerful rally.\n\nThat’s because exuberance among stock market timers is very likely at or close to its...",
            "url": "https://www.marketwatch.com/story/wall-street-exuberance-just-hit-an-extreme-0f55908a?mod=mw_rss_topstories",
            "image_url": "https://images.mktw.net/im-15343372/social",
            "language": "en",
            "published_at": "2024-03-04T15:25:00.000000Z",
            "source": "marketwatch.com",
            "categories": [
                "business",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "6986ce0d-e27a-45c2-be45-88111bb24438",
            "title": "Rare Deal Alert- Get 2 Benefit Fan Fest Mascaras for the Price of 1",
            "description": "Achieve a full fan effect that is smudge-proof, water-resistant, and humidity-proof with a 48% discount on Benefit Cosmetics Fan Fest Fanning & Volumizing Masca...",
            "keywords": "",
            "snippet": "This article is sponsored by QVC. These items were selected from QVC because we love them and we thought you might like them at these prices. If you buy somethi...",
            "url": "https://www.eonline.com/news/1396361/rare-deal-alert-get-2-benefit-fan-fest-mascaras-for-the-price-of-1-and-double-your-lash-game?cmpid=rss-syndicate-genericrss-us-top_stories",
            "image_url": "https://akns-images.eonline.com/eol_images/Entire_Site/202423/rs_1200x1200-240303182956-Benefit_Cosmetics_Fan_Fest_Mascara_Deal_2.jpg?fit=around%7C1080:1080&output-quality=90&crop=1080:1080;center,top",
            "language": "en",
            "published_at": "2024-03-04T15:22:29.000000Z",
            "source": "eonline.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "dad655d5-9f90-4eae-99a2-e6e334fbfdad",
            "title": "Supreme Court rules Trump is eligible for Colorado’s ballot",
            "description": "The Supreme Court has ruled that Trump can be on the presidential ballot in Colorado, reversing a state court ruling that said otherwise.",
            "keywords": "",
            "snippet": "The Supreme Court has ruled that Donald Trump can be on the presidential primary ballot in Colorado, overruling a state court ruling that said otherwise.\n\nCongr...",
            "url": "https://www.msnbc.com/deadline-white-house/deadline-legal-blog/trump-supreme-court-colorado-ballot-ruling-rcna139773",
            "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-01/240105-supreme-court-justices-al-0918-0895ee.jpg",
            "language": "en",
            "published_at": "2024-03-04T15:18:56.000000Z",
            "source": "msnbc.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "c5036412-11be-4b65-8593-b171e80299ec",
            "title": "Mikaela Shiffrin to return to competition after downhill crash",
            "description": "Downhill skier Mikaela Shiffrin in on track to return to the slopes in Sweden this weekend after rehabbing a sprained MCL suffered in a downhill crash in Italy ...",
            "keywords": "",
            "snippet": "Mikaela Shiffrin thanks those close to her after receiving the ESPY for Best Athlete, Women's Sports. (2:13)\n\nOpen Extended Reactions\n\nMikaela Shiffrin's return...",
            "url": "https://www.espn.com/olympics/skiing/story/_/id/39651914/mikaela-shiffrin-return-competition-downhill-crash",
            "image_url": "https://a.espncdn.com/combiner/i?img=%2Fphoto%2F2023%2F1229%2Fr1271648_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2024-03-04T15:11:11.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "53f9991e-1835-490a-8335-4500971328ef",
            "title": "Over 10,000 players opt in to EA Sports College Football 25",
            "description": "More than 10,000 college football players have already opted in for EA Sports College Football 25, the new EA Sports video game set to launch this summer, which...",
            "keywords": "",
            "snippet": "Open Extended Reactions\n\nMore than 10,000 college football players have already opted in for EA Sports College Football 25, the new EA Sports video game set to ...",
            "url": "https://www.espn.com/college-football/story/_/id/39651866/over-10000-players-opt-ea-sports-college-football-25",
            "image_url": "https://a3.espncdn.com/combiner/i?img=%2Fphoto%2F2020%2F0921%2Fr749005_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2024-03-04T15:11:11.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "ca45ec5b-bd2c-4ca2-8099-e3e64eb97d6d",
            "title": "In Mexico, organized crime attacks against local candidates raise fears ahead of election",
            "description": "In Mexico, organized crime is once again preying on local candidates across swaths of the country where cartels dominate, raising concerns among experts that th...",
            "keywords": "",
            "snippet": "MEXICO CITY — As Mexico prepares for the largest elections in its history, organized crime is once again preying on local candidates across swaths of the coun...",
            "url": "https://www.nbcnews.com/news/world/mexico-organized-crime-attacks-local-candidates-raise-fears-ahead-elec-rcna141624",
            "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-03/240304-armando-lopez-aa-912a-585c52.jpg",
            "language": "en",
            "published_at": "2024-03-04T15:10:59.000000Z",
            "source": "nbcnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "24e36eaf-f314-431b-a33d-6127afa23919",
            "title": "GitLab Earnings Are Imminent; These Most Accurate Analysts Revise Forecasts Ahead Of Earnings Call - GitLab (NASDAQ:GTLB)",
            "description": "GitLab Inc. (NASDAQ: GTLB) is expected to release earnings results for its fourth quarter, after the closing bell on March 4, 2024.",
            "keywords": "",
            "snippet": "Loading... Loading...\n\nGitLab Inc. GTLB is expected to release earnings results for its fourth quarter, after the closing bell on March 4, 2024.\n\nAnalysts expec...",
            "url": "https://www.benzinga.com/news/earnings/24/03/37458749/gitlab-earnings-are-imminent-these-most-accurate-analysts-revise-forecasts-ahead-of-earnings-call",
            "image_url": "https://www.benzinga.com/next-assets/images/schema-image-default.png",
            "language": "en",
            "published_at": "2024-03-04T15:10:42.000000Z",
            "source": "benzinga.com",
            "categories": [
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "95223f34-04ea-453f-952d-ab1f49a6086a",
            "title": "Why Biden is still the Democrats' best bet in November",
            "description": "The Atlantic's Jonathan V. Last discusses why he says President Biden is still the Democrats' best bet for November against Trump.",
            "keywords": "",
            "snippet": "Why Biden is still the Democrats' best bet in November\n\nThe Atlantic's Jonathan V. Last discusses why he says President Biden is still the Democrats' best bet f...",
            "url": "https://www.msnbc.com/morning-joe/watch/why-biden-is-still-the-democrats-best-bet-in-november-205395525667",
            "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/mpx/2704722219/2024_03/1709564996357_n_mj_last_240304_1920x1080-yzutb7.jpg",
            "language": "en",
            "published_at": "2024-03-04T15:10:15.000000Z",
            "source": "msnbc.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "2cc753db-2eeb-4c90-aee6-0926f9186e82",
            "title": "Randall Emmett’s Ex-Wife Congratulates Lala Kent on 2nd Pregnancy",
            "description": "Randall Emmett’s ex-wife, Ambyr Childers, congratulated Lala Kent after her pregnancy announcement",
            "keywords": "",
            "snippet": "Randall Emmett’s ex-wife, Ambyr Childers, shared words of support after Lala Kent announced she’s pregnant with baby No. 2.\n\n“Congratulations mama! ❤❤...",
            "url": "https://www.usmagazine.com/celebrity-news/news/randall-emmetts-ex-wife-congratulates-lala-kent-on-2nd-pregnancy/",
            "image_url": "https://www.usmagazine.com/wp-content/uploads/2024/03/Randall-Emmett-Ex-Wife-Ambyr-Childers-Congratulates-Lala-Kent-on-Baby-No-2.jpg?crop=0px%2C0px%2C2000px%2C1051px&resize=1200%2C630&quality=86&strip=all",
            "language": "en",
            "published_at": "2024-03-04T15:08:46.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "33f83d72-fba4-47ac-9a2f-ee3cb19f7f44",
            "title": "Plug Power’s stock momentum cools as Wall Street still has these questions",
            "description": "Analysts still have concerns about margins, revenue growth and cash burn in the wake of Plug Power’s latest earnings.",
            "keywords": "article_normal, Energy, Alternative Fuels, Fuel Cells, Industrial Electronics, Industrial Goods, Technology, Financial Performance, Earnings, Analysts' Comments/Recommendations, Share Price Movement/Disruptions, Corporate/Industrial News, Content Types, Factiva Filters, C&E Exclusion Filter, C&E Industry News Filter, Plug Power Inc., PLUG, financial performance, earnings, analysts' comments, recommendations, share price movement, disruptions, corporate, industrial news, content types, factiva filters, c&e exclusion filter, c&e industry news filter, energy, alternative fuels, fuel cells, industrial electronics, industrial goods, technology",
            "snippet": "Plug Power Inc.’s post-earnings stock rally was cooling Monday as several analysts expressed caution about the alternative-energy company’s path forward.\n\nP...",
            "url": "https://www.marketwatch.com/story/plug-powers-stock-momentum-cools-as-wall-street-still-has-these-questions-4b0a1de6?mod=mw_rss_topstories",
            "image_url": "https://images.mktw.net/im-70913565/social",
            "language": "en",
            "published_at": "2024-03-04T15:08:00.000000Z",
            "source": "marketwatch.com",
            "categories": [
                "business",
                "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: 2024-03-04T15:42:19 | 2024-03-04T15:42 | 2024-03-04T15 | 2024-03-04 | 2024-03 | 2024
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: 2024-03-04T15:42:19 | 2024-03-04T15:42 | 2024-03-04T15 | 2024-03-04 | 2024-03 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-03-04
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": 48957032,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "e90d05cd-52e0-416d-a068-86c224594c6a",
            "title": "Polícia indiana procura mais quatro suspeitos de estupro de brasileira",
            "description": "O ataque ocorreu na noite de sexta-feira (1º) no distrito de Dumka, no estado Jharkhand (leste da Índia), onde o casal, que viajava de moto, parou para acamp...",
            "keywords": "",
            "snippet": "Três indianos compareceram a um tribunal pela acusação de estupro coletivo de uma turista espanhola de origem brasileira que viajava por uma região remota d...",
            "url": "https://noticias.uol.com.br/ultimas-noticias/afp/2024/03/04/policia-indiana-procura-mais-quatro-suspeitos-de-estupro-de-espanhola-de-origem-brasileira.htm",
            "image_url": "https://conteudo.imguol.com.br/c/noticias/ad/2024/03/03/brasileira-e-vitima-de-estupro-coletivo-na-india-e-marido-e-espancado-1709464628024_v2_615x300.jpg",
            "language": "pt",
            "published_at": "2024-03-04T15:42:59.000000Z",
            "source": "uol.com.br",
            "categories": [
                "tech",
                "science"
            ],
            "relevance_score": null
        },
        {
            "uuid": "73c0731e-93e5-4301-a7e1-735cd23d6afd",
            "title": "鸡年,你应该知道的八件“鸡”事儿",
            "description": "鸡年,你应该知道的八件“鸡”事儿",
            "keywords": "鸡, 母鸡, jian",
            "snippet": "",
            "url": "http://www.360doc.com/content/24/0304/15/36403512_1116083316.shtml",
            "image_url": "http://image109.360doc.com/DownloadImg/2024/03/0415/280504954_4_20240304034337129.jpeg",
            "language": "zh",
            "published_at": "2024-03-04T15:42:57.000000Z",
            "source": "360doc.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "9c82c154-c601-4f19-96bc-9c7a302e910b",
            "title": "[천안24시] 천안시, ‘지자체 혁신평가’ 6년 연속 우수",
            "description": "충남 천안시는 행정안전부 주관 ‘2023년 지방자치단체 혁신평가’에서 우수기관으로 선정됐다고 4일 밝혔다. 시는 인공?...",
            "keywords": "천안시, 3·1운동, 유관순의날, 미주한인이민사박물관, 낫소카운티, 박상돈천안시장, 여성청소년, 생리용품바우처",
            "snippet": "글씨키우기 글씨줄이기 프린트 top\n\nfacebook twitter kakao story naver band share\n\n천안시, 뉴욕 낫소카운티 3·1운동의날 기념식에 ?...",
            "url": "http://www.sisajournal.com/news/articleView.html?idxno=284623",
            "image_url": "http://www.sisajournal.com/news/thumbnail/202403/284623_206272_435_v150.jpg",
            "language": "ko",
            "published_at": "2024-03-04T15:42:51.000000Z",
            "source": "sisajournal.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "80b1d1ed-281c-4e41-8f95-7e3e34889dfc",
            "title": "Offre d'emploi Médecin Biologiste embryologiste - - Tipaza, Algérie",
            "description": "Postulez à l'offre d'emploi Médecin Biologiste embryologiste à Tipaza, Algérie et consultez toutes les offres d'emploi de  sur emploitic.com",
            "keywords": "",
            "snippet": "Métier: Santé, Médical, Pharmacie\n\nLieu de travail: Tipaza, Algérie\n\nAnnées d'expérience: Sans Expérience, 1 À 2 Ans, 3 À 5 Ans\n\nNiveau du poste: Débu...",
            "url": "https://www.emploitic.com/entreprise/lbf/offres-d-emploi/offre-d-emploi/10079194-medecin-biologiste-embryologiste-tipaza-algerie",
            "image_url": "https://www.emploitic.com/images/minisites/emploitic/emploitic-logo.png",
            "language": "fr",
            "published_at": "2024-03-04T15:42:41.000000Z",
            "source": "emploitic.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "11363b01-423d-43a7-9960-b0432d89221f",
            "title": "태림포장, CJ대한통운에 택배상자 공급",
            "description": "골판지상자 1위 생산기업인 태림포장이 물류 1위 CJ대한통운에 택배상자를 공급한다. 대한통운은 태림의 포장재 및 제지 ...",
            "keywords": "헤럴드경제, 헤경, heraldcorp, 경제지, 신문, 뉴스, 보도, 속보, 정치, 경제, 사회, 국제, 문화, 사설, 컬럼, News, Newspaper, Korea, South Korea, Rep.Korea",
            "snippet": "양사 전략제휴…대한통운은 태림 물류 맡기로\n\n스티로폼, 골판지 보냉상자로 대체도 추진\n\n이복진 태림포장 대표(오른쪽...",
            "url": "https://biz.heraldcorp.com/view.php?ud=20240304050649",
            "image_url": "https://res.heraldm.com/content/image/2024/03/04/20240304050649_p.jpg",
            "language": "ko",
            "published_at": "2024-03-04T15:42:34.000000Z",
            "source": "biz.heraldcorp.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "ff7a71ed-1eb5-479d-8fc8-0ccb7f497638",
            "title": "Offre d'emploi proffesseur de soroban - - Tlemcen, Algérie",
            "description": "Postulez à l'offre d'emploi proffesseur de soroban à Tlemcen, Algérie et consultez toutes les offres d'emploi de Elite education sur emploitic.com",
            "keywords": "",
            "snippet": "Métier: Autres\n\nLieu de travail: Tlemcen, Algérie\n\nAnnées d'expérience: Moins D’un An\n\nNiveau du poste: Débutant / Junior\n\nNiveau d'étude: Master 1, Lic...",
            "url": "https://www.emploitic.com/entreprise/elite-education/offres-d-emploi/offre-d-emploi/10079193-proffesseur-de-soroban-tlemcen-algerie",
            "image_url": "https://www.emploitic.com/images/minisites/emploitic/emploitic-logo.png",
            "language": "fr",
            "published_at": "2024-03-04T15:42:29.000000Z",
            "source": "emploitic.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "c9b761c5-d9b4-4085-831b-8e1fadb42d6b",
            "title": "미래에셋증권, ‘개인투자용 국채’ 단독 판매 대행 기관 선정",
            "description": "[디지털투데이 강주현 기자] 미래에셋증권은 올해 처음 출시되는 ‘개인 투자용 국채’의 1호 판매 대행 기관으로 최종 ?...",
            "keywords": "미래에셋증권, 개인, 투자, 국채",
            "snippet": "미래에셋증권 전경 [사진:미래에셋증권]\n\n[디지털투데이 강주현 기자] 미래에셋증권은 올해 처음 출시되는 ‘개인 투자?...",
            "url": "https://www.digitaltoday.co.kr/news/articleView.html?idxno=508052",
            "image_url": "https://cdn.digitaltoday.co.kr/news/thumbnail/202403/508052_473158_42_v150.jpg",
            "language": "ko",
            "published_at": "2024-03-04T15:42:17.000000Z",
            "source": "digitaltoday.co.kr",
            "categories": [
                "tech",
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "f66e6fe3-93f6-4bc2-9c2c-f78d3e1d6d53",
            "title": "比亚迪“出海舰队”首航成功 首艘汽车滚装运输船已开始返航",
            "description": "比亚迪“出海舰队”首航成功 首艘汽车滚装运输船已开始返航",
            "keywords": "比亚迪, 船, 船舶, 比亚迪“出海舰队”首航成功 首艘汽车滚装运输船已开始返航, 快科技",
            "snippet": "比亚迪“出海舰队”首航成功 首艘汽车滚装运输船已开始返航\n\n快科技3月4日消息,据博主爆料,比亚迪开拓者1号汽车滚?...",
            "url": "https://news.mydrivers.com/1/966/966696.htm",
            "image_url": "https://img1.mydrivers.com/img/20240304/d33ddad8a4a246868e34539380a0e298.jpg",
            "language": "zh",
            "published_at": "2024-03-04T15:42:12.000000Z",
            "source": "news.mydrivers.com",
            "categories": [
                "tech",
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "2aee136b-6bad-4182-a683-19d33ecb0fea",
            "title": "Offre d'emploi professeur de coran - - Tlemcen, Algérie",
            "description": "Postulez à l'offre d'emploi professeur de coran à Tlemcen, Algérie et consultez toutes les offres d'emploi de Elite education sur emploitic.com",
            "keywords": "",
            "snippet": "Métier: Autres\n\nLieu de travail: Tlemcen, Algérie\n\nAnnées d'expérience: Moins D’un An\n\nNiveau du poste: Débutant / Junior\n\nNiveau d'étude: Licence (LMD)...",
            "url": "https://www.emploitic.com/entreprise/elite-education/offres-d-emploi/offre-d-emploi/10079192-professeur-de-coran-tlemcen-algerie",
            "image_url": "https://www.emploitic.com/images/minisites/emploitic/emploitic-logo.png",
            "language": "fr",
            "published_at": "2024-03-04T15:42:12.000000Z",
            "source": "emploitic.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "706e89e4-0047-4e5b-a41c-124042bff79d",
            "title": "빅플래닛, 공정위에 카카오엔터 신고…“음원 유통수수료 차별 부과”",
            "description": "연예기획사 빅플래닛메이드엔터(빅플래닛메이드)가 공정거래위원회에 카카오엔터테인먼트(카카오엔터)를 신고했다. 음...",
            "keywords": "빅플래닛, 카카오엔터, 멜론, 공정위, 신고",
            "snippet": "글씨키우기 글씨줄이기 프린트 top\n\nfacebook twitter kakao story naver band share\n\n“타 기획사는 수수료 20%…SM 등 관계사엔 5~6%”\n\n?...",
            "url": "http://www.sisajournal.com/news/articleView.html?idxno=284646",
            "image_url": "http://www.sisajournal.com/news/thumbnail/202403/284646_206343_4219_v150.jpg",
            "language": "ko",
            "published_at": "2024-03-04T15:42:00.000000Z",
            "source": "sisajournal.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        }
    ]
}
            
        

Similar News Available on: All plans

Endpoint

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

Use this endpoint to find similar stories to a specific article based on its UUID.

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

name required description
api_token true Your API token which can be found on your account dashboard.
categories false Comma separated list of categories to include.
Supported categories: general | science | sports | business | health | entertainment | tech | politics | food | travel
Example: business,tech
exclude_categories false Comma separated list of categories to exclude.
domains false Comma separated list of domains to include. List of domains can be obtained through our Sources endpoint, found further down this page.
exclude_domains false Comma separated list of domains to exclude
source_ids false Comma separated list of source_ids to include. List of source_ids can be obtained through our Sources endpoint, found further down this page.
exclude_source_ids false Comma separated list of source_ids to exclude.
language false Comma separated list of languages to include. Default is all.
Click here for a list of supported languages.
Examples: en,es (English + Spanish)
published_before false Find all articles published before the specified date. Supported formats include: Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2024-03-04T15:42:19 | 2024-03-04T15:42 | 2024-03-04T15 | 2024-03-04 | 2024-03 | 2024
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: 2024-03-04T15:42:19 | 2024-03-04T15:42 | 2024-03-04T15 | 2024-03-04 | 2024-03 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-03-04
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=2024-02-26
    

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

More

Stock Market News APIs

We also provide a dedicated finance and stock market news and analysis API, perfect for financial apps. Check it out here: marketaux.com.