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

Response Objects

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

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

Example Request

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

Example Response

            
                {
    "data": {
        "general": [
            {
                "uuid": "d47139de-3e4f-434c-8c35-b3a04dc73491",
                "title": "North Carolina governor candidate Mark Robinson sues CNN over report about posts on porn site",
                "description": "North Carolina Lt. Gov. Mark Robinson has announced a lawsuit against CNN over its recent report alleging he made explicit racial and sexual posts on a pornography website’s message board",
                "keywords": "Legal proceedings, Government appointments and nominations, Pornography, Elections, 2024 United States presidential election, U.S. news, General news, Politics, Article, 114812610",
                "snippet": "North Carolina Lt. Gov. Mark Robinson has announced a lawsuit against CNN over its recent report alleging he made explicit racial and sexual posts on a pornogra...",
                "url": "https://abcnews.go.com/US/wireStory/north-carolina-governor-candidate-mark-robinson-sues-cnn-114812610",
                "image_url": "https://i.abcnewsfe.com/a/0cd4712e-2be4-4ff6-87a1-91e59e7c3377/wirestory_e195d3d8a03ce7d0b3496ab7cecefbe7_16x9.jpg?w=1600",
                "language": "en",
                "published_at": "2024-10-15T14:22:29.000000Z",
                "source": "abcnews.go.com",
                "categories": [
                    "general",
                    "politics"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "bb5fc6b8-5d9a-4a7e-baf2-e73633e3cf3d",
                        "title": "South Carolina, UConn lead AP preseason women's basketball poll",
                        "description": "South Carolina received 27 of 30 first-place votes and is ranked No. 1 in the AP Top 25 preseason women's college basketball poll ahead of UConn, USC, Texas and UCLA.",
                        "keywords": "",
                        "snippet": "Elle Duncan details South Carolina's dominance under coach Dawn Staley and how the Gamecocks went undefeated to capture the women's NCAA title without returning...",
                        "url": "https://www.espn.com/womens-college-basketball/story/_/id/41811186/south-carolina-uconn-lead-ap-preseason-women-basketball-poll",
                        "image_url": "https://a.espncdn.com/combiner/i?img=%2Fphoto%2F2024%2F0408%2Fr1315780_1296x729_16%2D9.jpg",
                        "language": "en",
                        "published_at": "2024-10-15T17:41:37.000000Z",
                        "source": "espn.com",
                        "categories": [
                            "sports",
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "59e25f13-a350-4371-8c8a-28631bbfd6db",
                        "title": "92 people still missing in North Carolina after Hurricane Helene, governor says",
                        "description": "At least 92 people are still unaccounted for in North Carolina as first responders still sort through the aftermath of Hurricane Helene, weeks after the storm devastated the western part of the state.",
                        "keywords": "",
                        "snippet": "Create your free profile or log in to save this article\n\nCreate your free profile or log in to save this article\n\nAt least 92 people are still unaccounted for i...",
                        "url": "https://www.nbcnews.com/weather/hurricanes/92-people-still-missing-north-carolina-hurricane-helene-governor-says-rcna175503",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-10/241015-helene-search-north-carolina-mn-1135-2619f5.jpg",
                        "language": "en",
                        "published_at": "2024-10-15T16:31:17.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "ecde337b-7fec-4431-98fd-157f7442e368",
                        "title": "Biden administration announces $750 million investment in North Carolina chipmaker Wolfspeed",
                        "description": "Money will go to the chipmaker's new silicon carbide factory in North Carolina and factory in Marcy, New York.",
                        "keywords": "Technology, North Carolina, Joe Biden, Elections, Electric Vehicles, Politics, China",
                        "snippet": "The Biden-Harris administration announced plans Tuesday to provide up to $750 million in direct funding to semiconductor developer and manufacturer Wolfspeed. T...",
                        "url": "https://www.cbsnews.com/news/biden-funding-wolfspeed-north-carolina-chips-act/",
                        "image_url": "https://assets2.cbsnewsstatic.com/hub/i/r/2024/10/15/1da5f48d-99bd-4d91-b426-3e87bbccb8c2/thumbnail/1200x630/326cdb84c9319ea481f39c7c1187eab5/gettyimages-1249699251.jpg?v=29b5ccc4d237d9b284ce95a42effd073",
                        "language": "en",
                        "published_at": "2024-10-15T19:06:01.000000Z",
                        "source": "cbsnews.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "4aa2223a-fd7a-4448-bba9-62ba81393397",
                        "title": "FEMA resumes door-to-door visits in North Carolina after threats tied to disinformation",
                        "description": "Officials say federal disaster workers have resumed door-to-door visits as part of hurricane recovery efforts in North Carolina",
                        "keywords": "Politics, Misinformation, Hurricanes and typhoons, Disaster planning and response, U.S. news, General news, Article, 114825693",
                        "snippet": "ASHEVILLE, N.C. -- Federal disaster personnel have resumed door-to-door visits as part of their hurricane-recovery work in North Carolina, an effort temporarily...",
                        "url": "https://abcnews.go.com/US/wireStory/fema-resumes-door-door-visits-north-carolina-after-114825693",
                        "image_url": "https://i.abcnewsfe.com/a/578ec970-5a4c-41d5-b228-83813645732b/wirestory_04b8f753a82c652bc013d556d22a5d46_16x9.jpg?w=1600",
                        "language": "en",
                        "published_at": "2024-10-15T19:10:33.000000Z",
                        "source": "abcnews.go.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "fcaf63ff-fc24-42fb-bf86-1ac7559fcc57",
                        "title": "Parasitic outbreak in North Carolina traced to undercooked bear meat, CDC says",
                        "description": "A gathering in North Carolina last year resulted in 10 probable cases of a parasitic infection from undercooked bear meat, according to a new report from the Centers for Disease Control and Prevention.",
                        "keywords": "",
                        "snippet": "Create your free profile or log in to save this article\n\nCreate your free profile or log in to save this article\n\nA gathering in North Carolina last year result...",
                        "url": "https://www.nbcnews.com/news/us-news/parasitic-outbreak-north-carolina-traced-undercooked-bear-meat-cdc-say-rcna175565",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-10/241015-black-bear-vl-254p-5eb21c.jpg",
                        "language": "en",
                        "published_at": "2024-10-15T19:47:51.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    }
                ]
            },
            {
                "uuid": "694e046e-d118-434f-b3ec-001e0069a758",
                "title": "'The View' host admits Kamala Harris needs 'concrete examples' of how she will differ from President Biden",
                "description": "Ana Navarro, a host of 'The View' and a CNN political commentator said Tuesday that Vice President Kamala Harris needs more",
                "keywords": "",
                "snippet": "\"The View\" co-host Ana Navarro, also a CNN political commentator, said Tuesday during an appearance on CNN that Vice President Kamala Harris needed to find some...",
                "url": "https://www.foxnews.com/media/the-view-host-admits-kamala-harris-needs-concrete-examples-how-differ-president-biden",
                "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2024/10/ana-navarro-cnn-harris.jpg",
                "language": "en",
                "published_at": "2024-10-15T16:16:46.000000Z",
                "source": "foxnews.com",
                "categories": [
                    "general",
                    "politics"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "6925fc55-f15e-4847-8417-f65d1b511ecb",
                        "title": "Seven Questions Fox News’s Bret Baier Should Ask Kamala Harris",
                        "description": "The Kamala Harris campaign will allow her to sit for an interview with Fox News's Bret Baier. Here are 7 questions he should ask her.",
                        "keywords": "",
                        "snippet": "The Harris campaign will allow Vice President Kamala Harris to sit for an interview Wednesday with Fox News’s Bret Baier, sparking debate about what questions...",
                        "url": "https://www.breitbart.com/2024-election/2024/10/15/seven-questions-fox-news-s-bret-baier-should-ask-kamala-harris/",
                        "image_url": "https://media.breitbart.com/media/2024/10/Kamala-Harris-closeup-fright-ap-640x335.jpg",
                        "language": "en",
                        "published_at": "2024-10-15T16:17:07.000000Z",
                        "source": "breitbart.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "dad04eeb-f9e3-4a49-9a6a-56f60dbcf868",
                        "title": "Watch — Rap Legend Lord Jamar Rips Kamala Harris: ‘She’s Insulting to Black People… She Thinks We Are Stupid’",
                        "description": "The rapper and actor Lord Jamar is no fan of Kamala Harris, saying she is \"insulting to black people\" and is woefully unqualified to become president of the United States. | Entertainment",
                        "keywords": "",
                        "snippet": "The rapper and actor Lord Jamar is no fan of Kamala Harris, saying she is “insulting to black people” and is woefully unqualified to become president of the...",
                        "url": "https://www.breitbart.com/entertainment/2024/10/15/watch-rap-legend-lord-jamar-rips-kamala-harris-shes-insulting-to-black-people-she-thinks-we-are-stupid/",
                        "image_url": "https://media.breitbart.com/media/2024/10/lordjamarkamala-640x335.jpg",
                        "language": "en",
                        "published_at": "2024-10-15T16:16:42.000000Z",
                        "source": "breitbart.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "4cecdf8c-479b-4308-9d2b-f22beffb0ada",
                        "title": "Harris works to appeal to Black men, a critical group for Democrats",
                        "description": "For a second day this week, Vice President Kamala Harris is focusing on a key voting bloc that is a critical base fro the Democratic Party: Black men.",
                        "keywords": "Article, 114780568",
                        "snippet": "The vice president will continue to court Black men while in Detroit.\n\nFor a second day this week, Vice President Kamala Harris is focusing on a key voting bloc...",
                        "url": "https://abcnews.go.com/Politics/harris-works-appeal-black-men-critical-group-democrats/story?id=114780568",
                        "image_url": "https://i.abcnewsfe.com/a/d975f356-1f0a-4464-a4b2-43e1bcf07bb2/harris3-gty-ml-241015_1729008553844_hpMain_16x9.jpg?w=1600",
                        "language": "en",
                        "published_at": "2024-10-15T20:15:20.000000Z",
                        "source": "abcnews.go.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "1ab85f48-1eeb-403d-b41e-709bc2493605",
                        "title": "Harris attacks Trump for giving Putin Covid tests 'when Black people were dying everyday by the hundreds'",
                        "description": "As she steps up her appeals to Black voters, Vice President Kamala Harris appeared on a popular Black radio program Tuesday where she said she is still open to slavery reparations and slammed former President Donald Trump for allegedly sending Covid tests to Russia “when black people were dying” back home.",
                        "keywords": "",
                        "snippet": "As she steps up her appeals to Black voters, Vice President Kamala Harris appeared on a popular Black radio program Tuesday where she said she is still open to ...",
                        "url": "https://www.nbcnews.com/politics/2024-election/harris-attacks-trump-giving-putin-covid-tests-black-people-dying-every-rcna175602",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-08/240823-3x2-chicago-dnc-kamala-harris-ac-1207a-c76100.jpg",
                        "language": "en",
                        "published_at": "2024-10-15T23:17:09.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "ef65e568-9ddc-4f34-bac3-b8a49bee1147",
                        "title": "Harris courts Black voters in Michigan after unusual Trump town hall",
                        "description": "Vice President Kamala Harris courted Black voters in battleground Michigan and stepped up her attacks on Donald Trump, as the former President promoted is plan to impose large tariffs on imports he says will save American jobs. NBC News' Gabe Gutierrez reports.",
                        "keywords": "",
                        "snippet": "Create your free profile or log in to save this video\n\nCreate your free profile or log in to save this video\n\nVice President Kamala Harris courted Black voters ...",
                        "url": "https://www.nbcnews.com/nightly-news/video/harris-courts-black-voters-in-michigan-after-unusual-trump-town-hall-221821509522",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/mpx/2704722219/2024_10/1729033507551_nn_ggu_harris_michigan_trump_town_hall_241015_1920x1080-caoh2t.jpg",
                        "language": "en",
                        "published_at": "2024-10-15T23:05:17.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "politics",
                            "general"
                        ],
                        "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-10-16T01:40:16 | 2024-10-16T01:40 | 2024-10-16T01 | 2024-10-16 | 2024-10 | 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-10-16T01:40:16 | 2024-10-16T01:40 | 2024-10-16T01 | 2024-10-16 | 2024-10 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-10-16
sort false Sort by published_on or relevance_score (only available when used in conjunction with search). Default is published_at unless search is used and sorting by published_at is not included, in which case relevance_score is used.
limit false Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan.
page false Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2

Response Objects

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

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

Example Request

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

Example Response

            
                {
    "meta": {
        "found": 1131947,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "eac38e40-48e1-4f2d-95b4-85d989b96b68",
            "title": "Love Is Blind’s Hannah Addresses Backlash Over How She Speaks to Nick",
            "description": "Love Is Blind’s Hannah Jiles addressed the backlash she’s received for how she speaks to fiance Nick Dorka during a recent appearance on ‘The Viall Files?...",
            "keywords": "",
            "snippet": "Love Is Blind star Hannah Jiles is aware of how she comes across when talking to fiancé Nick Dorka — and she’s a work in progress.\n\n“I’ve learned a lot...",
            "url": "https://www.usmagazine.com/entertainment/news/love-is-blinds-hannah-addresses-backlash-over-how-she-speaks-to-nick/",
            "image_url": "https://www.usmagazine.com/wp-content/uploads/2024/10/Love-Is-Blinds-Hannah-Addresses-Backlash-to-How-She-Speaks-to-Nick-01-2024.jpg?w=1200&h=630&crop=1&quality=86&strip=all",
            "language": "en",
            "published_at": "2024-10-16T01:26:10.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "e5186be7-c576-4d75-a9c9-27ebd37039f4",
            "title": "Derek Hough and Hayley Erbert Perform During DWTS’ Dedication Night",
            "description": "Hayley Erbert returned to the ‘Dancing With the Stars’ ballroom for the first time since having brain surgery for a performance with husband Derek Hough",
            "keywords": "",
            "snippet": "Derek Hough and Hayley Erbert tugged at everyone’s heartstrings with their emotional performance during Dancing With the Stars’ Dedication Night.\n\nHough, 39...",
            "url": "https://www.usmagazine.com/entertainment/news/derek-hough-and-hayley-erbert-perform-during-dwts-dedication-night/",
            "image_url": "https://www.usmagazine.com/wp-content/uploads/2024/10/Derek-Hough-and-Hayley-Erbert-Dance-Together-on-DWTS-1.jpg?crop=0px%2C20px%2C1516px%2C797px&resize=1200%2C630&quality=40&strip=all",
            "language": "en",
            "published_at": "2024-10-16T01:11:05.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "0d94334b-1f21-4d13-8699-7bf59ce9600b",
            "title": "Kristen Bell Admits to Sneaking NSFW Joke Into Frozen",
            "description": "Kristen Bell, who voiced the role of Princess Anna in 2013’s Frozen, revealed a certain double entendre in one of the film’s songs was absolutely intentiona...",
            "keywords": "",
            "snippet": "Watch : How Dax Shepard Reacted to Wife Kristen Bell's Steamy Scenes With Adam Brody in Nobody Wants This\n\nDirty jokes never bothered Kristen Bell anyway.\n\nThe ...",
            "url": "https://www.eonline.com/news/1408683/kristen-bell-admits-to-sneaking-nsfw-joke-into-frozen?cmpid=rss-syndicate-genericrss-us-top_stories",
            "image_url": "https://akns-images.eonline.com/eol_images/Entire_Site/2024915/cr_1200x1200-241015180214-GettyImages-2172977118.jpg?fit=around%7C1080:1080&output-quality=90&crop=1080:1080;center,top",
            "language": "en",
            "published_at": "2024-10-16T01:02:59.000000Z",
            "source": "eonline.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "034c8d64-cf7b-4ed0-b057-d6bb234a29f3",
            "title": "Man accused of leaving dog tied to fence ahead of Hurricane Milton is charged with animal cruelty",
            "description": "A Florida man who allegedly tied his dog to a fence and abandoned it as Hurricane Milton approached the state is now charged with aggravated animal cruelty.",
            "keywords": "",
            "snippet": "A Florida man who allegedly tied his dog to a fence and abandoned it as Hurricane Milton approached the state is now charged with aggravated animal cruelty, aut...",
            "url": "https://www.nbcnews.com/news/us-news/man-accused-leaving-dog-fence-hurricane-milton-charged-animal-cruelty-rcna175617",
            "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-10/241015-trooper-the-dog-cover-ac-751p-b8ec37.jpg",
            "language": "en",
            "published_at": "2024-10-16T01:02:04.000000Z",
            "source": "nbcnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "b26cb56f-8b66-43d4-a2ff-6bcc5b1bceb8",
            "title": "LAURA INGRAHAM: Kamala Harris has a 'demeaning' pitch for Black male voters",
            "description": "Fox News host Laura Ingraham discusses Vice President Kamala Harris' plan to appeal to Black male voters ahead of the 2024 election on",
            "keywords": "",
            "snippet": "Fox News host Laura Ingraham details Vice President Kamala Harris’ \"demeaning\" pitch to Black voters on \" The Ingraham Angle .\"\n\nLAURA INGRAHAM: A five-point ...",
            "url": "https://www.foxnews.com/media/laura-ingraham-kamala-harris-has-demeaning-pitch-black-male-voters",
            "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2024/10/laura-democrats-are-spinning-over-this.jpg",
            "language": "en",
            "published_at": "2024-10-16T00:56:28.000000Z",
            "source": "foxnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "de85386b-28c7-43b8-a117-749967c8e774",
            "title": "Guardians vs. Yankees (Oct 15, 2024) Live Score",
            "description": "Live coverage of the Cleveland Guardians vs. New York Yankees MLB game on ESPN, including live score, highlights and updated stats.",
            "keywords": "",
            "snippet": "Dodgers keeping Ohtani at leadoff for NLCS Game 3 vs. Mets\n\nShohei Ohtani is 0-for-19 hitting with the bases empty, but the Dodgers have no plans to move the sl...",
            "url": "https://www.espn.com/mlb/game?gameId=401701051",
            "image_url": "http://s.espncdn.com/stitcher/sports/baseball/mlb/events/401701051.png?templateId=espn.com.share.1",
            "language": "en",
            "published_at": "2024-10-16T00:55:49.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "bc8a3bec-b3c1-42c0-87d8-c53acd3d1420",
            "title": "Jay-Z, Praised by Warren Buffett as 'The Guy to Learn From,' Once Said He Wasn't Taught Emotional Intelligence, But How To Survive — The Rap Legend's Growth Has Made Him Not Just A Better Person, But ",
            "description": "Jay-Z's journey from his Brooklyn roots to becoming hip-hop's first billionaire highlights how embracing emotional intelligence has significantly contributed to...",
            "keywords": "",
            "snippet": "Shawn Carter, better known as Jay-Z, once praised by legendary investor Warren Buffett as “the guy to learn from,” has come a long way from his Brooklyn roo...",
            "url": "https://www.benzinga.com/general/entertainment/24/10/41348553/jay-z-praised-by-warren-buffett-as-the-guy-to-learn-from-once-said-he-wasnt-taught-emotiona",
            "image_url": "https://cdn.benzinga.com/files/images/story/2024/10/15/Jay-z-At-The-Los-Angeles-Premiere-Of-the.jpeg?width=1200&height=800&fit=crop",
            "language": "en",
            "published_at": "2024-10-16T00:47:56.000000Z",
            "source": "benzinga.com",
            "categories": [
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "e775ac8a-554a-48c5-9458-f0c1e586b974",
            "title": "Biden says Harris will cut her own path as president, and her perspective will be fresh and new",
            "description": "President Joe Biden says Kamala Harris would “cut her own path” once she wins the 2024 election, allowing for daylight between him and his vice president as...",
            "keywords": "Government policy, Politics, Elections, 2024 United States presidential election, Washington news, General news, Article, 114836889",
            "snippet": "President Joe Biden says Kamala Harris would “cut her own path” once she wins the 2024 election, allowing for daylight between him and his vice president as...",
            "url": "https://abcnews.go.com/US/wireStory/biden-harris-cut-path-president-perspective-fresh-new-114836889",
            "image_url": "https://i.abcnewsfe.com/a/2a66dc0c-6e7a-4b03-b189-2c31f08a067a/wirestory_313e8dd2eb1108f1ea2611f02504d5bf_16x9.jpg?w=1600",
            "language": "en",
            "published_at": "2024-10-16T00:46:17.000000Z",
            "source": "abcnews.go.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "7bc55da9-7790-478f-8a1d-6bf697311993",
            "title": "South Carolina woman charged with death of diabetic teen after giving her milkshake, authorities say",
            "description": "A South Carolina woman is charged in the August 2022 death of a diabetic teenage girl after giving her a milkshake, authorities said this week.",
            "keywords": "",
            "snippet": "A South Carolina woman is accused of allowing a 17-year-old diabetic girl in her care to drink a milkshake, which led to her death, authorities said.\n\nShirl Lee...",
            "url": "https://www.foxnews.com/us/south-carolina-woman-charged-death-diabetic-teen-after-giving-her-milkshake-authorities-say",
            "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2024/10/sweeney-copy.jpg",
            "language": "en",
            "published_at": "2024-10-16T00:46:04.000000Z",
            "source": "foxnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "35aa1723-df41-4518-b460-8cfb55ce8c86",
            "title": "Illegal immigrants arrested in wealthy Florida county for sexual crimes against a child",
            "description": "Sheriff's deputies arrested illegal immigrants in a wealthy Florida county last week for sexual crimes against a child.",
            "keywords": "",
            "snippet": "A trio of illegal immigrants were arrested in a wealthy Florida county last week for sexual crimes against a child, police said.\n\nThe Palm Beach County Sheriff?...",
            "url": "https://www.foxnews.com/us/illegal-immigrants-arrested-wealthy-florida-county-sexual-crimes-against-child",
            "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2024/10/paper-tear-3-split.jpg",
            "language": "en",
            "published_at": "2024-10-16T00:45:12.000000Z",
            "source": "foxnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        }
    ]
}
            
        

All News Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

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

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

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

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

When using special characters (+, -, |, ", *, ()) you MUST URL-encode this parameter.
search_fields false Comma separated list of fields to apply the search parameter to.
Supported fields: title | description | keywords | main_text
Example: title,description,keywords
Default: title,main_text
categories false Comma separated list of categories to include.
Supported categories: general | science | sports | business | health | entertainment | tech | politics | food | travel
Example: business,tech
exclude_categories false Comma separated list of categories to exclude.
domains false Comma separated list of domains to include. List of domains can be obtained through our Sources endpoint, found further down this page.
exclude_domains false Comma separated list of domains to exclude
source_ids false Comma separated list of source_ids to include. List of source_ids can be obtained through our Sources endpoint, found further down this page.
exclude_source_ids false Comma separated list of source_ids to exclude.
language false Comma separated list of languages to include. Default is all.
Click here for a list of supported languages.
Examples: en,es (English + Spanish)
published_before false Find all articles published before the specified date. Supported formats include: Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2024-10-16T01:40:16 | 2024-10-16T01:40 | 2024-10-16T01 | 2024-10-16 | 2024-10 | 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-10-16T01:40:16 | 2024-10-16T01:40 | 2024-10-16T01 | 2024-10-16 | 2024-10 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-10-16
sort false Sort by published_on or relevance_score (only available when used in conjunction with search). Default is published_at unless search is used and sorting by published_at is not included, in which case relevance_score is used.
limit false Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan.
page false Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2

Response Objects

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

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

Example Request

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

Example Response

            
                {
    "meta": {
        "found": 48641726,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "de12a650-02d7-4e13-b402-a8ca580d99e4",
            "title": "BTC $67,000 회복",
            "description": "BTC $67,000 회복-코인리더스",
            "keywords": "",
            "snippet": "",
            "url": "https://www.coinreaders.com/127823",
            "image_url": "http://www.coinreaders.com/data/coinreaders_com/banner/favicon.ico",
            "language": "ko",
            "published_at": "2024-10-16T01:39:58.000000Z",
            "source": "coinreaders.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "fa9d4fba-86d8-4dd5-a094-876428a04bde",
            "title": "Source: Brandon McManus, Packers agree to 1-year deal",
            "description": "Brandon McManus and the Packers have agreed to a one-year deal, a source told ESPN's Adam Schefter, and the veteran kicker is expected to be active for Sunday's...",
            "keywords": "",
            "snippet": "Open Extended Reactions\n\nGREEN BAY, Wis. -- Perhaps the seventh kicker will be the charm for the Green Bay Packers, who signed veteran Brandon McManus on Tuesda...",
            "url": "https://www.espn.com/nfl/story/_/id/41818150/brandon-mcmanus-packers-agree-1-year-deal",
            "image_url": "https://a3.espncdn.com/combiner/i?img=%2Fphoto%2F2024%2F0527%2Fr1338416_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2024-10-16T01:39:11.000000Z",
            "source": "espn.com",
            "categories": [
                "sports"
            ],
            "relevance_score": null
        },
        {
            "uuid": "40b1b37a-164c-45b2-9e12-b491d2be935e",
            "title": "테더, 솔라나 네트워크 상 크로스체인 지원",
            "description": "테더, 솔라나 네트워크 상 크로스체인 지원-코인리더스",
            "keywords": "",
            "snippet": "",
            "url": "https://www.coinreaders.com/127824",
            "image_url": "http://www.coinreaders.com/data/coinreaders_com/banner/favicon.ico",
            "language": "ko",
            "published_at": "2024-10-16T01:38:51.000000Z",
            "source": "coinreaders.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "1960522f-c1fb-4a67-8405-7b4c4339ce46",
            "title": "미 뉴욕주 제조업황 위축…엠파이어스테이트 제조업지수 -11.9",
            "description": "미국 뉴욕주의 제조업 활동이 큰 폭의 위축세를 이어갔다.15일(현지시간) 뉴욕 연방준비은행(연은)에 따르면 미국의 10월 ...",
            "keywords": "",
            "snippet": "(뉴욕=연합인포맥스) 임하람 특파원 = 미국 뉴욕주의 제조업 활동이 큰 폭의 위축세를 이어갔다.\n\n엠파이어 스테이트 제?...",
            "url": "https://news.einfomax.co.kr/news/articleView.html?idxno=4328469",
            "image_url": "https://cdn.news.einfomax.co.kr/news/thumbnail/202410/4328469_207665_393_v150.jpg",
            "language": "ko",
            "published_at": "2024-10-16T01:38:39.000000Z",
            "source": "news.einfomax.co.kr",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "ca0009e2-673d-44b1-877e-9db2ab676c46",
            "title": "SP tem orçamento para enterrar fiação, mas falta prioridade",
            "description": "Urbanista e vereador eleito Nabil Bonduki avaliou no Análise da Notícia que falta prioridade em enterrar fios para evitar cortes de luz pela queda de árvores",
            "keywords": "",
            "snippet": "É óbvio que dá, do ponto de vista técnico e urbanístico. Aliás, não só dá como é muito recomendável que seja feito. Nós temos vários exemplos de ci...",
            "url": "https://noticias.uol.com.br/colunas/jose-roberto-de-toledo/2024/10/15/entrevista-nabil-bonduki-analise-da-noticia.htm",
            "image_url": "https://conteudo.imguol.com.br/c/noticias/03/2024/10/13/13out24---arvore-cai-em-cima-de-carro-e-interdita-rua-catao-no-bairro-da-lapa-zona-oeste-de-sao-paulo-1728839197253_v2_615x300.jpg",
            "language": "pt",
            "published_at": "2024-10-16T01:38:31.000000Z",
            "source": "uol.com.br",
            "categories": [
                "tech",
                "science"
            ],
            "relevance_score": null
        },
        {
            "uuid": "fbf74a7c-0a6d-4d02-a49d-8395b04a5cdb",
            "title": "【省288.47元】海尔洗衣机_Haier 海尔 波轮洗衣机全自动10公斤 EB100Z33Mate1多少钱-什么值得买",
            "description": "Haier 海尔 波轮洗衣机全自动10公斤  EB100Z33Mate1660.53元(需用券)什么值得买甄选出京东优惠促销商品,包括Haier/海尔报价、...",
            "keywords": "京东, Haier/海尔多少钱",
            "snippet": "",
            "url": "https://www.smzdm.com/p/128861466/",
            "image_url": "https://qny.smzdm.com/202401/26/65b318ad4877d4576.jpg_d250.jpg",
            "language": "zh",
            "published_at": "2024-10-16T01:37:11.000000Z",
            "source": "smzdm.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "f422d06e-1ef6-40ab-bb52-33fb944c0afc",
            "title": "「キモい」より攻撃性が高い28個の罵倒表現まとめ。「キモイけどいい奴」はOKだが「頭悪いけどいい奴」はNG?",
            "description": "anond.hatelabo.jp 人間性を根本から否定して突き落とすような凄みがある。 たとえば「ウザい」とかは言動に対する悪口だ...",
            "keywords": "",
            "snippet": "1が最も強い否定を示し、30が比較的弱いものとなります。\n\nAIの判定では「つまらない、ダサい、うざい、キモい」がだ...",
            "url": "https://www.tyoshiki.com/entry/2024/10/16/094932",
            "image_url": "https://cdn.image.st-hatena.com/image/scale/440b9e23539c7dd19f18f206fd35ccef0fe26e33/backend=imagemagick;height=1300;version=1;width=1300/https%3A%2F%2Fm.media-amazon.com%2Fimages%2FI%2F51EoxkTQpCL._SL500_.jpg",
            "language": "ja",
            "published_at": "2024-10-16T01:35:05.000000Z",
            "source": "tyoshiki.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "35dd0f06-80dc-4b4a-b5e4-608017f6582d",
            "title": "千葉の住宅で強盗、2人負傷 | 共同通信",
            "description": "",
            "keywords": "共同通信, 社会, 速報",
            "snippet": "千葉県警によると、16日午前5時5分ごろ、千葉県白井市の住宅から「強盗です」と110番があった。複数人が住民の女性2?...",
            "url": "https://nordot.app/1219085623401037906",
            "image_url": "https://nordot-res.cloudinary.com/c_limit,w_200,h_200,f_auto,q_auto:eco/ch/units/39166665832988672/profile_7.png",
            "language": "ja",
            "published_at": "2024-10-16T01:34:56.000000Z",
            "source": "this.kiji.is",
            "categories": [
                "general",
                "business"
            ],
            "relevance_score": null
        },
        {
            "uuid": "9a03b7b9-127f-47a6-b0a6-e386bdb97241",
            "title": "群馬家族3人死亡事故で訴因変更 危険運転致死傷罪へ | 共同通信",
            "description": "前橋地裁は16日までに、群馬県伊勢崎市の家族3人死亡事故で起訴されたトラック運転手鈴木吾郎被告(70...",
            "keywords": "共同通信, 社会",
            "snippet": "前橋地裁\n\n前橋地裁は16日までに、群馬県伊勢崎市の家族3人死亡事故で起訴されたトラック運転手鈴木吾郎被告(70)に...",
            "url": "https://nordot.app/1219086252302549019",
            "image_url": "https://nordot-res.cloudinary.com/c_fill,w_400,h_210,g_faces,q_auto:eco/ch/images/1219090164387381297/origin_1.jpg",
            "language": "ja",
            "published_at": "2024-10-16T01:34:56.000000Z",
            "source": "this.kiji.is",
            "categories": [
                "general",
                "business"
            ],
            "relevance_score": null
        },
        {
            "uuid": "7ee001bd-c28e-4795-bfff-3164046babf2",
            "title": "東証大幅反落、800円安 米国株下落、円高が波及 | 共同通信",
            "description": "16日午前の東京株式市場は、日経平均株価(225種)が大幅反落し、下げ幅は一時800円を超えた。前日...",
            "keywords": "共同通信, 主要, 経済",
            "snippet": "東京証券取引所\n\n16日午前の東京株式市場は、日経平均株価(225種)が大幅反落し、下げ幅は一時800円を超えた。前日の...",
            "url": "https://nordot.app/1219086986293625383",
            "image_url": "https://nordot-res.cloudinary.com/c_fill,w_400,h_210,g_faces,q_auto:eco/ch/images/1219091175443071322/origin_1.jpg",
            "language": "ja",
            "published_at": "2024-10-16T01:34:56.000000Z",
            "source": "this.kiji.is",
            "categories": [
                "general",
                "business"
            ],
            "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-10-16T01:40:16 | 2024-10-16T01:40 | 2024-10-16T01 | 2024-10-16 | 2024-10 | 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-10-16T01:40:16 | 2024-10-16T01:40 | 2024-10-16T01 | 2024-10-16 | 2024-10 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-10-16
limit false Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan.
page false Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2

Response Objects

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

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

Example Request

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

Example Response

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

News by UUID Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

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

Response Objects

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

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

Example Request

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

Example Response

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

Sources Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

HTTP GET Parameters

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

Response Objects

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

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

Example Request

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

Example Response

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

Errors

Errors

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

Errors

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

Example Error Response

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

Examples

API Examples

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

Example Request 1

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

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

Example Request 2

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

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

Example Request 3

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

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

Example Request 4

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

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

Example Request 5

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

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

Example Request 6

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

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

Code Examples

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

PHP

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

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

        $json = curl_exec($ch);

        curl_close($ch);

        $apiResult = json_decode($json, true);

        print_r($apiResult);
    

Python

    
        # Python 3
        import http.client, urllib.parse

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

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

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

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

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

Go

    
        package main

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

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

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

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

            baseURL.RawQuery = params.Encode()

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

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

            defer res.Body.Close()

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

            fmt.Println(string(body))
        }
    

JavaScript

    
        var requestOptions = {
            method: 'GET'
        };

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

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

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

C#

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

        var request = new RestRequest(Method.GET);

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

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

Java

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

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

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

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