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: 2024-12-09
headlines_per_category false Specify the number of articles you want to return per category. The maximum is 10 and the default is 6.
include_similar false Specify if you wish to include similar articles with each base article. Default is true.

Response Objects

name description
data > uuid The unique identifier for an article in our system. Store this and use it to find specific articles using our single article endpoint.
data > title The article title.
data > description The article meta description.
data > keywords The article meta keywords.
data > snippet The first 60 characters of the article body.
data > url The URL to the article.
data > image_url The URL to the article image.
data > language The language of the source.
data > published_at The datetime the article was published.
data > source The domain of the source.
data > categories Array of strings which the source is categorized as.
data > locale Locale of the source.
data > similar An array of similar articles to the base article.

If no results are found, the data object will be empty.

Example Request

            
                GET https://api.thenewsapi.com/v1/news/headlines?locale=us&language=en&api_token=YOUR_API_TOKEN
            
        

Example Response

            
                {
    "data": {
        "general": [
            {
                "uuid": "6851ff0f-3e94-44c3-8e2c-40a45a3dbd58",
                "title": "Jay-Z denies allegations he sexually assaulted a 13-year-old in 2000 with Sean ‘Diddy’ Combs",
                "description": "A woman who alleges she was sexually assaulted by Sean “Diddy” Combs has amended her lawsuit to include allegations that she was also assaulted by Jay-Z at the same party.",
                "keywords": "Jay-Z, Sean “Diddy” Combs, Tony Buzbee, sexual assault, allegations, frivolous lawsuit, civil lawsuit, Jane Doe, Plaintiff",
                "snippet": "Jay-Z attends the Los Angeles Premiere of Sony Pictures' \"The Book Of Clarence\" at Academy Museum of Motion Pictures on January 05, 2024 in Los Angeles, Califor...",
                "url": "https://www.yahoo.com/news/jay-z-accused-sexually-assaulting-005231770.html",
                "image_url": "https://media.zenfs.com/en/cnn_articles_875/5f3d5c1746e129084997df6676c0a3de",
                "language": "en",
                "published_at": "2024-12-09T10:04:54.000000Z",
                "source": "yahoo.com",
                "categories": [
                    "general",
                    "business",
                    "sports",
                    "entertainment"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "b8dd841e-09bd-40be-8ee4-9beb22cb114a",
                        "title": "Jay-Z Denies Allegations of Raping 13-Year-Old Girl With Diddy",
                        "description": "Sean \"Jay-Z\" Carter issued a statement after being named as an additional defendant in a sexual assault lawsuit originally filed against Sean \"Diddy\" Combs.",
                        "keywords": "",
                        "snippet": "Jay-Z is speaking out after a woman accused him in a civil lawsuit of raping her with she was 13 along with Sean \"Diddy\" Combs.\n\nOn Dec. 8, the accuser—identi...",
                        "url": "https://www.eonline.com/news/1410910/jay-z-denies-allegations-of-raping-13-year-old-girl-with-sean-diddy-combs?cmpid=rss-syndicate-genericrss-us-top_stories",
                        "image_url": "https://akns-images.eonline.com/eol_images/Entire_Site/2024118/rs_1200x1200-241208162711-1200-jay-z-the-book-of-clarence-premiere-cjh-010524.jpg?fit=around%7C1080:1080&output-quality=90&crop=1080:1080;center,top",
                        "language": "en",
                        "published_at": "2024-12-09T02:26:00.000000Z",
                        "source": "eonline.com",
                        "categories": [
                            "entertainment",
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "4b0676c0-4e14-48be-be91-195226584713",
                        "title": "Jay-Z References Beyonce, Kids in Statement Denying Rape Allegations",
                        "description": "Jay-Z references wife Beyoncé and the pair’s three children in an emotional statement that denies civil lawsuit allegations that he and Diddy raped a girl, 13, in 2000",
                        "keywords": "",
                        "snippet": "Jay-Z has referenced his wife Beyoncé and the pair’s three children within a statement denying allegations of rape lodged against him in a civil lawsuit.\n\nJa...",
                        "url": "https://www.usmagazine.com/celebrity-news/news/jay-z-references-beyonce-kids-in-statement-denying-rape-allegations/",
                        "image_url": "https://www.usmagazine.com/wp-content/uploads/2024/12/GettyImages-1463302347-Jay-Z.jpg?crop=0px%2C98px%2C1403px%2C736px&resize=1200%2C630&quality=86&strip=all",
                        "language": "en",
                        "published_at": "2024-12-09T03:13:01.000000Z",
                        "source": "usmagazine.com",
                        "categories": [
                            "entertainment",
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "06f5948d-dab6-4411-85d3-2d350f661479",
                        "title": "Lawsuit Claims Jay-Z Raped 13-Year-Old Girl with Diddy, Jay-Z Denies Allegations as a ‘Blackmail Attempt’",
                        "description": "A new lawsuit has claimed that rapper Jay-Z participated in the rape of a 13-year-old girl alongside music mogul Sean \"Diddy\" Combs. Jay-Z has denied the allegations as a \"blackmail attempt.\"",
                        "keywords": "",
                        "snippet": "A new lawsuit has claimed that rapper Jay-Z participated in the rape of a 13-year-old girl alongside music mogul Sean “Diddy” Combs. Jay-Z has denied the al...",
                        "url": "https://www.breitbart.com/entertainment/2024/12/08/lawsuit-claims-jay-z-raped-13-year-old-girl-with-diddy-he-denies-it/",
                        "image_url": "https://media.breitbart.com/media/2024/12/jayzdiddy-640x335.jpg",
                        "language": "en",
                        "published_at": "2024-12-09T03:05:19.000000Z",
                        "source": "breitbart.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "31fff48b-b494-46fc-aaf4-390b6d40a78e",
                        "title": "Jay-Z accused of raping 13-year-old alongside P Diddy",
                        "description": "Jay-Z and Diddy are accused of raping a 13-year-old girl at the 2000 MTV Video Music Awards’ after-party",
                        "keywords": "",
                        "snippet": "Rap star Jay-Z has been accused of raping a 13-year-old girl with fellow music mogul Sean “Diddy” Combs at a party in 2000, NBC News reported on Sunday, cit...",
                        "url": "https://www.rt.com/pop-culture/609035-jay-z-rape-lawsuit-diddy/",
                        "image_url": "https://mf.b37mrtl.ru/files/2024.12/article/6756a7cc2030274b754bec94.jpg",
                        "language": "en",
                        "published_at": "2024-12-09T08:47:07.000000Z",
                        "source": "rt.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    }
                ]
            },
            {
                "uuid": "3971d12e-dfb0-46a8-8552-3c0420e9c40e",
                "title": "Trump Says for First Time He Communicated With Xi After Election",
                "description": "(Bloomberg) -- Donald Trump said he had an exchange with Chinese leader Xi Jinping in recent days, the first clear indication of direct contact between the two men since the former US president’s reelection in November. Most Read from BloombergA Chicago Skyscraper Cements the Legacy of a Visionary Postmodern ArchitectNYC’s Run-Down Bus Terminal Gets Approval for $10 Billion RevampKansas City Looks Back on its Long, Costly Ride With MicrotransitIn an interview with NBC’s Meet the Press that aired",
                "keywords": "Donald Trump, Xi Jinping, Bloomberg, Beijing",
                "snippet": "(Bloomberg) -- Donald Trump said he had an exchange with Chinese leader Xi Jinping in recent days, the first clear indication of direct contact between the two ...",
                "url": "https://www.yahoo.com/news/trump-says-first-time-communicated-080137863.html",
                "image_url": "https://s.yimg.com/ny/api/res/1.2/7..2WOKaWQgOpOSpZrBz4g--/YXBwaWQ9aGlnaGxhbmRlcjt3PTEyMDA7aD04MDA-/https://media.zenfs.com/en/bloomberg_markets_842/f7fa552fdcf998a4d2feb919722d20f3",
                "language": "en",
                "published_at": "2024-12-09T08:01:37.000000Z",
                "source": "yahoo.com",
                "categories": [
                    "general",
                    "business",
                    "sports",
                    "entertainment"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "7a069217-2c32-4055-ba06-5c170adc2a8d",
                        "title": "Lara Trump steps down as RNC co-chair and addresses speculation about Florida Senate seat",
                        "description": "Lara Trump will step down as co-chair of the Republican National Committee",
                        "keywords": "Legislation, Government regulations, 2024 United States presidential election, Politics, Republican National Convention, Washington news, General news, Article, 116587585",
                        "snippet": "Lara Trump will step down as co-chair of the Republican National Committee as she considers a number of potential options with her father-in-law, President-elec...",
                        "url": "https://abcnews.go.com/US/wireStory/lara-trump-steps-rnc-chair-addresses-speculation-florida-116587585",
                        "image_url": "https://i.abcnewsfe.com/a/336df779-2f14-4313-a827-35837c83f133/wirestory_d0b9102b1095c383173bd6e24bbca015_16x9.jpg?w=1600",
                        "language": "en",
                        "published_at": "2024-12-09T04:06:27.000000Z",
                        "source": "abcnews.go.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "f851011c-8c48-4361-8751-95f8276c0f32",
                        "title": "Lara Trump says she’s stepping down as Republican National Committee co-chair",
                        "description": "Lara Trump, the daughter-in-law of President-elect Donald Trump, announced she will step down from her role as co-chair of the Republican National Committee amid speculation that she could be picked to fill an upcoming Senate vacancy.",
                        "keywords": "",
                        "snippet": "Lara Trump, the daughter-in-law of President-elect Donald Trump, announced Sunday night that she will step down as a co-chair of the Republican National Committ...",
                        "url": "https://www.nbcnews.com/politics/politics-news/lara-trump-stepping-down-republican-national-committe-rcna183394",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-12/24118-lara-trump-rc-1132p-671423.jpg",
                        "language": "en",
                        "published_at": "2024-12-09T05:27:07.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "53b86489-621a-4605-8c33-e84f382a9976",
                        "title": "Report: Israel PM Netanyahu to Attend Trump Inauguration",
                        "description": "Israel Prime Minister Benjamin Netanyahu will reportedly attend the inauguration of President-elect Donald Trump on January 20, 2025.",
                        "keywords": "",
                        "snippet": "Israel Prime Minister Benjamin Netanyahu will reportedly attend the inauguration of President-elect Donald Trump on January 20.\n\nThe Times of Israel reported th...",
                        "url": "https://www.breitbart.com/politics/2024/12/08/report-israel-prime-minister-netanyahu-attend-trump-inauguration/",
                        "image_url": "https://media.breitbart.com/media/2024/12/jan27-2020-Donald-Trump-Benjamin-Netanyahu-walking-away-getty-640x335.jpg",
                        "language": "en",
                        "published_at": "2024-12-09T04:19:20.000000Z",
                        "source": "breitbart.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-12-09T14:00:50 | 2024-12-09T14:00 | 2024-12-09T14 | 2024-12-09 | 2024-12 | 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-12-09T14:00:50 | 2024-12-09T14:00 | 2024-12-09T14 | 2024-12-09 | 2024-12 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-12-09
sort false Sort by published_on or relevance_score (only available when used in conjunction with search). Default is published_at unless search is used and sorting by published_at is not included, in which case relevance_score is used.
limit false Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan.
page false Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2

Response Objects

name description
meta > found The number of articles found for the request.
meta > returned The number of articles returned on the page. This is useful to determine the end of the result set as if this is lower than limit, there are no more articles after this page.
meta > limit The limit based on the limit parameter.
meta > page The page number based on the page parameter.
data > uuid The unique identifier for an article in our system. Store this and use it to find specific articles using our single article endpoint.
data > title The article title.
data > description The article meta description.
data > keywords The article meta keywords.
data > snippet The first 60 characters of the article body.
data > url The URL to the article.
data > image_url The URL to the article image.
data > language The language of the source.
data > published_at The datetime the article was published.
data > source The domain of the source.
data > categories Array of strings which the source is categorized as.
data > relevance_score Relevance score based on the search parameter. If the search parameter is not used, this will be null.
data > locale Locale of the source.

If no results are found, the data object will be empty.

Example Request

            
                GET https://api.thenewsapi.com/v1/news/top?api_token=YOUR_API_TOKEN&locale=us&limit=3
            
        

Example Response

            
                {
    "meta": {
        "found": 1179525,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "1fda7a18-1184-4271-beef-52dfe7a1b926",
            "title": "Video Inside Taylor Swift’s last Eras Tour show",
            "description": "The 14-time Grammy winner closed out her record-breaking world tour in front of a sold-out crowd in Vancouver.",
            "keywords": "",
            "snippet": "Inside Taylor Swift’s last Eras Tour show The 14-time Grammy winner closed out her record-breaking world tour in front of a sold-out crowd in Vancouver.",
            "url": "https://abcnews.go.com/GMA/Culture/video/inside-taylor-swifts-eras-tour-show-116592516",
            "image_url": "https://i.abcnewsfe.com/a/8e1d26ff-c16a-44fe-846d-48cfd1045f95/241209_gma_jarvis_taylorswift4_0731_hpMain_16x9.jpg?w=992",
            "language": "en",
            "published_at": "2024-12-09T13:44:06.000000Z",
            "source": "abcnews.go.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "c584b4c0-5530-4b22-8f4b-aa675306d96d",
            "title": "Jana Kramer loves Nashville family life, says ‘manners here matter’",
            "description": "Jana Kramer says she and husband Allan Russell love raising her two children with ex Mike Caussin and their one-year-old son in Nashville because of its values ...",
            "keywords": "",
            "snippet": "Nashville, Tenn. - Jana Kramer has her hands full with two kids under 10 years old and a one-year-old in the house.\n\n\"I love living here,\" she told Fox News Dig...",
            "url": "https://www.foxnews.com/entertainment/jana-kramer-loves-raising-kids-nashville-says-manners-here-matter",
            "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2024/12/jana-kramer1.jpg",
            "language": "en",
            "published_at": "2024-12-09T13:30:35.000000Z",
            "source": "foxnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "ae64e5d8-5713-498e-8309-1f40b2a3ed64",
            "title": "Panthers' Bryce Young receives praise for prayer as Eagles player suffers injury",
            "description": "Carolina Panthers quarterback Bryce Young received praise on Sunday for taking a moment to pray when Philadelphia Eagles safety C.J. Gardner-Johnson got hurt.",
            "keywords": "",
            "snippet": "Carolina Panthers quarterback Bryce Young nearly led his team to a victory over the Philadelphia Eagles on Sunday, but he received praise for one act during the...",
            "url": "https://www.foxnews.com/sports/panthers-bryce-young-receives-praise-prayer-eagles-player-suffers-injury",
            "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2024/12/bryce-young3.jpg",
            "language": "en",
            "published_at": "2024-12-09T13:27:06.000000Z",
            "source": "foxnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "2698a53e-fef8-4e0b-8a89-ccbe32866d71",
            "title": "Apple, Nvidia, and Microsoft are America's best-managed companies right now, report says",
            "description": "Big Tech led a new ranking of this year's best-run companies",
            "keywords": "Nvidia, Apple, Microsoft, Morgan Stanley, Business, Finance, Mastercard, American brands, Apple Inc., Intel, Pat Gelsinger, Technology, Internet, Quartz",
            "snippet": "Apple (AAPL-0.08%) is the best-managed company in the U.S., according to a new ranking by The Wall Street Journal.\n\n\n\nBooking.com’s AI trip planner aims to fe...",
            "url": "https://qz.com/apple-nvidia-microsoft-intel-best-managed-companies-1851716404",
            "image_url": "https://i.kinja-img.com/image/upload/c_fill,h_675,pg_1,q_80,w_1200/4fc83fc4d9ae5e78f4599d58b005efc1.jpg",
            "language": "en",
            "published_at": "2024-12-09T13:24:00.000000Z",
            "source": "qz.com",
            "categories": [
                "general",
                "business",
                "tech",
                "entertainment"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "8872c07b-fb24-4172-9f06-635bf4575c67",
            "title": "This AMD Analyst Is No Longer Bullish; Here Are Top 5 Downgrades For Monday - Bank of America (NYSE:BAC), Advanced Micro Devices (NASDAQ:AMD)",
            "description": "",
            "keywords": "",
            "snippet": "Top Wall Street analysts changed their outlook on these top names. For a complete view of all analyst rating changes, including upgrades and downgrades, please ...",
            "url": "https://www.benzinga.com/24/12/42388827/this-amd-analyst-is-no-longer-bullish-here-are-top-5-downgrades-for-monday",
            "image_url": "https://cdn.benzinga.com/files/images/story/2024/12/09/The-AMD-Trade.jpeg?width=1200&height=800&fit=crop",
            "language": "en",
            "published_at": "2024-12-09T13:23:55.000000Z",
            "source": "benzinga.com",
            "categories": [
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "fcde82a9-7a76-425c-a71c-abdeb4696976",
            "title": "Golden Globes 2025 Nominations: See the Complete List",
            "description": "The nominees for the 2025 Golden Globe Awards were announced on Monday, December 9, ahead of the January 2025 ceremony",
            "keywords": "",
            "snippet": "The list of nominees for the 2025 Golden Globe Awards proves that the stars will be shining bright at the 82nd annual ceremony.\n\nMindy Kaling and Morris Chestnu...",
            "url": "https://www.usmagazine.com/entertainment/news/golden-globes-2025-nominations-see-the-complete-list/",
            "image_url": "https://www.usmagazine.com/wp-content/uploads/2024/11/Golden-Globes-2025-Nominations-See-the-Complete-List-0072.jpg?w=1200&h=630&crop=1&quality=78&strip=all",
            "language": "en",
            "published_at": "2024-12-09T13:22:29.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "a680e948-9a4f-4015-a931-27bafd819f58",
            "title": "BioAge Labs, Riot Platforms And Other Big Stocks Moving Lower In Monday's Pre-Market Session - AppLovin (NASDAQ:APP), Bicara Therapeutics (NASDAQ:BCAX)",
            "description": "",
            "keywords": "",
            "snippet": "U.S. stock futures were mixed this morning, with the Dow futures gaining around 0.1% on Monday.\n\nShares of BioAge Labs, Inc. BIOA fell sharply in today's pre-ma...",
            "url": "https://www.benzinga.com/markets/24/12/42388601/bioage-labs-riot-platforms-and-other-big-stocks-moving-lower-in-mondays-pre-market-session",
            "image_url": "https://cdn.benzinga.com/files/images/story/2024/12/09/movers-image.jpeg?width=1200&height=800&fit=crop",
            "language": "en",
            "published_at": "2024-12-09T13:20:20.000000Z",
            "source": "benzinga.com",
            "categories": [
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "4629a478-038f-4798-9eab-d50c3592f5fa",
            "title": "Syntec Optics (Nasdaq: OPTX) Secures $2.1M in New Orders for Space Optics - Syntec Optics Holdings (NASDAQ:OPTX)",
            "description": "ROCHESTER, NEW YORK, Dec. 09, 2024 (GLOBE NEWSWIRE) -- Syntec Optics (NASDAQ:OPTX), a leading provider of mission-critical products to advanced technology defen...",
            "keywords": "",
            "snippet": "ROCHESTER, NEW YORK, Dec. 09, 2024 (GLOBE NEWSWIRE) -- Syntec Optics OPTX, a leading provider of mission-critical products to advanced technology defense, biome...",
            "url": "https://www.benzinga.com/pressreleases/24/12/g42388411/syntec-optics-nasdaq-optx-secures-2-1m-in-new-orders-for-space-optics",
            "image_url": "https://www.benzinga.com/next-assets/images/schema-image-default.png",
            "language": "en",
            "published_at": "2024-12-09T13:15:00.000000Z",
            "source": "benzinga.com",
            "categories": [
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "a40434a0-0979-4a60-addd-0c0b477745fc",
            "title": "LA Radio Host Robin Ayers Dead at 44",
            "description": "Los Angeles radio personality Robin Ayers has died at the age of 44. Her death was confirmed by fellow radio host Tavis Smiley.",
            "keywords": "",
            "snippet": "Watch : Disney Influencer Dominique Brown Dead At 34\n\nThe Los Angeles radio community is mourning the loss of one of their own.\n\nKBLA 1580 Talk Radio’s Robin ...",
            "url": "https://www.eonline.com/news/1410911/la-radio-host-robin-ayers-dead-at-44?cmpid=rss-syndicate-genericrss-us-top_stories",
            "image_url": "https://akns-images.eonline.com/eol_images/Entire_Site/2024119/cr_1200x1200-241209050549-GettyImages-1476968133_1.jpg?fit=around%7C1080:1080&output-quality=90&crop=1080:1080;center,top",
            "language": "en",
            "published_at": "2024-12-09T13:14:32.000000Z",
            "source": "eonline.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "d22847c2-6f3d-49cb-8edf-81164184ee95",
            "title": "Super Micro Surges 10% On Monday Pre-Market After Company Gets Nasdaq Extension To File Annual Report - Super Micro Computer (NASDAQ:SMCI)",
            "description": "The delay was initially announced in August when Super Micro postponed its annual report to evaluate internal controls over financial reporting.",
            "keywords": "",
            "snippet": "Shares of Super Micro Computer Inc. SMCI have jumped by 10.20% in Monday’s pre-market trading session. This surge follows the company’s successful acquisiti...",
            "url": "https://www.benzinga.com/markets/24/12/42388383/super-micro-surges-10-on-monday-pre-market-after-nasdaq-extension",
            "image_url": "https://cdn.benzinga.com/files/images/story/2024/12/09/Super-Micro-Computer--Inc--SMCI.jpeg?width=1200&height=800&fit=crop",
            "language": "en",
            "published_at": "2024-12-09T13:13:45.000000Z",
            "source": "benzinga.com",
            "categories": [
                "business"
            ],
            "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-12-09T14:00:50 | 2024-12-09T14:00 | 2024-12-09T14 | 2024-12-09 | 2024-12 | 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-12-09T14:00:50 | 2024-12-09T14:00 | 2024-12-09T14 | 2024-12-09 | 2024-12 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-12-09
sort false Sort by published_on or relevance_score (only available when used in conjunction with search). Default is published_at unless search is used and sorting by published_at is not included, in which case relevance_score is used.
limit false Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan.
page false Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2

Response Objects

name description
meta > found The number of articles found for the request.
meta > returned The number of articles returned on the page. This is useful to determine the end of the result set as if this is lower than limit, there are no more articles after this page.
meta > limit The limit based on the limit parameter.
meta > page The page number based on the page parameter.
data > uuid The unique identifier for an article in our system. Store this and use it to find specific articles using our single article endpoint.
data > title The article title.
data > description The article meta description.
data > keywords The article meta keywords.
data > snippet The first 60 characters of the article body.
data > url The URL to the article.
data > image_url The URL to the article image.
data > language The language of the source.
data > published_at The datetime the article was published.
data > source The domain of the source.
data > categories Array of strings which the source is categorized as.
data > relevance_score Relevance score based on the search parameter. If the search parameter is not used, this will be null.

If no results are found, the data object will be empty.

Example Request

            
                GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&language=en&limit=3
            
        

Example Response

            
                {
    "meta": {
        "found": 49269536,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "2cb05bed-7cea-42d6-a471-18f911ba8195",
            "title": "【速報】JR千歳駅構内で停電 千歳線・北広島⇔新千歳空港間運転見合わせ 快速エアポートにも影響 JR北海道9日午後1時30分発表",
            "description": "北海道の放送局として、北海道内で起こったニュースを毎日動画でお伝えしています。身近に起こった話題や情報をメ?...",
            "keywords": "",
            "snippet": "【速報】JR千歳駅構内で停電 千歳線・北広島⇔新千歳空港間運転見合わせ 快速エアポートにも影響 JR北海道9日?...",
            "url": "https://www.hbc.co.jp/news/f8cb99972c25471cb2111b85801166eb.html",
            "image_url": "https://www.hbc.co.jp/news/picture/37bbdda6b3ebcdc029f6760dfe8b8cfcL.jpg",
            "language": "ja",
            "published_at": "2024-12-09T14:00:50.000000Z",
            "source": "hbc.co.jp",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "f0f7b1ba-bf63-4f1a-b631-288635dccc7d",
            "title": "Botafogo: o que é a Copa Intercontinental, torneio que estreia em 2024",
            "description": "Blog do Rafael Reis explica o que é a nova competição da Fifa que terá o Botafogo, campeão da Libertadores, como participante neste ano",
            "keywords": "",
            "snippet": "Que torneio é esse?\n\nA primeira competição que o Botafogo disputará depois de se sagrar campeão brasileiro é aquele velho Mundial de Clubes da Fifa disput...",
            "url": "https://www.uol.com.br/esporte/futebol/colunas/rafael-reis/2024/12/09/o-que-e-a-copa-intercontinental-que-o-botafogo-comeca-a-jogar-na-quarta.htm",
            "image_url": "https://conteudo.imguol.com.br/c/esporte/15/2024/12/04/igor-jesus-luiz-henrique-e-savarino-comemoram-gol-em-inter-x-botafogo-1733360700364_v2_615x300.jpg",
            "language": "pt",
            "published_at": "2024-12-09T14:00:50.000000Z",
            "source": "uol.com.br",
            "categories": [
                "tech",
                "science"
            ],
            "relevance_score": null
        },
        {
            "uuid": "dbf48c86-47bd-4e38-9a36-e7a47c70c3d7",
            "title": "아이오닉 5 N ‘그란 투리스모 월드시리즈2024’ 월드 파이널 등장",
            "description": "현대자동차의 첫 고성능 전기차 아이오닉 5 N이 ‘그란 투리스모 월드 시리즈(Gran Turismo World Series) 2024’ 월드 파이널에 ?...",
            "keywords": "현대자동차, 아이오닉 5 N, 그란투리스모 월드 시리즈 2024, 월드 파이널 네이션스 컵, 트라이얼 레이스 예선, 선정",
            "snippet": "현대차는 지난 8일 네덜란드 암스테르담에서 열린 e스포츠 토너먼트 ‘그란 투리스모 월드 시리즈(Gran Turismo World Series) 20...",
            "url": "https://www.nbnews.kr/news/articleView.html?idxno=101559",
            "image_url": "https://cdn.nbnews.kr/news/thumbnail/202412/101559_117045_1251_v150.jpg",
            "language": "ko",
            "published_at": "2024-12-09T14:00:44.000000Z",
            "source": "greendaily.co.kr",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "25eb4b80-9130-45dd-87e0-400056cfc106",
            "title": "강서대학교-서울서부하나센터, ‘북한이탈주민 인식개선 캠페인’ 성공적 개최",
            "description": "강서대학교(총장 김용재)가 지난달 14일 서울서부하나센터와 협력해 본교에서 통일 이후의 강서대학교라는 주제로 ‘북?...",
            "keywords": "",
            "snippet": "강서대학교(총장 김용재)가 지난달 14일 서울서부하나센터와 협력해 본교에서 통일 이후의 강서대학교라는 주제로 ‘북?...",
            "url": "https://www.dailysecu.com/news/articleView.html?idxno=161938",
            "image_url": "https://www.dailysecu.com/news/photo/202412/161938_189820_571.jpg",
            "language": "ko",
            "published_at": "2024-12-09T14:00:30.000000Z",
            "source": "dailysecu.com",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "0706fa43-d937-46b1-bb93-717ea96ea4e0",
            "title": "[인사] 행복청",
            "description": "◇ 국장급 전보▷도시계획국장 김효정",
            "keywords": "알림",
            "snippet": "카카오스토리(으)로 기사보내기 구글+(으)로 기사보내기 네이버밴드(으)로 기사보내기 카카오톡(으)로 기사보내기 핀터?...",
            "url": "https://www.jbnews.com/news/articleView.html?idxno=1460767",
            "image_url": "https://www.jbnews.com/image/logo/snslogo_20220701095855.png",
            "language": "ko",
            "published_at": "2024-12-09T14:00:26.000000Z",
            "source": "jbnews.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "73a90aff-2647-4326-b432-1d99a5620ce0",
            "title": "KBS구성원, '계엄 사전 언질' 의혹 사장·보도국장 고발",
            "description": "[미디어스=고성욱 기자] 전국언론노동조합 KBS본부 쟁의대책위원회가 ‘대통령실 계엄방송 사전 언질’ 의혹과 관련해 ?...",
            "keywords": "윤석열, 비상계엄, 친위 쿠데타, 내란죄, 군사반란죄, 충암파, 계엄방송, KBS, 최재현, 박민, 대통령실",
            "snippet": "[미디어스=고성욱 기자] 전국언론노동조합 KBS본부 쟁의대책위원회가 ‘대통령실 계엄방송 사전 언질’ 의혹과 관련해 ?...",
            "url": "https://www.mediaus.co.kr/news/articleView.html?idxno=310884",
            "image_url": "https://cdn.mediaus.co.kr/news/thumbnail/202412/310884_217174_1449_v150.jpg",
            "language": "ko",
            "published_at": "2024-12-09T14:00:17.000000Z",
            "source": "mediaus.co.kr",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "21b679b4-a7a3-47ab-b276-d60090b70503",
            "title": "Today in Korean history",
            "description": "Dec. 10 1973 -- South Korea establishes diplomatic relations with India. 2000 -- South...",
            "keywords": "",
            "snippet": "Dec. 10\n\n\n\n1973 -- South Korea establishes diplomatic relations with India.\n\n\n\n2000 -- South Korean President Kim Dae-jung receives the Nobel Peace Prize in rec...",
            "url": "https://en.yna.co.kr/view/AEN20241208003900320?section=news&input=rss",
            "image_url": "https://r.yna.co.kr/global/home/v01/img/yonhapnews_logo_1200x800_en01.jpg",
            "language": "en",
            "published_at": "2024-12-09T14:00:16.000000Z",
            "source": "yna.co.kr",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "806c06fb-ea0e-4d3c-abc3-5fe2b264d830",
            "title": "서천군, 2024 서천철새여행 개막식 개최",
            "description": "[중부매일 서성원 기자] 지난 7일 서천군철새여행추진위원회(위원장 박근춘)는 서천군조류생태전시관 일원에서 김기웅...",
            "keywords": "서천철새여행",
            "snippet": "7일 서천철새여행 개막식 사진/서천군지속가능발전협의회 제공\n\n[중부매일 서성원 기자] 지난 7일 서천군철새여행추진?...",
            "url": "https://www.jbnews.com/news/articleView.html?idxno=1460770",
            "image_url": "https://cdn.jbnews.com/news/thumbnail/202412/1460770_1290956_09_v150.jpg",
            "language": "ko",
            "published_at": "2024-12-09T14:00:14.000000Z",
            "source": "jbnews.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "f6141882-464b-46cc-9921-99fe95fc63d5",
            "title": "Analyzing the Gameplay & Art Direction of the Resident Evil 4 Remake",
            "description": "Room 8 Group’s Hunter Wright and Boti Harko return to write for 80 Level to take a closer look at Capcom’s excellent remake of Resident Evil 4.",
            "keywords": "Feature, Video games, Game development, Sponsored advertisement",
            "snippet": "After the success of RE4, the following two games – RE5 (2009) and RE6 (2012) – were more action-horror than survival-horror. Both sold very well, but some ...",
            "url": "https://80.lv/articles/analyzing-the-gameplay-art-direction-of-the-resident-evil-4-remake/",
            "image_url": "https://cdn.80.lv/api/upload/meta/38324/images/6751692e06a6d/contain_1200x630.jpg",
            "language": "en",
            "published_at": "2024-12-09T14:00:00.000000Z",
            "source": "80.lv",
            "categories": [
                "tech",
                "entertainment"
            ],
            "relevance_score": null
        },
        {
            "uuid": "a6b33779-6c68-4c42-bd03-a7bbf5fae994",
            "title": "비포펫 김동현 대표, ‘AI로 만드는 반려견과 보호자 산책의 기준 안전한 솔루션을 만들다’",
            "description": "반려견의 모든 견주들의 공통 된 고민, 출근하면 반려견이 집에서 혼자 기다리고 있을텐데 우리 아이 산책을 시켜야 하?...",
            "keywords": "",
            "snippet": "세종특별자치시 세종오픈이노베이션 ‘세종형 유니콘 기업’ 비포펫 선정\n\n반려견의 모든 견주들의 공통 된 고민, 출근?...",
            "url": "http://www.e2news.com/news/articleView.html?idxno=315258",
            "image_url": "https://cdn.e2news.com/news/thumbnail/202412/315258_214100_3812_v150.jpg",
            "language": "ko",
            "published_at": "2024-12-09T14:00:00.000000Z",
            "source": "e2news.com",
            "categories": [],
            "relevance_score": null
        }
    ]
}
            
        

Similar News Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

name required description
api_token true Your API token which can be found on your account dashboard.
categories false Comma separated list of categories to include.
Supported categories: general | science | sports | business | health | entertainment | tech | politics | food | travel
Example: business,tech
exclude_categories false Comma separated list of categories to exclude.
domains false Comma separated list of domains to include. List of domains can be obtained through our Sources endpoint, found further down this page.
exclude_domains false Comma separated list of domains to exclude
source_ids false Comma separated list of source_ids to include. List of source_ids can be obtained through our Sources endpoint, found further down this page.
exclude_source_ids false Comma separated list of source_ids to exclude.
language false Comma separated list of languages to include. Default is all.
Click here for a list of supported languages.
Examples: en,es (English + Spanish)
published_before false Find all articles published before the specified date. Supported formats include: Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2024-12-09T14:00:50 | 2024-12-09T14:00 | 2024-12-09T14 | 2024-12-09 | 2024-12 | 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-12-09T14:00:50 | 2024-12-09T14:00 | 2024-12-09T14 | 2024-12-09 | 2024-12 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-12-09
limit false Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan.
page false Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2

Response Objects

name description
meta > found The number of articles found for the request.
meta > returned The number of articles returned on the page. This is useful to determine the end of the result set as if this is lower than limit, there are no more articles after this page.
meta > limit The limit based on the limit parameter.
meta > page The page number based on the page parameter.
data > uuid The unique identifier for an article in our system. Store this and use it to find specific articles using our single article endpoint.
data > title The article title.
data > description The article meta description.
data > keywords The article meta keywords.
data > snippet The first 60 characters of the article body.
data > url The URL to the article.
data > image_url The URL to the article image.
data > language The language of the source.
data > published_at The datetime the article was published.
data > source The domain of the source.
data > categories Array of strings which the source is categorized as.
data > relevance_score Relevance score based on the article provided.

If no results are found, the data object will be empty.

Example Request

            
                GET https://api.thenewsapi.com/v1/news/similar/cc11e3ab-ced0-4a42-9146-e426505e2e67?api_token=YOUR_API_TOKEN&language=en&published_on=2020-12-01
            
        

Example Response

            
                
            {
               "meta": {
                  "found": 3571,
                  "returned": 3,
                  "limit": 3,
                  "page": 1
               },
               "data": [
                  {
                     "uuid": "df4ad427-a672-4c67-b6c6-6f81aa00e164",
                     "title": "Tesla stock jumps after announcement it will join S&P 500 in one go",
                     "description": "Tesla's stock price surged early Tuesday after the company b...",
                     "keywords": "Business, s&p 500, stocks, tesla",
                     "snippet": "Tesla’s stock price surged early Tuesday after the company...",
                     "url": "https://nypost.com/2020/12/01/tesla-stock-jumps-on-news-it-will-join-sp-500-in-one-shot/",
                     "image_url": "https://nypost.com/wp-content/uploads/sites/2/2020/12/tesla-52.jpg?quality=90&strip=all&w=1200",
                     "language": "en",
                     "published_at": "2020-12-01T14:35:46.000000Z",
                     "source": "nypost.com",
                     "categories": [
                        "business"
                     ],
                     "relevance_score": 153.61266
                  },
                  {
                     "uuid": "c9a23881-12dd-4005-8982-7b6552a2eb50",
                     "title": "Tesla To Join S&P 500 With Full Market Cap On December 21",
                     "description": "Tesla will be added to the S&P 500 index all at once at its ...",
                     "keywords": "Tesla, S&P500, EV, Automotive, Stocks, Investing",
                     "snippet": "Tesla (NASDAQ: TSLA) will be added to the S&P 500 index all ...",
                     "url": "https://oilprice.com/Latest-Energy-News/World-News/Tesla-To-Join-SP-500-With-Full-Market-Cap-On-December-21.html",
                     "image_url": "https://d32r1sh890xpii.cloudfront.net/news/718x300/2020-12-01_xwjdajwctl.jpg",
                     "language": "en",
                     "published_at": "2020-12-01T16:30:00.000000Z",
                     "source": "oilprice.com",
                     "categories": [
                        "general",
                        "business"
                     ],
                     "relevance_score": 146.92773
                  },
                  {
                     "uuid": "18afdb1c-7742-4016-bf8c-a2f114e11199",
                     "title": "Tesla to Enter S&P 500 at Full Weight in December",
                     "description": "The electric-vehicle maker will be added to the broad stock-...",
                     "keywords": "Motor Vehicles, Alternative Fuel Vehicles, Trusts Funds Financial Vehicles, Diversified Holding Companies, Automotive",
                     "snippet": "S&P Dow Jones Indices said it will add Tesla Inc.’s full w...",
                     "url": "https://www.wsj.com/articles/tesla-to-enter-s-p-500-at-full-weight-in-december-11606780897?mod=pls_whats_news_us_business_f",
                     "image_url": "https://images.wsj.net/im-265933/social",
                     "language": "en",
                     "published_at": "2020-12-01T00:01:00.000000Z",
                     "source": "online.wsj.com",
                     "categories": [
                        "business"
                     ],
                     "relevance_score": 128.22346
                  }
               ]
            }
        
            
        

News by UUID Available on: All plans

Endpoint

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

Use this endpoint to find specific articles by the UUID which is returned on our search endpoints. This is useful if you wish to store the UUID to return the article later.

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

name required description
api_token true Your API token which can be found on your account dashboard.

Response Objects

name description
uuid The unique identifier for an article in our system. Store this and use it to find specific articles using our single article endpoint.
title The article title.
description The article meta description.
keywords The article meta keywords.
snippet The first 60 characters of the article body.
url The URL to the article.
image_url The URL to the article image.
language The language of the source.
published_at The datetime the article was published.
source The domain of the source.
categories Array of strings which the source is categorized as.

If no results are found, a resource_not_found error will be returned.

Example Request

            
                GET https://api.thenewsapi.com/v1/news/uuid/147013d8-6c2c-4d50-8bad-eb3c8b7f5740?api_token=YOUR_API_TOKEN
            
        

Example Response

            
                
            {
                "uuid": "147013d8-6c2c-4d50-8bad-eb3c8b7f5740",
                "title": "These Are The Four American Companies Worth Over $1 Trillion Each – 24",
                "description": "America’s major market indexes set records in the early pa...",
                "keywords": "",
                "snippet": "These Are The Four American Companies Worth Over $1 Trillion...",
                "url": "https://247wallst.com/investing/2020/10/17/these-are-the-four-american-companies-worth-over-1-trillion-each/",
                "image_url": "https://247wallst.com/wp-content/uploads/2020/08/imageForEntry2-Qrj.jpg",
                "language": "en",
                "published_at": "2020-10-17T11:16:20.000000Z",
                "source": "247wallst.com",
                "categories": [
                    "business"
                ]
            }
        
            
        

Sources Available on: All plans

Endpoint

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

Use this endpoint to sources to use in your news API requests. Note that the limit is 50 for all requests.

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

All text data returned is UTF-8.

HTTP GET Parameters

name required description
categories false Comma separated list of categories to include
Example: business,tech
exclude_categories false Comma separated list of categories to exclude
language false Comma separated list of languages to include. Default is all.
Click here for a list of supported languages.
Examples: en,es (English + Spanish)
page false Use this to paginate through the result set. Default is 1.
Example: page=2

Response Objects

name description
meta > found The number of sources found for the request.
meta > returned The number of sources returned on the page.
meta > limit The limit is 50. This currently can not be changed.
meta > page The page number based on the page parameter.
data > source_id The unique ID of the source feed. Use this for the source_ids or exclude_source_ids parameters in the news endpoints. There may be many source_ids for each domain, therefore we would generally suggest using the domains filter instead the source_ids filter.
data > domain The domain of the source. You can use this for the domains or exclude_domains parameters in the news endpoints.
data > language The source language.
data > locale The source locale. Note that only select sources have locales.
data > categories Array of strings which the source is categorized as.

If no results are found, the data object will be empty.

Example Request

            
                GET https://api.thenewsapi.com/v1/news/sources?api_token=YOUR_API_TOKEN&language=en
            
        

Example Response

            
                
            {
                "meta": {
                    "found": 15453,
                    "returned": 50,
                    "limit": 50,
                    "page": 1
                },
                "data": [
                    {
                        "source_id": "arstechnica.com-1",
                        "domain": "arstechnica.com",
                        "language": "en",
                        "locale": null,
                        "categories": [
                            "tech"
                        ]
                    },
                    {
                        "source_id": "adweek.com-1",
                        "domain": "adweek.com",
                        "language": "en",
                        "locale": null,
                        "categories": [
                            "business"
                        ]
                    },
                    ...
        
            
        

Errors

Errors

If your request was unsuccessful, you will receive a JSON formatted error. Below you will find the potential errors you may encounter when using the API.

Errors

error code HTTP status description
malformed_parameters 400 Validation of parameters failed. The failed parameters are usually shown in the error message.
invalid_api_token 401 Invalid API token.
usage_limit_reached 402 Usage limit of your plan has been reached. Usage limit and remaining requests can be found on the X-UsageLimit-Limit header.
endpoint_access_restricted 403 Access to the endpoint is not available on your current subscription plan.
resource_not_found 404 Resource could not be found.
invalid_api_endpoint 404 API route does not exist.
rate_limit_reached 429 Too many requests in the past 60 seconds. Rate limit and remaining requests can be found on the X-RateLimit-Limit header.
server_error 500 A server error occured.
maintenance_mode 503 The service is currently under maintenance.

Example Error Response

            
                
            {
                "error": {
                    "code": "malformed_parameters",
                    "message": "The published_before parameter(s) are incorrectly formatted."
                }
            }
        
            
        

Examples

API Examples

Our endpoints are very useful for filtering to find only specific resources you need. Follow each example request below to see how you can build dynamic queries.

Example Request 1

This is a basic request which will return all articles which match the search term "usd" within the title or body of the article:

    
        GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=usd
    

Example Request 2

This will return all articles which match the search term "usd" OR "gbp":

    
        GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=usd%20%7C%20gbp
    

Example Request 3

This will return all articles which match the search term "usd" AND "gbp":

    
        GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=usd%20%2B%20gbp
    

Example Request 4

This will return all articles which match the search term "usd" AND "gbp" but removes any articles which mentions "cad":

    
        GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=usd%20%2B%20gbp%20-cad
    

Example Request 5

This will return all articles which match the search term "forex" AND "usd" OR "gbp" but removes any articles which mentions "cad":

    
        GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=forex%20%2B%20%28usd%20%7C%20gbp%29%20-cad
    

Example Request 6

This is the same as Example Request 5 but will also ensure the articles returned are in English and categorized by business or tech but not travel, and are published within the last week:

    
        GET https://api.thenewsapi.com/v1/news/all?api_token=YOUR_API_TOKEN&search=forex%20%2B%20%28usd%20%7C%20gbp%29%20-cad&language=en&categories=business%2Ctech&exclude_categories=travel&published_after=2024-12-02
    

Code Examples

See our prepared examples below to quickly get started implementing our API into your next project.

PHP

    
        $queryString = http_build_query([
            'api_token' => 'YOUR_API_TOKEN',
            'categories' => 'business,tech',
            'search' => 'apple',
            'limit' => 50,
        ]);

        $ch = curl_init(sprintf('%s?%s', 'https://api.thenewsapi.com/v1/news/all', $queryString));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        $json = curl_exec($ch);

        curl_close($ch);

        $apiResult = json_decode($json, true);

        print_r($apiResult);
    

Python

    
        # Python 3
        import http.client, urllib.parse

        conn = http.client.HTTPSConnection('api.thenewsapi.com')

        params = urllib.parse.urlencode({
            'api_token': 'YOUR_API_TOKEN',
            'categories': 'business,tech',
            'limit': 50,
            })

        conn.request('GET', '/v1/news/all?{}'.format(params))

        res = conn.getresponse()
        data = res.read()

        print(data.decode('utf-8'))
    

Go

    
        package main

        import (
            "fmt"
            "io/ioutil"
            "net/http"
            "net/url"
        )

        func main() {
            baseURL, _ := url.Parse("https://thenewsapi.com")

            baseURL.Path += "v1/news/all"

            params := url.Values{}
            params.Add("api_token", "YOUR_API_TOKEN")
            params.Add("categories", "business,tech")
            params.Add("search", "apple")
            params.Add("limit", "50")

            baseURL.RawQuery = params.Encode()

            req, _ := http.NewRequest("GET", baseURL.String(), nil)

            res, _ := http.DefaultClient.Do(req)

            defer res.Body.Close()

            body, _ := ioutil.ReadAll(res.Body)

            fmt.Println(string(body))
        }
    

JavaScript

    
        var requestOptions = {
            method: 'GET'
        };

        var params = {
            api_token: 'YOUR_API_TOKEN',
            categories: 'business,tech',
            search: 'apple',
            limit: '50'
        };

        var esc = encodeURIComponent;
        var query = Object.keys(params)
            .map(function(k) {return esc(k) + '=' + esc(params[k]);})
            .join('&');

        fetch("https://api.thenewsapi.com/v1/news/all?" + query, requestOptions)
          .then(response => response.text())
          .then(result => console.log(result))
          .catch(error => console.log('error', error));
    

C#

    
        var client = new RestClient("https://api.thenewsapi.com/v1/news/all");
        client.Timeout = -1;

        var request = new RestRequest(Method.GET);

        request.AddQueryParameter("api_token", "YOUR_API_TOKEN");
        request.AddQueryParameter("categories", "business,tech");
        request.AddQueryParameter("search", "apple");
        request.AddQueryParameter("limit", "50");

        IRestResponse response = client.Execute(request);
        Console.WriteLine(response.Content);
    

Java

    
        OkHttpClient client = new OkHttpClient().newBuilder()
          .build();

        HttpUrl.Builder httpBuilder = HttpUrl.parse("https://api.thenewsapi.com/v1/news/all").newBuilder();
        httpBuilder.addQueryParameter("api_token", "YOUR_API_TOKEN");
        httpBuilder.addQueryParameter("categories", "business,tech");
        httpBuilder.addQueryParameter("search", "apple");
        httpBuilder.addQueryParameter("limit", "50");

        Request request = new Request.Builder().url(httpBuilder.build()).build();

        Response response = client.newCall(request).execute();