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-22
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": "7770de06-cbd9-439c-a48b-baadfaae5eba",
                "title": "Russia hosts BRICS Summit: LIVE UPDATES",
                "description": "The 16th BRICS Summit is taking place in Russia’s fifth-largest city where dozens of foreign leaders have gathered for three days of talks",
                "keywords": "",
                "snippet": "Around 20,000 delegates from over 30 countries are expected to attend the three-day international forum in Kazan\n\nThe 16th BRICS summit is taking place in Kazan...",
                "url": "https://www.rt.com/russia/606060-russia-brics-summit-kazan/",
                "image_url": "https://mf.b37mrtl.ru/files/2024.10/article/6717300b203027396d253ced.jpg",
                "language": "en",
                "published_at": "2024-10-22T05:21:02.000000Z",
                "source": "rt.com",
                "categories": [
                    "general",
                    "politics"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "f0668694-a31e-4575-9501-ecba6da208da",
                        "title": "Russia pushes 'new world order' agenda as it hosts beefed-up BRICS summit",
                        "description": "Russia is rolling out the red carpet to its allies on Tuesday as it hosts the latest BRICS summit in a show of strength to the West.",
                        "keywords": "Vladimir Putin, Government and politics, Russia, South Africa, Foreign policy, India, China, United Arab Emirates, Recep Tayyip Erdogan, Xi Jinping, Mahmoud Abbas, Masoud Pezeshkian, United States, business news",
                        "snippet": "Russian President Vladimir Putin attends the BRICS Business Forum in Moscow, Russia October 18, 2024. Alexander Zemlianichenko | Via Reuters\n\nRussia is rolling ...",
                        "url": "https://www.cnbc.com/2024/10/22/russia-hosts-brics-summit-pushes-new-world-order-agenda-to-rival-west.html",
                        "image_url": "https://image.cnbcfm.com/api/v1/image/108049870-17292742572024-10-18t103613z_1061388036_rc2xmaa99x9x_rtrmadp_0_russia-brics-putin-growth.jpeg?v=1729274326&w=1920&h=1080",
                        "language": "en",
                        "published_at": "2024-10-22T07:50:04.000000Z",
                        "source": "cnbc.com",
                        "categories": [
                            "general",
                            "business"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "2877910d-9341-4532-8bbb-530f4e1c4bb6",
                        "title": "Modi lauds ‘privileged’ BRICS partnership",
                        "description": "Indian Prime Minister Narendra Modi is embarking on his second trip to Russia this year for the 16th annual BRICS Summit in Kazan",
                        "keywords": "",
                        "snippet": "The prime minister has said he expects to strengthen bilateral ties with Russia during this week’s summit in Kazan\n\nIndian Prime Minister Narendra Modi has sa...",
                        "url": "https://www.rt.com/india/606100-modi-lauds-brics-bartnership/",
                        "image_url": "https://mf.b37mrtl.ru/files/2024.10/article/67176fec85f54013283d6fa8.png",
                        "language": "en",
                        "published_at": "2024-10-22T09:24:30.000000Z",
                        "source": "rt.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "e8ac5c16-e83c-4b7b-9deb-410bf7e369cf",
                        "title": "Ramaphosa urges BRICS partners to invest in Africa’s industrialization",
                        "description": "President Cyril Ramaphosa has advocated for BRICS countries to invest in Africa’s industrialization, infrastructure, and small businesses",
                        "keywords": "",
                        "snippet": "The South African president has encouraged collaboration in infrastructure and small businesses\n\nSouth African President Cyril Ramaphosa has called on BRICS nat...",
                        "url": "https://www.rt.com/africa/606101-ramaphosa-calls-brics-help-industrialisation/",
                        "image_url": "https://mf.b37mrtl.ru/files/2024.10/article/67177e942030271e6c0d5dd5.jpg",
                        "language": "en",
                        "published_at": "2024-10-22T10:34:41.000000Z",
                        "source": "rt.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "359fb56b-ffc5-43c5-90ac-88d321199f72",
                        "title": "Putin hosts Global South leaders at BRICS summit intended to counterbalance Western clout",
                        "description": "China’s Xi Jinping, India’s Narendra Modi and other global leaders have arrived in the Russian city of Kazan for a summit of the BRICS bloc of developing economies that the Kremlin hopes to turn into a rallying point for defying the Western liberal order.",
                        "keywords": "Kazan, Russia, Russia government, General news, AP Top News, World news, Xi Jinping, Vladimir Putin, United States government, Government policy, Business, Narendra Modi, Politics",
                        "snippet": "KAZAN, Russia (AP) — China’s Xi Jinping, India’s Narendra Modi and other global leaders arrived Tuesday in the Russian city of Kazan for a summit of the B...",
                        "url": "https://apnews.com/article/russia-brics-summit-china-india-ukraine-war-39e90fce8443b922f4d224c65c2ec932",
                        "image_url": "https://dims.apnews.com/dims4/default/4d0997a/2147483647/strip/true/crop/5142x2892+0+268/resize/1440x810!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F69%2F87%2F55efdf10c4dfc425fc913c44d372%2F069746bd90104be6b84373bbd3a59159",
                        "language": "en",
                        "published_at": "2024-10-22T10:23:02.000000Z",
                        "source": "apnews.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "4d23fc95-e016-4593-8aa5-830f170ccc3b",
                        "title": "Dumping the dollar ‘keeps politics out of economic development’ – Putin",
                        "description": "Russian President Putin says boosting the use of local currencies in trade settlements among BRICS member states reduces geopolitical risks",
                        "keywords": "",
                        "snippet": "The use of local currencies in trade among BRICS members reduces geopolitical risks, the Russian president has said\n\nRussian President Vladimir Putin has said b...",
                        "url": "https://www.rt.com/russia/606108-dumping-dollar-economy-politics-putin/",
                        "image_url": "https://mf.b37mrtl.ru/files/2024.10/article/671795aa85f540147b13144f.jpg",
                        "language": "en",
                        "published_at": "2024-10-22T12:11:43.000000Z",
                        "source": "rt.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    }
                ]
            },
            {
                "uuid": "1c232cc8-ec42-4f37-aae3-9778eeb98d7e",
                "title": "Harvey Weinstein said to have bone marrow cancer",
                "description": "Disgraced Hollywood movie producer Harvey Weinstein has been diagnosed with bone marrow cancer, according to numerous reports.",
                "keywords": "Harvey Weinstein",
                "snippet": "Harvey Weinstein faces more charges in New York\n\nDisgraced Hollywood movie producer Harvey Weinstein has been diagnosed with bone marrow cancer, according to nu...",
                "url": "https://www.cbsnews.com/news/harvey-weinstein-bone-marrow-cancer-leukemia/",
                "image_url": "https://assets2.cbsnewsstatic.com/hub/i/r/2024/10/22/a3174a30-3feb-40ed-8202-3aded410ce71/thumbnail/1200x630/1dda791dc338a79eb9ede1b35d67574e/gettyimages-2172051793.jpg?v=b241b87adbbb7f0a227ed35b96d0cefa",
                "language": "en",
                "published_at": "2024-10-22T07:15:28.000000Z",
                "source": "cbsnews.com",
                "categories": [
                    "general",
                    "politics"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "d1b30e8c-44e0-4e6e-86fc-405e2aab62e6",
                        "title": "Harvey Weinstein diagnosed with chronic myeloid leukemia: Sources",
                        "description": "Harvey Weinstein has been diagnosed with a form of bone marrow cancer, sources told ABC News.",
                        "keywords": "Article, 115012038",
                        "snippet": "The former Hollywood producer is receiving treatment in jail, sources said.\n\nHarvey Weinstein has been diagnosed with a form of bone marrow cancer, sources told...",
                        "url": "https://abcnews.go.com/US/harvey-weinstein-diagnosed-chronic-myeloid-leukemia-sources/story?id=115012038",
                        "image_url": "https://i.abcnewsfe.com/a/8d55a51a-27e8-4e21-8892-8c9f62fcad8b/harvey-weinstein-gty-jef-240909_1725908254167_hpMain_16x9.jpg?w=1600",
                        "language": "en",
                        "published_at": "2024-10-22T03:36:22.000000Z",
                        "source": "abcnews.go.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "d59c4cbd-65be-4729-842a-f947c995284b",
                        "title": "Harvey Weinstein Diagnosed With Bone Marrow Cancer",
                        "description": "Harvey Weinstein was diagnosed with myeloid leukemia—a cancer of the bone marrow—while in prison at Rikers Island in New York, two sources told NBC News.",
                        "keywords": "",
                        "snippet": "Watch : New York Jury Indicts Harvey Weinstein on New Sexual Assault Charges\n\nHarvey Weinstein is battling cancer.\n\nThe disgraced Hollywood producer has been di...",
                        "url": "https://www.eonline.com/news/1408937/harvey-weinstein-diagnosed-with-bone-marrow-cancer?cmpid=rss-syndicate-genericrss-us-top_stories",
                        "image_url": "https://akns-images.eonline.com/eol_images/Entire_Site/2024630/cr_1200x1200-240730143251-GettyImages-542739972.jpg?fit=around%7C1080:1080&output-quality=90&crop=1080:1080;center,top",
                        "language": "en",
                        "published_at": "2024-10-22T03:51:52.000000Z",
                        "source": "eonline.com",
                        "categories": [
                            "entertainment",
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "df7a67f4-bc3c-489e-abaf-2d87fa641d54",
                        "title": "Harvey Weinstein Diagnosed With Bone Marrow Cancer: Report",
                        "description": "Harvey Weinstein was diagnosed with chronic myeloid leukemia, a rare form of bone marrow cancer, according to reports on Monday, October 21",
                        "keywords": "",
                        "snippet": "Harvey Weinstein is battling cancer behind bars.\n\nWeinstein, 72, was diagnosed with chronic myeloid leukemia, a rare form of bone marrow cancer, NBC News report...",
                        "url": "https://www.usmagazine.com/celebrity-news/news/harvey-weinstein-diagnosed-with-bone-marrow-cancer-report/",
                        "image_url": "https://www.usmagazine.com/wp-content/uploads/2024/09/1-Harvey-Weinstein-Hospitalized.jpg?crop=0px%2C20px%2C2000px%2C1050px&resize=1200%2C630&quality=86&strip=all",
                        "language": "en",
                        "published_at": "2024-10-22T05:21:47.000000Z",
                        "source": "usmagazine.com",
                        "categories": [
                            "entertainment",
                            "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-22T14:58:06 | 2024-10-22T14:58 | 2024-10-22T14 | 2024-10-22 | 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-22T14:58:06 | 2024-10-22T14:58 | 2024-10-22T14 | 2024-10-22 | 2024-10 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-10-22
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": 1137650,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "84733827-307a-405c-b293-c794606f9b2c",
            "title": "Germany detects first case of new mpox variant",
            "description": "The first case of a new mpox variant has been reported in Germany, but authorities say the risk to the wider population is low",
            "keywords": "",
            "snippet": "The World Health Organization previously declared the infection a global public health emergency\n\nGermany has reported its first case of a new mpox variant, acc...",
            "url": "https://www.rt.com/news/606145-germany-new-mpox-variant/",
            "image_url": "https://mf.b37mrtl.ru/files/2024.10/article/6717ba7d85f5401213240f6c.jpg",
            "language": "en",
            "published_at": "2024-10-22T14:46:09.000000Z",
            "source": "rt.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "151df9c2-0fe6-4b20-9e97-22c44a247973",
            "title": "Swing state GOP chair reveals voter enthusiasm for Trump is something 'we've never seen before'",
            "description": "Nevada GOP Chair Michael McDonald told Fox News Digital he is \"confident\" but not \"cocky\" that former President Donald Trump will be victorious in the key swing...",
            "keywords": "",
            "snippet": "LAS VEGAS - Clark County, Nevada, will be one of the most closely watched counties in the country this November, and Nevada’s GOP chairman spoke to Fox News D...",
            "url": "https://www.foxnews.com/politics/swing-state-gop-chair-reveals-voter-enthusiasm-trump-something-never-seen-before",
            "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2024/10/screenshot-2024-10-20-220309.png",
            "language": "en",
            "published_at": "2024-10-22T14:35:13.000000Z",
            "source": "foxnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "0b1fd2b4-43f5-438d-817d-2e0b1ceadafd",
            "title": "Toni Kroos: Kylian Mbappé's Real Madrid move didn't tempt me",
            "description": "Toni Kroos has said he wasn't tempted to delay his retirement to link up with Kylian Mbappé at Real Madrid, admitting it",
            "keywords": "",
            "snippet": "Open Extended Reactions\n\nToni Kroos has said he wasn't tempted to delay his retirement to link up with Kylian Mbappé at Real Madrid, admitting it \"wasn't easy\...,
            "url": "https://www.espn.com/soccer/story/_/id/41938970/toni-kroos-kylian-mbappe-real-madrid-move-tempt-me",
            "image_url": "https://a3.espncdn.com/combiner/i?img=%2Fphoto%2F2024%2F1022%2Fr1404029_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2024-10-22T14:31:47.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "a9729763-a6b9-40f3-b0ea-1c70a6952228",
            "title": "Ex-Man United forward Diego Forlán to make pro tennis debut",
            "description": "Former Manchester United forward Diego Forlán will make his ATP Challenger tennis debut in the doubles competition at the Uruguay Open next month.",
            "keywords": "",
            "snippet": "Open Extended Reactions\n\nFormer Manchester United forward Diego Forlán is set to make his ATP Challenger tennis debut in the doubles competition at the Uruguay...",
            "url": "https://www.espn.com/soccer/story/_/id/41938640/ex-man-united-forward-diego-forlan-make-pro-tennis-debut",
            "image_url": "https://a.espncdn.com/combiner/i?img=%2Fphoto%2F2024%2F1022%2Fr1404026_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2024-10-22T14:31:47.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "ed8e4828-d300-4897-8f22-182cdf7231e7",
            "title": "Italy icon Francesco Totti: Serie A teams call me over return",
            "description": "Roma legend Francesco Totti has claimed that Serie A teams are still calling him to see if he would return to professional football, adding that he thinks it wo...",
            "keywords": "",
            "snippet": "Open Extended Reactions\n\nRoma legend Francesco Totti has claimed that Serie A teams are still calling him to see if he would return to professional football, ad...",
            "url": "https://www.espn.com/soccer/story/_/id/41938386/italy-icon-francesco-totti-serie-teams-call-return",
            "image_url": "https://a2.espncdn.com/combiner/i?img=%2Fphoto%2F2024%2F1022%2Fr1404023_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2024-10-22T14:31:47.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "cbef63b3-ff72-407b-812d-13d7d0e5333b",
            "title": "\"FBI True\" takes viewers inside deadly 2014 Oregon standoff",
            "description": "The latest episode of",
            "keywords": "Oregon, Crime",
            "snippet": "\"FBI True\" takes viewers inside deadly 2014 Oregon standoff The latest episode of \"FBI True\" on Paramount Plus delves into a tense standoff between FBI agents a...",
            "url": "https://www.cbsnews.com/video/inside-deadly-2014-oregon-standoff/",
            "image_url": "https://assets2.cbsnewsstatic.com/hub/i/r/2024/10/22/a0a601bb-8ba7-4f0c-87bb-589421e46c90/thumbnail/1200x630/2d23820317629c9d2d2d73cdc068cc41/1022-cmo-fbitrue.jpg?v=b241b87adbbb7f0a227ed35b96d0cefa",
            "language": "en",
            "published_at": "2024-10-22T14:29:00.000000Z",
            "source": "cbsnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "24ea7fa5-c810-4d59-88c5-854d7176e3a5",
            "title": "India wants to help bring peace to Ukraine – Modi",
            "description": "The Ukraine conflict should be resolved peacefully and India is ready to help in the effort, Narendra Modi told Vladimir Putin",
            "keywords": "",
            "snippet": "New Delhi is ready to contribute in every possible way to end the conflict, the Indian leader has told Vladimir Putin\n\nThe conflict between Russia and Ukraine c...",
            "url": "https://www.rt.com/india/606140-india-ready-help-ukraine-peace/",
            "image_url": "https://mf.b37mrtl.ru/files/2024.10/article/6717aee72030270bb709a75e.jpg",
            "language": "en",
            "published_at": "2024-10-22T14:26:42.000000Z",
            "source": "rt.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "48543d24-bbce-48d6-b5d4-68db7f6e240d",
            "title": "Central Park 5 sue Trump for defamation",
            "description": "The group was wrongfully convicted of raping a jogger in 1989",
            "keywords": "",
            "snippet": "What happened\n\nMembers of the Central Park Five, a group of Black and Hispanic men wrongfully convicted as teenagers of the 1989 rape of a jogger in Manhattan, ...",
            "url": "https://theweek.com/politics/central-park-donald-trump-sue-defamation",
            "image_url": "https://cdn.mos.cms.futurecdn.net/DPNQvPNfPCqTU25SQ4JiPX-1200-80.jpg",
            "language": "en",
            "published_at": "2024-10-22T14:26:34.000000Z",
            "source": "theweek.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "af47eed9-9e47-4ee1-808c-e9b102f5165f",
            "title": "The Dow drops 150 points as gold hits a record, and Treasury yields rise",
            "description": "The Fed's approach to cut interest rates at a moderate pace has dampened investors sentiment",
            "keywords": "Dow Jones Industrial Average, Verizon Communications, Business, Finance, TESLA, GE Aerospace, Stock market crashes, Nvidia, Dow Jones & Company, Inflation, GENERAL MOTORS, Quartz",
            "snippet": "The Dow fell by 165 points on Tuesday morning as gold prices surged to another record high and interest rates continued to climb.\n\nAI can make a \"digital twin\" ...",
            "url": "https://qz.com/dow-drops-gold-record-treasury-1851678164",
            "image_url": "https://i.kinja-img.com/image/upload/c_fill,h_675,pg_1,q_80,w_1200/d0e0fe757e7a40de5f9a779f56ca9bd6.jpg",
            "language": "en",
            "published_at": "2024-10-22T14:25:00.000000Z",
            "source": "qz.com",
            "categories": [
                "general",
                "business",
                "tech",
                "entertainment"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "013570fd-3a74-4131-9dea-f707ee1ba001",
            "title": "Miami right place for Lionel Messi's 'happiness'",
            "description": "Spain legend Andres Iniesta believes Inter Miami is the right fit for former Barcelona teammate Lionel Messi.",
            "keywords": "",
            "snippet": "Futbol Americas' Herc Gomez says Lionel Messi was brought into Inter Miami to win trophies like the MLS Cup. (1:54)\n\nWill the Messi gamble pay off if Inter Miam...",
            "url": "https://www.espn.com/soccer/story/_/id/41940262/miami-right-place-lionel-messi-happiness-iniesta",
            "image_url": "https://a4.espncdn.com/combiner/i?img=%2Fphoto%2F2018%2F0427%2Fr362516_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2024-10-22T14:24:43.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        }
    ]
}
            
        

All News Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

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

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

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

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

When using special characters (+, -, |, ", *, ()) you MUST URL-encode this parameter.
search_fields false Comma separated list of fields to apply the search parameter to.
Supported fields: title | description | keywords | main_text
Example: title,description,keywords
Default: title,main_text
categories false Comma separated list of categories to include.
Supported categories: general | science | sports | business | health | entertainment | tech | politics | food | travel
Example: business,tech
exclude_categories false Comma separated list of categories to exclude.
domains false Comma separated list of domains to include. List of domains can be obtained through our Sources endpoint, found further down this page.
exclude_domains false Comma separated list of domains to exclude
source_ids false Comma separated list of source_ids to include. List of source_ids can be obtained through our Sources endpoint, found further down this page.
exclude_source_ids false Comma separated list of source_ids to exclude.
language false Comma separated list of languages to include. Default is all.
Click here for a list of supported languages.
Examples: en,es (English + Spanish)
published_before false Find all articles published before the specified date. Supported formats include: Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2024-10-22T14:58:06 | 2024-10-22T14:58 | 2024-10-22T14 | 2024-10-22 | 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-22T14:58:06 | 2024-10-22T14:58 | 2024-10-22T14 | 2024-10-22 | 2024-10 | 2024
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2024-10-22
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": 48648011,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "4e6a312d-8d96-4ed5-b364-5dc65b87360c",
            "title": "양구군, 스포츠마케팅 지역경제 활성화 성공 모델로 소개",
            "description": "강원 양구군의 스포츠마케팅이 한국스포츠과학원이 매주 발간하는 ‘스포츠 현안과 진단’에서 지역경제 활성화 성공 ?...",
            "keywords": "",
            "snippet": "(사진=양구군)\n\n강원 양구군의 스포츠마케팅이 한국스포츠과학원이 매주 발간하는 ‘스포츠 현안과 진단’에서 지역경?...",
            "url": "http://www.shinailbo.co.kr/news/articleView.html?idxno=1948580",
            "image_url": "http://www.shinailbo.co.kr/news/thumbnail/202410/1948580_1071595_5754_v150.jpg",
            "language": "ko",
            "published_at": "2024-10-22T14:57:58.000000Z",
            "source": "shinailbo.co.kr",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "dc21cabe-2ffe-4dd2-9977-d6cd792acab0",
            "title": "‘라그나로크X’, 신규 성장 시스템 ‘신격’ 업데이트 실시",
            "description": "그라비티는 22일 3D MMORPG ‘라그나로크X : Next Generation(이하 라그나로크X)’의 신규 성장 시스템, 던전 업데이트를 진행했?...",
            "keywords": "",
            "snippet": "그라비티는 22일 3D MMORPG ‘라그나로크X : Next Generation(이하 라그나로크X)’의 신규 성장 시스템, 던전 업데이트를 진행했?...",
            "url": "https://www.khgames.co.kr/news/articleView.html?idxno=233243",
            "image_url": "https://cdn.khgames.co.kr/news/thumbnail/202410/233243_266673_5732_v150.jpg",
            "language": "ko",
            "published_at": "2024-10-22T14:57:50.000000Z",
            "source": "khgames.co.kr",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "83757747-72a2-4537-b0d3-3552949cfdbd",
            "title": "이은주 경기도의원, '유보통합의 추진 현황과 정책방향 모색' 토론회 개최",
            "description": "경기도의회 교육행정위원회 이은주 의원(국민의힘, 구리2)이 좌장을 맡은 '경기도 유보통합의 추진 현황과 정책 방향 모?...",
            "keywords": "",
            "snippet": "한국유치원총연합회, 어린이집연합회, 경기도교육청 등 관계자 400여명 참여, 성황리 개최\n\n경기도의회 교육행정위원회 ?...",
            "url": "http://www.shinailbo.co.kr/news/articleView.html?idxno=1948567",
            "image_url": "http://www.shinailbo.co.kr/news/thumbnail/202410/1948567_1071593_551_v150.jpg",
            "language": "ko",
            "published_at": "2024-10-22T14:57:37.000000Z",
            "source": "shinailbo.co.kr",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "e7c04f24-e605-49ef-8b89-3d6bcd9e3ffa",
            "title": "Dongzi Securities Big Data Research Report on Public Opinion",
            "description": "Dongzi Securities Big Data Research Report on Public Opinion Release date October 21, 2024 at 9:25 AM The DongZi Securities Sentiment Big Data Indicator (I) - O",
            "keywords": "GuruFocus, Article, News, dongzi",
            "snippet": "Dongzi Securities Big Data Research Report on Public Opinion\n\nRelease date\n\nOctober 21, 2024 at 9:25 AM\n\nThe DongZi Securities Sentiment Big Data Indicator (I) ...",
            "url": "https://www.gurufocus.com/news/2559769/dongzi-securities-big-data-research-report-on-public-opinion",
            "image_url": "https://static.gurufocus.com/images/global_logo_twitter_card.png",
            "language": "en",
            "published_at": "2024-10-22T14:57:30.000000Z",
            "source": "gurufocus.com",
            "categories": [
                "business"
            ],
            "relevance_score": null
        },
        {
            "uuid": "5ccf7e86-3b33-43b3-8ab3-cd2381d8da6d",
            "title": "“국내외 과학기술정책가치사슬의 허브로의 STEPI 변화 강조”",
            "description": "[정보통신신문=박남수기자] 윤지웅 과학기술정책연구원 제16대 원장은 “STEPI가 글로벌 싱크탱크로서 국가전략기술분야 ...",
            "keywords": "과학기술정책연구원",
            "snippet": "윤지웅 제16대 과학기술정책연구원장 취임\n\n취임사를 하는 제16대 윤지웅 STEPI 원장.\n\n[정보통신신문=박남수기자]\n\n윤지웅 ...",
            "url": "https://www.koit.co.kr/news/articleView.html?idxno=126069",
            "image_url": "http://www.koit.co.kr/news/thumbnail/202410/126069_78919_5641_v150.jpg",
            "language": "ko",
            "published_at": "2024-10-22T14:57:21.000000Z",
            "source": "koit.co.kr",
            "categories": [
                "tech"
            ],
            "relevance_score": null
        },
        {
            "uuid": "644ab808-7107-4ea7-b36c-358313eb801e",
            "title": "‘대형프로젝트 효과’ 현대건설, 3Q 매출 8조2569억·전년동기比 5.1%↑",
            "description": "현대건설이 올해 3분기 연결 기준 잠정 실적 공시를 통해 매출 8조2569억원으로 전년 동기 7조8585억원 대비 5.1% 증가했다고...",
            "keywords": "현대건설, 실적",
            "snippet": "현대건설이 올해 3분기 연결 기준 잠정 실적 공시를 통해 매출 8조2569억원으로 전년 동기 7조8585억원 대비 5.1% 증가했다고...",
            "url": "https://www.nbnews.kr/news/articleView.html?idxno=99287",
            "image_url": "https://cdn.nbnews.kr/news/thumbnail/202410/99287_113060_3932_v150.jpg",
            "language": "ko",
            "published_at": "2024-10-22T14:57:14.000000Z",
            "source": "greendaily.co.kr",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "521ea7af-a8ee-4197-9021-827a2bd12de8",
            "title": "Dongzi Securities Big Data Sentiment Analysis Report",
            "description": "Dongzi Securities Big Data Sentiment Analysis Report**Dongzi Securities Big Data Sentiment Analysis Report****Release Date****October 22, 2024 9:25:00 AM*** Don",
            "keywords": "GuruFocus, Article, News, dongzi",
            "snippet": "Dongzi Securities Big Data Sentiment Analysis Report\n\n**Dongzi Securities Big Data Sentiment Analysis Report**\n\n**Release Date**\n\n**October 22, 2024 9:25:00 AM*...",
            "url": "https://www.gurufocus.com/news/2561028/dongzi-securities-big-data-sentiment-analysis-report",
            "image_url": "https://static.gurufocus.com/images/global_logo_twitter_card.png",
            "language": "en",
            "published_at": "2024-10-22T14:57:13.000000Z",
            "source": "gurufocus.com",
            "categories": [
                "business"
            ],
            "relevance_score": null
        },
        {
            "uuid": "2cb36c66-c61b-400e-9f7c-3ae89e7f2dca",
            "title": "From 13% to 3%: A New Market Forecast Is Bleak",
            "description": "Those in the stock market who have watched their portfolios grow by leaps and bounds over the past decade might want to brace for a new normal starting next yea...",
            "keywords": "stock market, Goldman Sachs",
            "snippet": "Those in the stock market who have watched their portfolios grow by leaps and bounds over the past decade might want to brace for a new normal starting next yea...",
            "url": "https://www.newser.com/story/358201/a-new-analysis-has-bleak-news-for-investors.html",
            "image_url": "https://img2-azrcdn.newser.com/image/1567513-12-20241022090547.jpeg",
            "language": "en",
            "published_at": "2024-10-22T14:57:00.000000Z",
            "source": "newser.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "d5538dd0-5183-421d-a6f9-e73a1aefbd20",
            "title": "加速布局核心商圈!零跑开启全国招商:展厅面积最低150㎡",
            "description": "加速布局核心商圈!零跑开启全国招商:展厅面积最低150㎡",
            "keywords": "零跑, 门店, 招商, 加速布局核心商圈!零跑开启全国招商:展厅面积最低150㎡, 快科技",
            "snippet": "加速布局核心商圈!零跑开启全国招商:展厅面积最低150㎡\n\n快科技10月22日消息,零跑汽车正在全国范围内进行招商,寻?...",
            "url": "https://news.mydrivers.com/1/1009/1009513.htm",
            "image_url": "https://img1.mydrivers.com/img/20241022/c1ef52234ddd48c8922784ef3e2054d2.png",
            "language": "zh",
            "published_at": "2024-10-22T14:56:54.000000Z",
            "source": "news.mydrivers.com",
            "categories": [
                "tech",
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "3c547865-8c91-477c-a114-83dbb2b12674",
            "title": "시흥산업진흥원, `2024 한국전자전` 소공인 공동관 운영",
            "description": "경기 시흥산업진흥원(이하 진흥원)은 22일부터 25일까지 4일간 서울 코엑스에서 개최되는 ‘2024 한국전자전(KES 2024)’에 ?...",
            "keywords": "",
            "snippet": "사진/시흥산업진흥원\n\n경기 시흥산업진흥원(이하 진흥원)은 22일부터 25일까지 4일간 서울 코엑스에서 개최되는 ‘2024 한?...",
            "url": "http://www.shinailbo.co.kr/news/articleView.html?idxno=1948563",
            "image_url": "http://www.shinailbo.co.kr/news/thumbnail/202410/1948563_1071585_4748_v150.jpg",
            "language": "ko",
            "published_at": "2024-10-22T14:56:38.000000Z",
            "source": "shinailbo.co.kr",
            "categories": [],
            "relevance_score": null
        }
    ]
}
            
        

Similar News Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

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

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