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 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.
Example: arstechnica.com,androidcentral.com
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.
Example: arstechnica.com-1,androidcentral.com-1
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: 2021-10-25

Note that headline data before 2021-10-16 may not be accurate.

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": "b9b6bc7d-8d32-4947-99a2-9b4cceb0b61b",
                "title": "Sudanese gov’t officials detained; group sees apparent coup",
                "description": "Sudanese officials say military forces have detained at least five senior government officials on Monday, as the Sudanese Professionals’ Association has called on people to take to the street to counter an apparent military coup.",
                "keywords": "Sudan",
                "snippet": "CAIRO (AP) — Sudanese officials say military forces have detained at least five senior government officials on Monday, as the Sudanese Professionals’ Associ...",
                "url": "https://www.bostonglobe.com/2021/10/24/world/sudanese-govt-officials-detained-group-sees-apparent-coup/?camp=bg:brief:rss:feedly&rss_id=feedly_rss_brief",
                "image_url": "https://bostonglobe-prod.cdn.arcpublishing.com/resizer/AaknvwJbcNIeDoS8vXGD-JCCljU=/506x0/cloudfront-us-east-1.images.arcpublishing.com/bostonglobe/63RQQAX6NRBTRWTRVD5EEZ75ZQ.jpg",
                "language": "en",
                "published_at": "2021-10-25T03:53:47.000000Z",
                "source": "bostonglobe.com",
                "categories": [
                    "general"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "e323dc2e-e63e-47f6-a724-f75bd5d6e338",
                        "title": "Sudan PM Abdalla Hamdok under house arrest amid coup",
                        "description": "The arrests come a day after U.S. envoy Jeffrey Feltman warned the military not to stage a coup.",
                        "keywords": "Military",
                        "snippet": "local reports.\n\nWhy it matters: The arrests of the civilian faction in the Sudanese government came a day after U.S. envoy Jeffrey Feltman met with the head of ...",
                        "url": "https://www.axios.com/sudan-abdalla-hamdok-coup-house-arrest-bda88865-8574-4bdc-9ee4-16a94afa1004.html",
                        "image_url": "https://images.axios.com/3Hn2hKRoeQHrLNUYikvNFR2UG_g=/0x600:5760x3840/1366x768/2021/10/25/1635136106675.jpg",
                        "language": "en",
                        "published_at": "2021-10-25T04:51:45.000000Z",
                        "source": "axios.com",
                        "categories": [
                            "general",
                            "politics",
                            "tech"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "348c6d8c-4f2c-49e0-abdb-efd5981cb031",
                        "title": "Gov’t officials detained, phones down in possible Sudan coup",
                        "description": "CAIRO (AP) — Military forces detained at least five senior Sudanese government figures on Monday, officials said, as the country's main pro-democracy group called on people to take to the streets to counter an apparent military coup.",
                        "keywords": "Technology, Sudan, Omar al-Bashir, Middle East, Africa",
                        "snippet": "FILE - This May 7, 2021, file photo shows U.S. Special Envoy for the Horn of Africa Jeffrey Feltman in Khartoum, Sudan. Sudanese officials say military forces h...",
                        "url": "https://apnews.com/article/middle-east-africa-sudan-arrests-omar-al-bashir-c8d027c0a9e250fcb5a595bdc987d282",
                        "image_url": "https://storage.googleapis.com/afs-prod/media/c99dda7dd07b47a19015c2dd2b16dec3/3000.jpeg",
                        "language": "en",
                        "published_at": "2021-10-25T05:23:03.000000Z",
                        "source": "apnews.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "5719f6fa-e429-4e68-90d1-f77e61dfe122",
                        "title": "Officials detained, internet down in apparent Sudan coup",
                        "description": "The country’s interim Prime Minister Abdulla Hamdok is under house arrest and being forced to issue a message in support of a military coup.",
                        "keywords": "News, coups, military, sudan",
                        "snippet": "Sudan’s information ministry says the country’s interim Prime Minister Abdulla Hamdok is under house arrest and being forced to issue a message in support o...",
                        "url": "https://nypost.com/2021/10/25/sudan-coup-has-official-detained-internet-down/",
                        "image_url": "https://nypost.com/wp-content/uploads/sites/2/2021/10/600.jpeg?quality=90&strip=all&w=600",
                        "language": "en",
                        "published_at": "2021-10-25T07:02:44.000000Z",
                        "source": "nypost.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "87e1577f-2de8-4726-9415-a4828504e6a3",
                        "title": "US ‘deeply alarmed’ over reports of military coup in Sudan",
                        "description": "The top U.S. envoy took to Twitter to announce his alarm over reports of a military coup in Sudan targeting the country's tenuous transitional government.",
                        "keywords": "",
                        "snippet": "The top U.S. envoy for the Horn of Africa on Monday took to Twitter to announce his alarm over reports of a military coup in Sudan targeting the country's tenuo...",
                        "url": "https://www.foxnews.com/politics/us-deeply-alarmed-over-reports-of-military-coup-in-sudan",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2021/10/Sudan-protest.jpg",
                        "language": "en",
                        "published_at": "2021-10-25T07:16:03.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "15e29268-6d2f-4175-9af4-a8339724b959",
                        "title": "Sudan facing full military coup, information ministry warns, as military arrest prime minister, raid radio and TV stations",
                        "description": "The Sudanese information ministry has said the government is facing a coup d’etat, with the prime minister arrested and taken to an unknown location. Radio and TV studios in the capital have also been stormed by troops.",
                        "keywords": "",
                        "snippet": "The Sudanese information ministry has said the government is facing a coup d’etat, with the prime minister arrested and taken to an unknown location. Radio an...",
                        "url": "https://www.rt.com/news/538355-sudan-full-military-coup/",
                        "image_url": "https://cdni.rt.com/files/static.en/article/breaking.jpg",
                        "language": "en",
                        "published_at": "2021-10-25T07:16:55.000000Z",
                        "source": "rt.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    }
                ]
            },
            {
                "uuid": "5c9009c7-b957-4c12-8834-53a471c2dc8c",
                "title": "China says it will cut fossil fuel consumption to 20% by 2060",
                "description": "China plans to cut its reliance on fossil fuels to below 20% by 2060, according to a cabinet document published in state media Sunday.",
                "keywords": "economy, China says it will cut fossil fuel consumption to 20% by 2060 - CNN",
                "snippet": "Hong Kong (CNN Business) China plans to cut its reliance on fossil fuels to below 20% by 2060, according to a cabinet document published in state media Sunday.\n...",
                "url": "https://www.cnn.com/2021/10/25/economy/china-fossil-fuels-climate-intl-hnk/index.html",
                "image_url": "https://cdn.cnn.com/cnnnext/dam/assets/211011015614-china-coal-electricity-station-092821-super-tease.jpg",
                "language": "en",
                "published_at": "2021-10-25T06:25:42.000000Z",
                "source": "cnn.com",
                "categories": [
                    "general"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "770fc3dd-eb77-46d8-a34b-958aa03faf69",
                        "title": "NBA: Protesters show support for Irving's vaccine stance ahead of Nets game",
                        "description": "Protesters scaled barricades and pushed toward the doors of the Brooklyn Nets' home arena on Sunday in support of NBA All-Star Kyrie Irving, who cannot join the team as he has chosen not to get vaccinated against COVID-19.",
                        "keywords": "sport, NBA: Protesters show support for Irving's vaccine stance ahead of Nets game - CNN",
                        "snippet": "Protesters scaled barricades and pushed toward the doors of the Brooklyn Nets' home arena on Sunday in support of NBA All-Star Kyrie Irving, who cannot join the...",
                        "url": "https://www.cnn.com/2021/10/25/sport/kyrie-irving-covid-19-vaccine-support-protest-spt-intl/index.html",
                        "image_url": "https://cdn.cnn.com/cnnnext/dam/assets/211025040147-01-stand-with-kyrie-irving-1024-super-tease.jpg",
                        "language": "en",
                        "published_at": "2021-10-25T08:38:36.000000Z",
                        "source": "cnn.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "46773ed7-d08a-4882-b28a-d65fc23082f0",
                        "title": "Fresh lockdowns in China as local Covid-19 infections spread to 11 provinces",
                        "description": "Authorities in northern China are reimposing lockdowns and other emergency measures to curb the spread of coronavirus, with health officials warning of a worsening outbreak after the country recorded more than 100 cases across 11 provinces over the last week.",
                        "keywords": "china, Fresh lockdowns in China as local Covid-19 infections spread to 11 provinces - CNN",
                        "snippet": "Hong Kong (CNN) Authorities in northern China are reimposing lockdowns and other emergency measures to curb the spread of coronavirus, with health officials war...",
                        "url": "https://www.cnn.com/2021/10/25/china/covid-update-intl-hnk/index.html",
                        "image_url": "https://cdn.cnn.com/cnnnext/dam/assets/211025040833-restricted-hohhot-inner-mongolia-covid-19-test-10-24-2021-super-tease.jpg",
                        "language": "en",
                        "published_at": "2021-10-25T08:38:42.000000Z",
                        "source": "cnn.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "6e969e40-be56-4cd3-83ee-c46b1080d50e",
                        "title": "COVID vaccines for kids are getting closer",
                        "description": "Millions of kids under 12 could begin getting COVID-19 shots as soon as \"within the first week or two of November,\" said Anthony Fauci over the weekend.",
                        "keywords": "",
                        "snippet": "Why it matters: This would be a major milestone for getting approximately 28 million more kids protected as they prepare to gather with family during the holida...",
                        "url": "https://www.axios.com/covid-vaccines-for-kids-are-getting-closer-0f141885-21b6-46a8-a5aa-8708562bed93.html",
                        "image_url": "https://images.axios.com/ApML9jQsD14W5Ij_KrusdYkGGko=/0x0:1920x1080/1366x768/2021/10/24/1635111631220.jpg",
                        "language": "en",
                        "published_at": "2021-10-25T09:00:20.000000Z",
                        "source": "axios.com",
                        "categories": [
                            "general",
                            "politics",
                            "tech"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "702727ca-2d56-4c43-ac77-7e4f1ec1b15b",
                        "title": "How to talk to your younger kids about the Covid-19 vaccine",
                        "description": "Your younger children may be afraid of needles. Here's expert advice on how to talk to them about the Covid-19 vaccine to help them prepare, now that the White House plans to roll it out for kids ages 5 to 11.",
                        "keywords": "health, How to talk to your younger kids about the Covid-19 vaccine - CNN",
                        "snippet": "Katie Hurley, author of \"No More Mean Girls: The Secret to Raising Strong, Confident and Compassionate Girls,\" is a child and adolescent psychotherapist in Los ...",
                        "url": "https://www.cnn.com/2021/10/25/health/younger-kids-covid-vaccine-talk-wellness/index.html",
                        "image_url": "https://cdn.cnn.com/cnnnext/dam/assets/211022021805-child-vaccination-china-1018-super-tease.jpg",
                        "language": "en",
                        "published_at": "2021-10-25T09:16:04.000000Z",
                        "source": "cnn.com",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "c7da76da-7cbf-4325-90e7-08ec16758ae1",
                        "title": "China to start vaccinating children ages 3-11 as cases spread",
                        "description": "Children as young as 3 will start receiving COVID-19 vaccines in China, where 76 percent of the population has been fully vaccinated and authorities are maintaining a zero-tolerance policy toward outbreaks.",
                        "keywords": "Virus Outbreak, China",
                        "snippet": "The expansion of the vaccination campaign comes as parts of China take new clampdown measures to try to stamp out small outbreaks. Gansu, a northwestern provinc...",
                        "url": "https://www.bostonglobe.com/2021/10/25/business/china-start-vaccinating-children-ages-3-11-cases-spread/?camp=bg:brief:rss:feedly&rss_id=feedly_rss_brief",
                        "image_url": "https://bostonglobe-prod.cdn.arcpublishing.com/resizer/_064-GuaN7tMMks3FrJZcJVf4P4=/506x0/cloudfront-us-east-1.images.arcpublishing.com/bostonglobe/JKTFOZ3R6MDJJVMYNB4PKIRJJE.jpg",
                        "language": "en",
                        "published_at": "2021-10-25T10:26:26.000000Z",
                        "source": "bostonglobe.com",
                        "categories": [
                            "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.
locale false Comma separated list of country codes to include in the result set. Default is 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.
Example: arstechnica.com,androidcentral.com
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.
Example: arstechnica.com-1,androidcentral.com-1
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: 2021-10-25T14:16:03 | 2021-10-25T14:16 | 2021-10-25T14 | 2021-10-25 | 2021-10 | 2021
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: 2021-10-25T14:16:03 | 2021-10-25T14:16 | 2021-10-25T14 | 2021-10-25 | 2021-10 | 2021
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2021-10-25
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": 494552,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "ab837adc-00c9-4fa7-9390-b480041e89dc",
            "title": "Notable bets: Betting public continues rare NFL hot streak",
            "description": "David Purdum recaps the weekend in betting, including some notable wins and the recent hot streak by the betting public.",
            "keywords": "news - chalk",
            "snippet": "Suddenly, the betting public is not that bad at betting.\n\nFor a third straight week, several U.S. sportsbooks suffered a losing Sunday. It wasn't a massive loss...",
            "url": "https://www.espn.com/chalk/story/_/id/32469872/notable-bets-betting-public-continues-rare-nfl-hot-streak",
            "image_url": "https://a4.espncdn.com/combiner/i?img=%2Fphoto%2F2021%2F1025%2Fr928230_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2021-10-25T14:07:25.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "d0b81dde-0041-41de-9fa6-93e61166c38c",
            "title": "Man United stars losing faith in Ole Gunnar Solskjaer; Antonio Conte eyed as successor - sources",
            "description": "Ole Gunnar Solskjaer is fighting to save his job at Man United, with sources telling ESPN he has lost the faith of a sizeable number of his squad.",
            "keywords": "Manchester United, English Premier League, Soccer",
            "snippet": "Ole Gunnar Solskjaer is fighting to save his job as Manchester United manager with sources telling ESPN that the 48-year-old had already lost the faith of a siz...",
            "url": "https://www.espn.com/soccer/manchester-united-engman_utd/story/4505696/man-united-stars-losing-faith-in-solskjaerconte-eyed-as-successor-sources",
            "image_url": "https://a.espncdn.com/combiner/i?img=%2Fphoto%2F2021%2F1020%2Fr925860_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2021-10-25T13:45:40.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "987b93f9-0d71-4bc7-9b1e-9da70208f083",
            "title": "JoJo Siwa Dresses Up as DWTS’ Jenna Johnson, Dyes Hair Brown",
            "description": "JoJo Siwa 'hit every detail' when dressing up as her 'Dancing With the Stars' partner, Jenna Johnson — read more",
            "keywords": "",
            "snippet": "Twinning alert! JoJo Siwa, is that you? The Dancing With the Stars competitor transformed into her partner, Jenna Johnson, to celebrate Halloween and went all o...",
            "url": "https://www.usmagazine.com/entertainment/news/jojo-siwa-dresses-up-as-dwts-jenna-johnson-dyes-hair-brown/",
            "image_url": "https://i1.wp.com/www.usmagazine.com/wp-content/uploads/2021/10/JoJo-Siwa-Dresses-Up-as-Dancing-With-The-Stars-DWTS-Partner-Jenna-Johnson-Dyes-Hair-Brown.jpg?crop=2px%2C45px%2C1333px%2C700px&resize=1200%2C630&ssl=1&quality=86&strip=all",
            "language": "en",
            "published_at": "2021-10-25T13:36:37.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "c70c3162-7285-4602-bb50-60a333b558df",
            "title": "Revealing new details in Alec Baldwin set shooting",
            "description": "The fallout from a deadly shooting on a movie set in New Mexico has revealed safety issues involving a member of the crew. Actor Alec Baldwin fired a prop gun, ...",
            "keywords": "alec baldwin, prop gun, shooting, mexico, movie, news, Halyna Hutchins, video, safety issues, cbs, director, misfire, crew",
            "snippet": "Revealing new details in Alec Baldwin set shooting The fallout from a deadly shooting on a movie set in New Mexico has revealed safety issues involving a member...",
            "url": "https://www.cbsnews.com/video/revealing-new-details-in-alec-baldwin-set-shooting/",
            "image_url": "https://cbsnews1.cbsistatic.com/hub/i/r/2021/10/25/c9e0f2b4-cd43-4038-8a54-d737ce782255/thumbnail/1200x630/78eb6220ccdab55363f2576f0abe4edb/1025-ctm-baldwinsetshooting-villafranca-822393-640x360.jpg",
            "language": "en",
            "published_at": "2021-10-25T13:36:02.000000Z",
            "source": "cbsnews.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "3a68fc22-4034-4c93-b41c-e98cac646ad1",
            "title": "Facebook has not done enough to fix its hate-speech problem in India",
            "description": "The company recognizes it needs better algorithms and teams in its biggest market.",
            "keywords": "",
            "snippet": "Facebook has been selectively curbing hate speech, misinformation, and inflammatory posts—particularly anti-Muslim content—in India, according to more than ...",
            "url": "https://qz.com/india/2078652/facebook-leaks-reveal-hate-speech-misinformation-issues-in-india/",
            "image_url": "https://cms.qz.com/wp-content/uploads/2021/10/2015-09-27T120000Z_1875379660_GF10000223676_RTRMADP_3_USA-INDIA-MODI-e1635150364441.jpg?quality=75&strip=all&w=1200&h=630&crop=1",
            "language": "en",
            "published_at": "2021-10-25T13:35:06.000000Z",
            "source": "qz.com",
            "categories": [
                "general",
                "business",
                "tech",
                "entertainment"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "028923bf-8684-4672-b911-25bdee1beac3",
            "title": "Record-breaking \"bomb cyclone\" shuts down highways and floods parts of Northern California",
            "description": "Storm blamed for at least two deaths in Washington State brings record amount of rain to Northern California, flooding streets and producing rockslides.",
            "keywords": "bomb cyclone, flooding",
            "snippet": "California woke up today to some of its worst weather in years.\n\nForecasters call it a \"bomb cyclone\" that's already blasted the Pacific Northwest, killing two ...",
            "url": "https://www.cbsnews.com/news/bomb-cyclone-flooding-california-pacific-northwest/",
            "image_url": "https://cbsnews3.cbsistatic.com/hub/i/r/2021/10/25/709510c1-97bd-420c-ab14-93c5cf49b01a/thumbnail/1200x630/3ca2a15b8f5833127d6193c806afa43e/flooding-in-carmichael-ca.jpg",
            "language": "en",
            "published_at": "2021-10-25T13:31:26.000000Z",
            "source": "cbsnews.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "f586f8c8-eb7f-4af3-b7ad-0631f9a9c200",
            "title": "Alibaba’s value plummets by over $340 billion as China cracks down on tech monopolies",
            "description": "Alibaba’s value plummets by over $340 billion as China cracks down on tech monopolies",
            "keywords": "",
            "snippet": "Chinese internet giant Alibaba has lost $344.4 billion in market capitalization over the past year, amid Beijing’s efforts to rein in the country’s massive ...",
            "url": "https://www.rt.com/business/538382-alibaba-value-drops-china-monopoly-crackdown/",
            "image_url": "https://cdni.rt.com/files/2021.10/article/6176999e85f540678936155f.jpg",
            "language": "en",
            "published_at": "2021-10-25T13:26:05.000000Z",
            "source": "rt.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "5489a7c5-84a0-4696-923c-ac0ed94e40c4",
            "title": "SolarWinds Hackers Reportedly Stepping Up Cybersecurity Attacks : news",
            "description": "23.8m members in the news community. The place for news articles about current events in the United States and the rest of the world. Discuss it all …",
            "keywords": "",
            "snippet": "The place for news articles about current events in the United States and the rest of the world. Discuss it all here.",
            "url": "https://www.reddit.com/r/news/comments/qfe5m6/solarwinds_hackers_reportedly_stepping_up/",
            "image_url": "https://external-preview.redd.it/Bcu14k5Hwj7vfQ2GUkB2cj0XafUB_JVTVVpX884ucA0.jpg?auto=webp&s=34703ee624ed877157c5945915882b80e1d339fc",
            "language": "en",
            "published_at": "2021-10-25T13:19:44.000000Z",
            "source": "reddit.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "b69ee301-9168-4440-9675-3fa28ff81d1c",
            "title": "Hate crimes against Asians rose 76% in 2020 amid pandemic, FBI says : news",
            "description": "23.8m members in the news community. The place for news articles about current events in the United States and the rest of the world. Discuss it all …",
            "keywords": "",
            "snippet": "The place for news articles about current events in the United States and the rest of the world. Discuss it all here.",
            "url": "https://www.reddit.com/r/news/comments/qff1ub/hate_crimes_against_asians_rose_76_in_2020_amid/",
            "image_url": "https://external-preview.redd.it/T34Ih9L95pLDdM_muYiUXdQzPqcfLp2vWt7k2aBdIAo.jpg?auto=webp&s=e91f6649b7e569bf7f2dc950adb92eb4b17c1d7e",
            "language": "en",
            "published_at": "2021-10-25T13:19:44.000000Z",
            "source": "reddit.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "2df83c66-d59f-4aa5-a116-c0ddf29b66f7",
            "title": "Cathie Wood tells Jack Dorsey there are 3 reasons to expect deflation days after the Twitter founder sounded alarm on rising prices",
            "description": "Ark Invest CEO Cathie Wood and Twitter CEO Jack Dorsey REUTERS/Brendan McDermid/File Photo/File Photo (Wood). U.S. House of Representatives Ener...",
            "keywords": "",
            "snippet": "Ark Invest CEO Cathie Wood and Twitter CEO Jack Dorsey REUTERS/Brendan McDermid/File Photo/File Photo (Wood). U.S. House of Representatives Energy and Commerce ...",
            "url": "https://markets.businessinsider.com/news/stocks/cathie-wood-jack-dorsey-tweet-hyperinflation-innovation-cyclical-technology-2021-10",
            "image_url": "https://images2.markets.businessinsider.com/6176a62ac4d6630019be699e?format=jpeg",
            "language": "en",
            "published_at": "2021-10-25T13:19:33.000000Z",
            "source": "businessinsider.com",
            "categories": [
                "business",
                "tech"
            ],
            "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.
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.
Example: arstechnica.com,androidcentral.com
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.
Example: arstechnica.com-1,androidcentral.com-1
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: 2021-10-25T14:16:03 | 2021-10-25T14:16 | 2021-10-25T14 | 2021-10-25 | 2021-10 | 2021
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: 2021-10-25T14:16:03 | 2021-10-25T14:16 | 2021-10-25T14 | 2021-10-25 | 2021-10 | 2021
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2021-10-25
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": 63658634,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "a7e410e6-b951-4894-bc93-ee8abda9a9d0",
            "title": "법원 공무원, 조폭과 불법 성매매 업소 운영하다 적발",
            "description": "법원 공무원이 조직 폭력배 등과 함께 연대해 부산·울산·경남 지역에서 성매매 업소를 운영하다가 적발됐다. 해당 업소...",
            "keywords": "성매매, 경찰, 조직폭력배, 법원공무원",
            "snippet": "글씨키우기 글씨줄이기 프린트 top\n\nfacebook twitter kakao story naver band share\n\n25개 업소 운영하며 8800여 차례 성매매 알선…7억?...",
            "url": "http://www.sisajournal.com/news/articleView.html?idxno=226649",
            "image_url": "http://www.sisajournal.com/news/thumbnail/202110/226649_135320_60_v150.jpg",
            "language": "ko",
            "published_at": "2021-10-25T14:15:59.000000Z",
            "source": "sisajournal.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "298ecf29-7cd3-41c6-b99f-d451f5c79151",
            "title": "한양대 김동립 교수, 한여름 차 안 온도 낮추는 투명소재 개발",
            "description": "김동립 한양대 교수(기계공학부) 연구팀이 자동차 실내온도를 낮추는 투명한 복사냉각 메타물질을 개발했다고 한양대가...",
            "keywords": "한양대, 김동립, 이강원, 투명, 복사냉각, 메타물질, 자동차, 실내온도, 태양열, 태양전지, 재료과학",
            "snippet": "사진=김동립 한양대 교수(기계공학부), 이강원 씨(한양대 기계공학부 석박사통합과정)\n\n김동립 한양대 교수(기계공학부) ...",
            "url": "http://www.kyosu.net/news/articleView.html?idxno=79301",
            "image_url": "http://www.kyosu.net/news/thumbnail/202110/79301_67574_457_v150.jpg",
            "language": "ko",
            "published_at": "2021-10-25T14:15:36.000000Z",
            "source": "kyosu.net",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "417c9a67-c7b2-4548-9fa5-91a98f3a79e9",
            "title": "[헤럴드pic] 악수하는 문재인 대통령과 박병석 국회의장",
            "description": "문재인 대통령이 25일 오전 서울 여의도 국회 본회의장에서 2022년도 예산안 및 기금운용계획안에 대한 정부의 시정연설?...",
            "keywords": "헤럴드경제, 헤경, heraldcorp, 경제지, 신문, 뉴스, 보도, 속보, 정치, 경제, 사회, 국제, 문화, 사설, 컬럼, News, Newspaper, Korea, South Korea, Rep.Korea",
            "snippet": "[헤럴드경제=이상섭 기자] 문재인 대통령이 25일 오전 서울 여의도 국회 본회의장에서 2022년도 예산안 및 기금운용계획안...",
            "url": "http://biz.heraldcorp.com/view.php?ud=20211025000780",
            "image_url": "http://res.heraldm.com/content/image/2021/10/25/20211025000614_p.jpg",
            "language": "ko",
            "published_at": "2021-10-25T14:15:31.000000Z",
            "source": "biz.heraldcorp.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "20947166-abb4-40ae-9421-578c54f632ea",
            "title": "[헤럴드pic] 물마시는 문재인 대통령",
            "description": "문재인 대통령이 25일 국회 본회의장에서 2022년도 예산안 시정연설을 하던 중 물을 마시고 있다.",
            "keywords": "헤럴드경제, 헤경, heraldcorp, 경제지, 신문, 뉴스, 보도, 속보, 정치, 경제, 사회, 국제, 문화, 사설, 컬럼, News, Newspaper, Korea, South Korea, Rep.Korea",
            "snippet": "[헤럴드경제=이상섭 기자] 문재인 대통령이 25일 국회 본회의장에서 2022년도 예산안 시정연설을 하던 중 물을 마시고 있?...",
            "url": "http://biz.heraldcorp.com/view.php?ud=20211025000777",
            "image_url": "http://res.heraldm.com/content/image/2021/10/25/20211025000611_p.jpg",
            "language": "ko",
            "published_at": "2021-10-25T14:15:29.000000Z",
            "source": "biz.heraldcorp.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "19bae88f-46e5-4846-bab4-a172b518a7d0",
            "title": "[헤럴드pic] 인사하는 문재인 대통령",
            "description": "문재인 대통령이 25일 서울 여의도 국회 본회의장에서 열린 2022년도 예산안 시정연설에 앞서 고개숙여 인사하고 있다.",
            "keywords": "헤럴드경제, 헤경, heraldcorp, 경제지, 신문, 뉴스, 보도, 속보, 정치, 경제, 사회, 국제, 문화, 사설, 컬럼, News, Newspaper, Korea, South Korea, Rep.Korea",
            "snippet": "[헤럴드경제=이상섭 기자] 문재인 대통령이 25일 서울 여의도 국회 본회의장에서 열린 2022년도 예산안 시정연설에 앞서 ?...",
            "url": "http://biz.heraldcorp.com/view.php?ud=20211025000779",
            "image_url": "http://res.heraldm.com/content/image/2021/10/25/20211025000613_p.jpg",
            "language": "ko",
            "published_at": "2021-10-25T14:15:29.000000Z",
            "source": "biz.heraldcorp.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "d0361c03-161f-4f74-9288-252f7f1650ac",
            "title": "[헤럴드pic] 본회의장을 나서는 문재인 대통령",
            "description": "문재인 대통령이 25일 오전 국회 본회의장에서 2022년도 예산안 시정연설을 마치고 회의장을 나서는 동안 국민의힘 의원?...",
            "keywords": "헤럴드경제, 헤경, heraldcorp, 경제지, 신문, 뉴스, 보도, 속보, 정치, 경제, 사회, 국제, 문화, 사설, 컬럼, News, Newspaper, Korea, South Korea, Rep.Korea",
            "snippet": "[헤럴드경제=이상섭 기자] 문재인 대통령이 25일 오전 국회 본회의장에서 2022년도 예산안 시정연설을 마치고 회의장을 나...",
            "url": "http://biz.heraldcorp.com/view.php?ud=20211025000778",
            "image_url": "http://res.heraldm.com/content/image/2021/10/25/20211025000612_p.jpg",
            "language": "ko",
            "published_at": "2021-10-25T14:15:29.000000Z",
            "source": "biz.heraldcorp.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "e9747c42-0eac-4826-bf30-4f6c0497393f",
            "title": "[헤럴드pic] 한국자동차전문정비사업조합 연합회 간담회에 참석한 심상정 정의당 대선 후보",
            "description": "심상정 정의당 대선 후보가 25일 오전 서울 금천구 한국자동차전문정비사업조합 연합회 사무실에서 열린 정의로운 녹색?...",
            "keywords": "헤럴드경제, 헤경, heraldcorp, 경제지, 신문, 뉴스, 보도, 속보, 정치, 경제, 사회, 국제, 문화, 사설, 컬럼, News, Newspaper, Korea, South Korea, Rep.Korea",
            "snippet": "[사진=국회사진기자단]\n\n[헤럴드경제=이상섭 기자] 심상정 정의당 대선 후보가 25일 오전 서울 금천구 한국자동차전문정?...",
            "url": "http://biz.heraldcorp.com/view.php?ud=20211025000776",
            "image_url": "http://res.heraldm.com/content/image/2021/10/25/20211025000610_p.jpg",
            "language": "ko",
            "published_at": "2021-10-25T14:15:26.000000Z",
            "source": "biz.heraldcorp.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "ea30ce42-4e19-41fe-9627-a361c1de0245",
            "title": "[헤럴드pic] 발언하는 심상정 정의당 대선 후보",
            "description": "심상정 정의당 대선 후보가 25일 오전 서울 금천구 한국자동차전문정비사업조합 연합회 사무실에서 열린 정의로운 녹색?...",
            "keywords": "헤럴드경제, 헤경, heraldcorp, 경제지, 신문, 뉴스, 보도, 속보, 정치, 경제, 사회, 국제, 문화, 사설, 컬럼, News, Newspaper, Korea, South Korea, Rep.Korea",
            "snippet": "[사진=국회사진기자단]\n\n[헤럴드경제=이상섭 기자] 심상정 정의당 대선 후보가 25일 오전 서울 금천구 한국자동차전문정?...",
            "url": "http://biz.heraldcorp.com/view.php?ud=20211025000775",
            "image_url": "http://res.heraldm.com/content/image/2021/10/25/20211025000609_p.jpg",
            "language": "ko",
            "published_at": "2021-10-25T14:15:26.000000Z",
            "source": "biz.heraldcorp.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "43f6aee5-594e-430b-bc4d-549041db6f7f",
            "title": "Pankaj Advani finishes on a high, claims top position",
            "description": "More sports News: Ace cueist Pankaj Advani stamped his supremacy with an all-win record and finished on a high in the GSC World Snooker Qualifiers, clinching th...",
            "keywords": "World Snooker Championship, pankaj advani, Laxman Rawat, GSC World Snooker Qualifiers, aditya mehta",
            "snippet": "MUMBAI: Ace cueist Pankaj Advani stamped his supremacy with an all-win record and finished on a high in the GSC World Snooker Qualifiers , clinching the top pos...",
            "url": "https://timesofindia.indiatimes.com/sports/more-sports/others/pankaj-advani-finishes-on-a-high-claims-top-position/articleshow/87256462.cms",
            "image_url": "https://static.toiimg.com/thumb/msid-87256481,width-1070,height-580,imgsize-45842,resizemode-75,overlay-toi_sw,pt-32,y_pad-40/photo.jpg",
            "language": "en",
            "published_at": "2021-10-25T14:15:17.000000Z",
            "source": "timesofindia.indiatimes.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "7b2c93d7-00f8-4530-8668-cdea36a8d03b",
            "title": "Collar ni Kuchizuke Manga",
            "description": "Collar ni Kuchizuke manga - read Collar ni Kuchizuke manga chapters for free, but no downloading Collar ni Kuchizuke manga chapters required",
            "keywords": "Collar ni Kuchizuke, Collar ni Kuchizuke manga, read  manga, Collar ni Kuchizuke manga online, Collar ni Kuchizuke manga series, Collar ni Kuchizuke manga chapters",
            "snippet": "",
            "url": "http://fanfox.net/manga/collar_ni_kuchizuke/",
            "image_url": "http://fmcdn.mfcdn.net/store/manga/39673/cover.jpg?token=c1325f1a50a8cfb350285b95d273b680f89e14e4&ttl=1635231600&v=1635143913",
            "language": "en",
            "published_at": "2021-10-25T14:15:15.000000Z",
            "source": "fanfox.net",
            "categories": [
                "entertainment"
            ],
            "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.
Example: arstechnica.com,androidcentral.com
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.
Example: arstechnica.com-1,androidcentral.com-1
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: 2021-10-25T14:16:03 | 2021-10-25T14:16 | 2021-10-25T14 | 2021-10-25 | 2021-10 | 2021
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: 2021-10-25T14:16:03 | 2021-10-25T14:16 | 2021-10-25T14 | 2021-10-25 | 2021-10 | 2021
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2021-10-25
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": "androidcentral.com-1",
                        "domain": "androidcentral.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=2021-10-18
    

Code Examples

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

PHP

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

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

        $json = curl_exec($ch);

        curl_close($ch);

        $apiResult = json_decode($json, true);

        print_r($apiResult);
    

Python

    
        # Python 3
        import http.client, urllib.parse

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

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

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

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

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

Go

    
        package main

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

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

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

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

            baseURL.RawQuery = params.Encode()

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

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

            defer res.Body.Close()

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

            fmt.Println(string(body))
        }
    

JavaScript

    
        var requestOptions = {
            method: 'GET'
        };

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

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

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

C#

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

        var request = new RestRequest(Method.GET);

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

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

Java

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

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

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

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

More

Stock Market News APIs

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