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-11-12
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": "1977d157-bc8a-433f-a3b7-b6db50afcb88",
                "title": "Supreme Court Slaps Down Trump Ally’s Desperate Ploy to Evade Justice",
                "description": "Mark Meadows just got some bad news in the nation’s highest court.",
                "keywords": "",
                "snippet": "Meadows’s legal team argued that since he was a “federal officer” at the time, the case should be moved to federal court, where he likely hoped to claim i...",
                "url": "https://newrepublic.com/post/188297/supreme-court-trump-ally-mark-meadows-georgia-case",
                "image_url": "https://images.newrepublic.com/2b160859bfaff62cf14fdcffbc9d069aacf860f4.jpeg?w=1200&h=630&crop=faces&fit=crop&fm=jpg",
                "language": "en",
                "published_at": "2024-11-12T16:35:03.000000Z",
                "source": "newrepublic.com",
                "categories": [
                    "general",
                    "politics",
                    "entertainment"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "4fc9ec99-294a-4e06-81ba-bd62f07020b9",
                        "title": "Supreme Court rejects Mark Meadows appeal in Georgia election interference case",
                        "description": "The Supreme Court dealt a setback to former White House chief of staff Mark Meadows in his defense against 2020 election interference charges in Georgia, turning away his attempt to transfer his case from state to federal court.",
                        "keywords": "",
                        "snippet": "WASHINGTON — The Supreme Court on Tuesday dealt a setback to former White House chief of staff Mark Meadows in his defense against 2020 election interference ...",
                        "url": "https://www.nbcnews.com/politics/supreme-court/supreme-court-rejects-mark-meadows-appeal-georgia-election-interferenc-rcna178727",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-04/240425-shawn-thew-al-0711-3dce12.jpg",
                        "language": "en",
                        "published_at": "2024-11-12T14:32:04.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "politics",
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "094bdbcd-15b5-4eb7-8fdf-b781731bd9b7",
                        "title": "Supreme Court rejects push to move Georgia case against ex-Trump chief of staff Mark Meadows",
                        "description": "The Supreme Court has refused to let former Trump White House chief of staff Mark Meadows move the election interference case against him in Georgia to federal court.",
                        "keywords": "Georgia, Mark Meadows, Donald Trump, Courts, Georgia state government, General news, GA State Wire, AP Top News, AZ State Wire, Washington news, Politics, Fani Willis, Elections, Indictments",
                        "snippet": "WASHINGTON (AP) — The Supreme Court refused Tuesday to let former Trump White House chief of staff Mark Meadows move the election interference case against hi...",
                        "url": "https://apnews.com/article/supreme-court-mark-meadows-georgia-election-interference-876a332a9dbe1a89c50aecccee15952e",
                        "image_url": "https://dims.apnews.com/dims4/default/72ca8ab/2147483647/strip/true/crop/3173x1785+0+166/resize/1440x810!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F8e%2Fd5%2F43b1a9913cf1aa0b3e874dab3342%2Fb5898b48e5fa4d87bdda7e97617b69ef",
                        "language": "en",
                        "published_at": "2024-11-12T14:53:01.000000Z",
                        "source": "apnews.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "4de2eac9-df20-43b5-9ab8-74eade38d841",
                        "title": "Supreme Court declines to hear Mark Meadows’ appeal in Georgia case",
                        "description": "Trump’s former White House chief of staff was seeking to move his state charges in the 2020 election-related case to federal court.",
                        "keywords": "",
                        "snippet": "The Supreme Court has declined to take up Mark Meadows’ pretrial appeal in the state election interference case in Georgia. Donald Trump’s former White Hous...",
                        "url": "https://www.msnbc.com/deadline-white-house/deadline-legal-blog/supreme-court-mark-meadows-georgia-case-trump-rcna179605",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-07/240729-mark-meadows-al-0756-7c12d4.jpg",
                        "language": "en",
                        "published_at": "2024-11-12T14:35:25.000000Z",
                        "source": "msnbc.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "196c5279-6871-4c65-bc49-e8b39adcb513",
                        "title": "Supreme Court rejects Mark Meadows' request to move Georgia election interference case into federal court",
                        "description": "The Supreme Court has rejected a request from former Trump chief of staff Mark Meadows to move his Georgia election interference case from state court into federal court.",
                        "keywords": "Article, 115773700",
                        "snippet": "Meadows was charged alongside Trump and others in the Fulton County case.\n\nThe U.S. Supreme Court on Tuesday rejected a request from Mark Meadows, the one-time ...",
                        "url": "https://abcnews.go.com/US/supreme-court-rejects-mark-meadows-request-move-georgia/story?id=115773700",
                        "image_url": "https://i.abcnewsfe.com/a/c138f95d-4bc0-4152-9745-a70d0bb4f18a/meadows-file-rt-ml-241112_1731426025793_hpMain_16x9.jpg?w=1600",
                        "language": "en",
                        "published_at": "2024-11-12T16:51:13.000000Z",
                        "source": "abcnews.go.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "32bd9cae-9fa3-4714-b4e5-39c384d84cd7",
                        "title": "Alito Set to Destroy Republicans’ Trump-Packed Supreme Court Dreams",
                        "description": "A source close to the Supreme Court justice says he’s not going anywhere.",
                        "keywords": "",
                        "snippet": "But Alito quickly shut down rumors of his retirement.\n\n“Despite what some people may think, this is a man who has never thought about this job from a politica...",
                        "url": "https://newrepublic.com/post/188295/samuel-alito-republicans-supreme-court-trump-justices",
                        "image_url": "https://images.newrepublic.com/90966b8624647c4f85c45483026f862f74718def.jpeg?w=1200&h=630&crop=faces&fit=crop&fm=jpg",
                        "language": "en",
                        "published_at": "2024-11-12T16:17:37.000000Z",
                        "source": "newrepublic.com",
                        "categories": [
                            "general",
                            "politics",
                            "entertainment"
                        ],
                        "locale": "us"
                    }
                ]
            },
            {
                "uuid": "56409c7d-8522-45a6-acc4-7323b6c6d08d",
                "title": "Judge blocks Louisiana law requiring the Ten Commandments in classrooms",
                "description": "Louisiana's new law requiring all public school classrooms to display the Ten Commandments was temporarily blocked on Tuesday.",
                "keywords": "Article, 115774064",
                "snippet": "The judge called the law \"unconstitutional on its face.\"\n\nLouisiana's new law requiring all public school classrooms to display the Ten Commandments was tempora...",
                "url": "https://abcnews.go.com/US/judge-blocks-louisiana-law-requiring-ten-commandments-classrooms/story?id=115774064",
                "image_url": "https://i.abcnewsfe.com/a/079a997e-dc2b-4248-b313-7d98cdc1fc3c/ten-commandments-1-gty-dp-241112_1731428926618_hpMain_16x9.jpg?w=1600",
                "language": "en",
                "published_at": "2024-11-12T18:35:55.000000Z",
                "source": "abcnews.go.com",
                "categories": [
                    "general"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "3e4569b8-828b-49f8-95e9-760fe8a89668",
                        "title": "Louisiana's Ten Commandments law in public schools temporarily blocked, federal judge orders",
                        "description": "A coalition of parents attempting to block a state law that will require the Ten Commandments to be displayed in public school classrooms by next year have won a legal battle in federal court.",
                        "keywords": "",
                        "snippet": "A coalition of parents attempting to block a state law that will require the Ten Commandments to be displayed in public school classrooms by next year have won ...",
                        "url": "https://www.nbcnews.com/news/us-news/louisianas-ten-commandments-law-public-schools-temporarily-blocked-fed-rcna172286",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-06/240624-ten-commandments-se-255p-2981aa.jpg",
                        "language": "en",
                        "published_at": "2024-11-12T14:53:24.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "politics",
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "385c5ba6-3a31-4c20-9b8c-ba7c19337d63",
                        "title": "Judge rules Louisiana law ordering schools to display Ten Commandments violates First Amendment",
                        "description": "A district court judge appointed by former President Barack Obama temporarily blocked a Louisiana law ordering schools to display the Ten Commandments.",
                        "keywords": "Religion, Education, Louisiana",
                        "snippet": "A federal judge has temporarily blocked a Louisiana law that would have required public schools statewide to display the Ten Commandments in their classrooms by...",
                        "url": "https://www.cbsnews.com/news/ten-commandments-school-louisiana-law-violates-first-amendment-judge-rules/",
                        "image_url": "https://assets3.cbsnewsstatic.com/hub/i/r/2024/11/12/59d116ee-6b58-4f2f-8f7e-883fc6e91366/thumbnail/1200x630/479d703a895213de161f2926dc2e41f9/10-commandments.jpg?v=dc2545c4ab2eed12a36d08149f07343c",
                        "language": "en",
                        "published_at": "2024-11-12T15:48:37.000000Z",
                        "source": "cbsnews.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "02e224a5-f101-4c47-a543-70826c5f614b",
                        "title": "Federal judge blocks Louisiana law that requires classrooms to display Ten Commandments",
                        "description": "A new Louisiana requirement that the Ten Commandments be displayed in every public classroom by Jan. 1 was temporarily blocked Tuesday by a federal judge who said the law is “unconstitutional on its face.”",
                        "keywords": "Louisiana, United States government, Oklahoma, Florida, Church and state, General news, LA State Wire, United States, KY State Wire, TX State Wire, FL State Wire, OK State Wire, AP Top News, UT State Wire, Freedom of religion, Religion, U.S. news, Legislation, U.S. Republican Party, Government and politics, Legal proceedings, Education, Lawsuits, Politics",
                        "snippet": "BATON ROUGE, LA. (AP) — A new Louisiana requirement that the Ten Commandments be displayed in every public classroom by Jan. 1 was temporarily blocked Tuesday...",
                        "url": "https://apnews.com/article/ten-commandments-law-blocked-public-schools-louisiana-87b3dde94e583fdbb9ecb26db42b0206",
                        "image_url": "https://dims.apnews.com/dims4/default/be65353/2147483647/strip/true/crop/5535x3113+0+288/resize/1440x810!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2Fca%2F37%2F7375cc65ea7e6e4f29dae97dbca3%2Fc6153de152f74f0fa21105759ad5a27e",
                        "language": "en",
                        "published_at": "2024-11-12T15:53:02.000000Z",
                        "source": "apnews.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "af89bc66-7cbb-4994-b0fc-06e78ba71288",
                        "title": "Federal judge blocks Louisiana law requiring classrooms to display Ten Commandments",
                        "description": "A new Louisiana requirement that the Ten Commandments be displayed in every public classroom by Jan_ 1 was temporarily blocked Tuesday by a federal judge who said the law is “unconstitutional on its face.”",
                        "keywords": "Legislation, Freedom of religion, Church and state, Lawsuits, Legal proceedings, Politics, Education, Religion, U.S. news, General news, Article, 115772260",
                        "snippet": "A new Louisiana requirement that the Ten Commandments be displayed in every public classroom by Jan_ 1 was temporarily blocked Tuesday by a federal judge who sa...",
                        "url": "https://abcnews.go.com/US/wireStory/federal-judge-blocks-louisiana-law-requires-classrooms-display-115772260",
                        "image_url": "https://i.abcnewsfe.com/a/07c26690-0e14-45a2-b05f-93124c04a13e/wirestory_87b3dde94e583fdbb9ecb26db42b0206_16x9.jpg?w=1600",
                        "language": "en",
                        "published_at": "2024-11-12T16:30:29.000000Z",
                        "source": "abcnews.go.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "7d750bca-f374-4a16-862d-19c7d21e8f87",
                        "title": "Federal judge says Louisiana law requiring Ten Commandments in schools is unconstitutional",
                        "description": "A federal judge in Louisiana has temporarily blocked a state law that requires the Ten Commandments to be displayed in classrooms, finding it unconstitutional.",
                        "keywords": "",
                        "snippet": "A federal judge in Louisiana has temporarily blocked a state law that requires the Ten Commandments to be displayed in classrooms, finding that the law is “un...",
                        "url": "https://www.msnbc.com/top-stories/latest/louisiana-ten-commandments-classrooms-unconstitutional-rcna179767",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2024-11/241112-10-Commandments-ch-1038-024fd3.jpg",
                        "language": "en",
                        "published_at": "2024-11-12T16:52:12.000000Z",
                        "source": "msnbc.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-11-12T23:26:33 | 2024-11-12T23:26 | 2024-11-12T23 | 2024-11-12 | 2024-11 | 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-11-12T23:26:33 | 2024-11-12T23:26 | 2024-11-12T23 | 2024-11-12 | 2024-11 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-11-12
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": 1156485,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "b7be9b37-2889-4eb5-89c0-eb6c31f0de2a",
            "title": "Jana Duggar Is Adjusting to \"City Life\" Amid Move Away From Farm",
            "description": "Jana Duggar shared how she prepared for her move from Arkansas to husband Stephen Wissmann's native Nebraska, predicting that her life will",
            "keywords": "",
            "snippet": "Watch : Jana Duggar Shares A Rare Inside Look at Time Spent With Her Family\n\nJana Duggar is counting on becoming a Cornhusker.\n\nThe 19 Kids and Counting alum sh...",
            "url": "https://www.eonline.com/news/1409874/jana-duggar-reveals-shes-adjusting-to-city-life-amid-move-away-from-farm?cmpid=rss-syndicate-genericrss-us-top_stories",
            "image_url": "https://akns-images.eonline.com/eol_images/Entire_Site/20241012/cr_1200x1200-241112151401-460113056_1798449987352677_6471582654762650246_n.jpg?fit=around%7C1080:1080&output-quality=90&crop=1080:1080;center,top",
            "language": "en",
            "published_at": "2024-11-12T23:15:49.000000Z",
            "source": "eonline.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "969ed6cd-77d5-481d-9e7c-164112bee700",
            "title": "Sasha Farber Claps Back After Jenn Tran's Ex Throws Shade at His Name",
            "description": "Sasha Farber explained the origin behind his moniker after Jenn Tran’s ex Devin Strader called it a ‘girl’s name’",
            "keywords": "",
            "snippet": "Sasha Farber is clearing the air on the origin of his moniker after Jenn Tran’s ex Devin Strader threw some shade his way.\n\n“The name Sasha is short for Ale...",
            "url": "https://www.usmagazine.com/celebrity-news/news/sasha-farber-claps-back-after-jenn-trans-ex-throws-shade-at-his-name/",
            "image_url": "https://www.usmagazine.com/wp-content/uploads/2024/11/Sasha-Farber-Explains-the-Origin-of-His-Name-After-Shade-From-Jenn-Trans-Ex-Devin-Strader-1.jpg?crop=0px%2C0px%2C1998px%2C1051px&resize=1200%2C630&quality=86&strip=all",
            "language": "en",
            "published_at": "2024-11-12T23:12:23.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "fab9c6f2-970a-45e6-a763-14c61bbc270c",
            "title": "Kyle Richards Calls It 'Not Fair' to Talk Morgan Wade Friendship On TV",
            "description": "‘The Real Housewives of Beverly Hills’ star Kyle Richards exclusively told Us Weekly if she'll talk about Morgan Wade on air",
            "keywords": "",
            "snippet": "The Real Housewives of Beverly Hills star Kyle Richards is revealing whether fans will get any clarity on her friendship with Morgan Wade during season 14.\n\n“...",
            "url": "https://www.usmagazine.com/entertainment/news/kyle-richards-calls-it-not-fair-to-talk-morgan-wade-friendship-on-tv/",
            "image_url": "https://www.usmagazine.com/wp-content/uploads/2024/11/Kyle-Richards-Says-It-s-Not-Fair-to-Address-Morgan-Wade-Friendship-Onscreen-1.jpg?crop=0px%2C29px%2C1724px%2C906px&resize=1200%2C630&quality=86&strip=all",
            "language": "en",
            "published_at": "2024-11-12T23:11:11.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "b64f884d-4d5d-4d51-9e3c-49e42337dc23",
            "title": "If I Get One More Email From Democrats Asking Me for Money, I’m Going to Lose My Mind",
            "description": "What even is the Harris Fight Fund!",
            "keywords": "",
            "snippet": "It is a confusing time to be a Democrat. A new, multiethnic coalition has carried Donald Trump to a second term in the White House. Trump has wasted no time out...",
            "url": "https://slate.com/news-and-politics/2024/11/election-results-2024-kamala-harris-trump-fundraising.html?via=rss",
            "image_url": "https://compote.slate.com/images/08ef6e32-fa1c-47af-ad31-ad203f40e75c.jpeg?crop=4000%2C2667%2Cx0%2Cy0&width=1560",
            "language": "en",
            "published_at": "2024-11-12T23:05:03.000000Z",
            "source": "slate.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "472b48bd-173f-46f5-9f44-db09e4f7a7f8",
            "title": "Explosion at Louisville plant leaves 11 employees injured",
            "description": "At least 11 employees were taken to hospitals and residents were urged to shelter in place after an explosion at a Louisville, Kentucky, business.",
            "keywords": "Kentucky",
            "snippet": "At least 11 employees were taken to hospitals and residents were urged to shelter in place on Tuesday after an explosion at a Louisville, Kentucky, business.\n\nT...",
            "url": "https://www.cbsnews.com/news/explosion-louisville-kentucky-11-employees-injured-givaudan-sense-colour/",
            "image_url": "https://assets2.cbsnewsstatic.com/hub/i/r/2024/11/12/0ead3b6d-855e-4aca-93a2-5b8392689a4b/thumbnail/1200x630/1174dd20efe6eba7cd1f34a5a979a29b/louisville-explosion.jpg?v=f619a2fc2fe5c36254958031a1f767d9",
            "language": "en",
            "published_at": "2024-11-12T23:00:26.000000Z",
            "source": "cbsnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "8c20f674-5eba-46d3-bdf3-c1aab4c56cfb",
            "title": "Gigi Hadid & Bradley Cooper Twin During Limitlessly Chic NYC Date",
            "description": "Gigi Hadid and Bradley Cooper stepped out for a casual New York City stroll in coordinating outfits on Nov. 11, proving that their romance is as strong as ever....",
            "keywords": "",
            "snippet": "Watch : Gigi Hadid Praises \"Supportive\" Bradley Cooper\n\nA twinning moment is born.\n\nGigi Hadid and Bradley Cooper—who have been quietly linked since October 2...",
            "url": "https://www.eonline.com/news/1409873/gigi-hadid-and-bradley-cooper-prove-theyre-going-strong-with-twinning-looks-on-nyc-date?cmpid=rss-syndicate-genericrss-us-top_stories",
            "image_url": "https://akns-images.eonline.com/eol_images/Entire_Site/20241012/rs_1200x1200-241112135207-gigi_bradley.jpg?fit=around%7C1080:1080&output-quality=90&crop=1080:1080;center,top",
            "language": "en",
            "published_at": "2024-11-12T23:00:04.000000Z",
            "source": "eonline.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "6599e8b9-a012-4df9-bbfd-998001ea4131",
            "title": "‘Wizards Beyond Waverly Place’ Enchants Audiences To Score Record Premiere Viewership On Disney+",
            "description": "Wizards Beyond Waverly Place has scored record premiere viewership for a Disney Channel series on Disney+",
            "keywords": "",
            "snippet": "EXCLUSIVE: Wizards Beyond Waverly Place has cast a spell on the kids.\n\nThe sequel series is off to a promising start, with the first episode driving 3.2M views ...",
            "url": "https://deadline.com/2024/11/wizards-beyond-waverly-place-premiere-ratings-disney-1236174552/",
            "image_url": "https://deadline.com/wp-content/uploads/2024/10/171354_2462_R.jpg?w=1000",
            "language": "en",
            "published_at": "2024-11-12T23:00:00.000000Z",
            "source": "deadline.com",
            "categories": [
                "entertainment"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "b321b1b9-434d-4d33-94b1-70a0ec7bfe02",
            "title": "The Zach Bryan, Brianna Chickenfry, Dave Portnoy drama—diss track and all—explained.",
            "description": "You have questions about Zach Bryan and Brianna Chickenfry, we have answers.",
            "keywords": "",
            "snippet": "“Zach Bryan” and “Brianna Chickenfry” are words that you may have unwittingly encountered online sometime over the past few weeks. Perhaps you, like cou...",
            "url": "https://slate.com/culture/2024/11/zach-bryan-brianna-chickenfry-lapaglia-dave-portnoy-diss-track.html?via=rss",
            "image_url": "https://compote.slate.com/images/81a7e0f7-4a19-4515-9720-76b0bf99a7f3.jpeg?crop=1560%2C1040%2Cx0%2Cy0&width=1560",
            "language": "en",
            "published_at": "2024-11-12T22:58:38.000000Z",
            "source": "slate.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "c133f2dd-d6db-46f5-82a0-1895747987bb",
            "title": "As the transition unfolds, Trump eyes one of his favorite targets: US intelligence",
            "description": "Donald Trump has long criticized America's spy agencies, accusing them of trying to undermine his first administration and campaign to retake the White House.",
            "keywords": "Donald Trump, Espionage, U.S. Central Intelligence Agency, General news, CIA, Government appointments and nominations, Middle East, John Ratcliffe, Washington news, Politics",
            "snippet": "WASHINGTON (AP) — Donald Trump has long viewed the nation’s spy services with suspicion, accusing them of trying to undermine his first term and campaigns. ...",
            "url": "https://apnews.com/article/trump-intelligence-cia-putin-russia-china-c6048eee83edec13edfad6cf4b5b3f66",
            "image_url": "https://dims.apnews.com/dims4/default/1983075/2147483647/strip/true/crop/5786x3255+0+303/resize/1440x810!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F4d%2F3f%2Fefc861c063845650ee8e1201a73f%2F3d6195595a8c4d34ae429d7726c3bc7e",
            "language": "en",
            "published_at": "2024-11-12T22:53:02.000000Z",
            "source": "apnews.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "d0f83805-c689-4372-bbf8-386cf85abb57",
            "title": "OpenAI co-founder Greg Brockman returns after three months of leave",
            "description": "OpenAI co-founder Greg Brockman has returned to the company after taking a sabbatical that began in August.",
            "keywords": "Microsoft Corp, Generative AI, Artificial intelligence, Breaking News: Technology, Technology, Sam Altman, business news",
            "snippet": "Greg Brockman speaks onstage at \"OpenAI Co-founder on ChatGPT, DALL·E, and the Impact of Generative AI\" during 2023 SXSW Conference and Festivals at Austin Con...",
            "url": "https://www.cnbc.com/2024/11/12/openai-co-founder-greg-brockman-returns-after-three-months-of-leave.html",
            "image_url": "https://image.cnbcfm.com/api/v1/image/108061860-1731444171850-gettyimages-1472649764-epr62003_68pk2e78.jpeg?v=1731444314&w=1920&h=1080",
            "language": "en",
            "published_at": "2024-11-12T22:47:45.000000Z",
            "source": "cnbc.com",
            "categories": [
                "general",
                "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-11-12T23:26:33 | 2024-11-12T23:26 | 2024-11-12T23 | 2024-11-12 | 2024-11 | 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-11-12T23:26:33 | 2024-11-12T23:26 | 2024-11-12T23 | 2024-11-12 | 2024-11 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-11-12
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": 49186834,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "f855a739-2fa8-48a0-a86f-4f50c63f2b09",
            "title": "价格不超过200万!小鹏汇天“陆地航母”首次公开飞行 2027年后可望盈利",
            "description": "价格不超过200万!小鹏汇天“陆地航母”首次公开飞行 2027年后可望盈利",
            "keywords": "飞行器, 小鹏汇天, 陆地航母, 价格不超过200万!小鹏汇天“陆地航母”首次公开飞行 2027年后可望盈利, 快科技",
            "snippet": "价格不超过200万!小鹏汇天“陆地航母”首次公开飞行 2027年后可望盈利\n\n只见一辆6轮黑色与灰色相间的“汽车”驶入演?...",
            "url": "https://news.mydrivers.com/1/1013/1013613.htm",
            "image_url": "https://img1.mydrivers.com/img/20241112/d343e31707cc4411b062c6b8bdcf7d65.png",
            "language": "zh",
            "published_at": "2024-11-12T23:26:57.000000Z",
            "source": "news.mydrivers.com",
            "categories": [
                "tech",
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "a136c93c-baf6-4b57-8c5c-0cbbd2a2f741",
            "title": "Osvaldo sfida il nipote di Maradona con la maglia del Napoli a Villa Fiorito: immagini da brividi",
            "description": "Un calcetto nella città dove è cresciuto el Pibe de Oro per omaggiarlo: il tributo emozionante",
            "keywords": "",
            "snippet": "Le ultime notizie sul club, tutti i giorni, gratis nella tua mail\n\nPremendo il tasto “Iscriviti ora” dichiaro di aver letto la nostra Privacy Policy e di ac...",
            "url": "https://www.corrieredellosport.it/news/calcio/serie-a/napoli/2024/11/12-135252181/osvaldo_sfida_il_nipote_di_maradona_con_la_maglia_del_napoli_a_villa_fiorito_immagini_da_brividi",
            "image_url": "https://cdn.corrieredellosport.it/images/2024/11/12/232434486-ec57266b-81be-49e6-bf3c-3326b262c5cf.jpg",
            "language": "it",
            "published_at": "2024-11-12T23:24:28.000000Z",
            "source": "corrieredellosport.it",
            "categories": [
                "sports"
            ],
            "relevance_score": null
        },
        {
            "uuid": "b84d679f-cf6d-444b-bb8a-e7d94558720b",
            "title": "日中防衛相、21日会談で調整 軍事活動に懸念伝達へ|【西日本新聞me】",
            "description": "中谷元・防衛相は、中国の董軍国防相とラオスの首都ビエンチャンで21日にも会談する方向で調整に入った。双方が出?...",
            "keywords": "西日本新聞me, 西日本新聞, ニュース, 九州, 福岡",
            "snippet": "中谷元・防衛相は、中国の董軍国防相とラオスの首都ビエンチャンで21日にも会談する方向で調整に入った。双方が出?...",
            "url": "https://www.nishinippon.co.jp/item/o/1281216/",
            "image_url": "https://www.nishinippon.co.jp/assets/nnp/img/base/og_image.png",
            "language": "ja",
            "published_at": "2024-11-12T23:23:03.000000Z",
            "source": "nishinippon.co.jp",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "9fb14035-0261-4ddd-af1f-0c5a4d604a50",
            "title": "Ex-Jethro Tull Guitarist Recalls UK Musicians Playing US Blues 'Really Badly', Shares Opinion on Prog Icons' 'Odd' Time Signatures",
            "description": "'I thought, 'I don't want to be one of those.''",
            "keywords": "Jethro Tull, Martin Barre, Ian Anderson, blues, guitar",
            "snippet": "Former Jethro Tull guitarist Martin Barre noted that British blues musicians playing Albert King and B.B. King \\\"really badly\\\" was all the rage during his form...",
            "url": "https://www.ultimate-guitar.com/news/general_music_news/ex-jethro_tull_guitarist_recalls_uk_musicians_playing_us_blues_really_badly_shares_opinion_on_prog_icons_odd_time_signatures.html",
            "image_url": "https://www.ultimate-guitar.com/static/article/news/3/172443_0_meta_ver1731435705.jpg",
            "language": "en",
            "published_at": "2024-11-12T23:21:45.000000Z",
            "source": "ultimate-guitar.com",
            "categories": [
                "entertainment"
            ],
            "relevance_score": null
        },
        {
            "uuid": "a48d4a87-1ee2-419c-b5e1-f207dd90eee7",
            "title": "智驾越野都很顶/37.98万起 方程豹豹8正式上市",
            "description": "2024年11月12日,方程豹汽车旗下全新中大型SUV——豹8正式上市,全系共推出4款不同配置的版本,官方指导售价为37.98-40.78?...",
            "keywords": "智驾越野都很顶/37.98万起 方程豹豹8正式上市, 方程豹, 58汽车",
            "snippet": "",
            "url": "https://news.58che.com/news/7408844.html",
            "image_url": "https://img.xgo-img.com.cn/pics/4621/630/473/4620323.jpg",
            "language": "zh",
            "published_at": "2024-11-12T23:21:22.000000Z",
            "source": "58che.com",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "0f6ccc51-5e2c-41ff-8d08-b4b53e4f9ccc",
            "title": "トラックはねられ男児死亡 運転手逮捕、埼玉・桶川|【西日本新聞me】",
            "description": "西日本新聞meは、九州のニュースを中心に最新情報を伝えるニュースサイトです。九州・福岡の社会、政治、経済など?...",
            "keywords": "西日本新聞me, 西日本新聞, ニュース, 九州, 福岡",
            "snippet": "クリップ機能は有料会員の方のみお使いいただけます。",
            "url": "https://www.nishinippon.co.jp/item/o/1281215/",
            "image_url": "https://www.nishinippon.co.jp/uploads/image/1721316/sns_PN2024111201001810.-.-.CI0003.jpg",
            "language": "ja",
            "published_at": "2024-11-12T23:21:08.000000Z",
            "source": "nishinippon.co.jp",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "2fcf994c-e09e-4af9-a4ac-a86e3debb646",
            "title": "[단독].김여사 명태.에 준 돈봉투 사진.명 씨 휴대전화에서 발견 : 클리앙",
            "description": "[단독] 검찰, 김 여사가 명태균에 준 돈봉투 사진 확보...명 씨 휴대전화에서 발견 MBN 3시간전 다음뉴스 ..... 검찰이 명태?...",
            "keywords": "",
            "snippet": "\n\n\n\n\n\n\n\n[단독] 검찰, 김 여사가 명태균에 준 돈봉투 사진 확보...명 씨 휴대전화에서 발견\n\n\n\n\n\nMBN\n\n3시간전\n\n다음뉴스\n\n\n\n\n\n.......",
            "url": "https://www.clien.net/service/board/park/18839049",
            "image_url": "https://www.clien.net/service/image/favicon.ico",
            "language": "ko",
            "published_at": "2024-11-12T23:20:54.000000Z",
            "source": "clien.net",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "70094e74-35ed-485f-a45c-275a65def8c4",
            "title": "달러-원, 연고점 찍고 1,407원대로 후퇴",
            "description": "달러-원 환율이 연고점을 경신한 후 1,407원대에서 거래되고 있다.12일 오후 9시 10분 현재 달러-원 환율은 전일 대비 13.10원...",
            "keywords": "",
            "snippet": "(서울=연합인포맥스) 이규선 기자 = 달러-원 환율이 연고점을 경신한 후 1,407원대에서 거래되고 있다.\n\n12일 오후 9시 10분 ?...",
            "url": "https://news.einfomax.co.kr/news/articleView.html?idxno=4332033",
            "image_url": "https://news.einfomax.co.kr/image/logo/snslogo_20231006045256.png",
            "language": "ko",
            "published_at": "2024-11-12T23:20:54.000000Z",
            "source": "t240.ndsoftnews.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "ea62aaa3-3ed3-41db-923c-71bdc17643ae",
            "title": "폭스비즈니스 기자 \"SEC 위원장, 트럼프 해임 통보 불복시 피소 가능성”",
            "description": "폭스비즈니스 기자 ˝SEC 위원장, 트럼프 해임 통보 불복시 피소 가능성”-코인리더스",
            "keywords": "",
            "snippet": "",
            "url": "https://www.coinreaders.com/131284",
            "image_url": "http://www.coinreaders.com/data/coinreaders_com/banner/favicon.ico",
            "language": "ko",
            "published_at": "2024-11-12T23:20:25.000000Z",
            "source": "coinreaders.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "bb3a93fa-bf25-450f-a246-2bda7c77e631",
            "title": "제18회 임종국상, 김동춘 교수와 민병래 선생 수상",
            "description": "민족문제연구소와 임종국선생기념사업회에서 마련한 '제18회 임종국상 시상식'이 2024년 11월 12일(화) 오후 6시 30분 서울?...",
            "keywords": "",
            "snippet": "SNS 기사보내기\n\nSNS 기사보내기 카카오스토리(으)로 기사보내기 카카오톡(으)로 기사보내기 URL복사(으)로 기사보내기 이?...",
            "url": "http://www.tongilnews.com/news/articleView.html?idxno=212069",
            "image_url": "https://cdn.tongilnews.com/news/thumbnail/202411/212069_104765_1630_v150.jpg",
            "language": "ko",
            "published_at": "2024-11-12T23:20:22.000000Z",
            "source": "tongilnews.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        }
    ]
}
            
        

Similar News Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

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

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