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

Response Objects

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

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

Example Request

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

Example Response

            
                {
    "data": {
        "general": [
            {
                "uuid": "adac8115-2916-4fcc-9695-1a908e8a04b0",
                "title": "A 23-year-old man stabbed 5 people in Austria killing 1 in what police describe as a random attack",
                "description": "A 23-year-old man has stabbed five passersby in southern Austria in what police said was a random attack that left a 14-year-old dead and four others injured..",
                "keywords": "Austria, Law enforcement, Crime, General news, AP Top News, Rainer Dionisio, Christian Stocker, Bashar Assad, Assault, Andreas Babler, Gerhard Karner, World news, Erwin Angerer, Automotive accidents, Asylum, Elections, Peter Kaiser, Austria government",
                "snippet": "VIENNA (AP) — A 23-year-old man stabbed five passersby in southern Austria on Saturday in what police said was a random attack that left a 14-year-old dead an...",
                "url": "https://apnews.com/article/austria-stabbings-4913f6921c6f27e6d7fd8590da85cc9f",
                "image_url": "https://dims.apnews.com/dims4/default/dcac1a4/2147483647/strip/true/crop/700x394+0+28/resize/1440x810!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F90%2F29%2F4e3c1cc7446089a9101a7bdff4c8%2Fdefaultshareimage-copy.png",
                "language": "en",
                "published_at": "2025-02-15T20:23:02.000000Z",
                "source": "apnews.com",
                "categories": [
                    "general"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "081e41e3-5c91-4252-b9a9-74121791bc46",
                        "title": "Mother and 2-year-old daughter die days after Munich ramming attack, police say",
                        "description": "A 37-year-old woman and her 2-year-old daughter died from their injuries two days after a car intentionally plowed into a crowd in Munich, German police said.",
                        "keywords": "",
                        "snippet": "A 37-year-old woman and her 2-year-old daughter died from their injuries two days after a car intentionally plowed into a crowd in Munich, German police said.\n\n...",
                        "url": "https://www.nbcnews.com/news/world/mother-2-year-old-daughter-die-days-munich-ramming-attack-police-say-rcna192351",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2025-02/250215-munich-1138-8fbb70.jpg",
                        "language": "en",
                        "published_at": "2025-02-15T18:59:12.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "538d907d-83d3-43ea-8b43-7d6649173986",
                        "title": "Mom and 2-Year-Old Daughter Die of Injuries Sustained During Munich Attack",
                        "description": "A 2-year-old girl and her mother have died two days after being injured as a man rammed a car into a labor union demonstration in Munich.",
                        "keywords": "",
                        "snippet": "BERLIN (AP) – A 2-year-old girl and her mother have died two days after they were injured in the car-ramming attack on a labor union demonstration in Munich, ...",
                        "url": "https://www.breitbart.com/europe/2025/02/15/mother-and-two-year-old-daughter-die-of-injuries-sustained-during-munich-attack/",
                        "image_url": "https://media.breitbart.com/media/2025/02/GettyImages-2199031429-1-640x335.jpg",
                        "language": "en",
                        "published_at": "2025-02-15T18:01:53.000000Z",
                        "source": "breitbart.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "06cfc13f-770c-4e84-b0dd-65f038c59189",
                        "title": "A 23-year-old man stabbed 5 people in Austria, killing 1 in what police described as a random attack",
                        "description": "VIENNA — A 23-year-old man stabbed five passersby in southern Austria on Saturday in what police said was a random attack that left a 14-year-old dead and four others injured.",
                        "keywords": "",
                        "snippet": "Create your free profile or log in to save this article\n\nCreate your free profile or log in to save this article\n\nVIENNA — A 23-year-old man stabbed five pass...",
                        "url": "https://www.nbcnews.com/news/world/23-year-old-man-stabbed-5-people-austria-killing-1-rcna192358",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2025-02/250215-Villach-ch-1312-670225.jpg",
                        "language": "en",
                        "published_at": "2025-02-15T20:23:15.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    }
                ]
            },
            {
                "uuid": "8bfc8cb1-ac87-48fe-8b22-a4ca8ed06951",
                "title": "Fans in Montreal loudly boo US anthem prior to Americans' 4 Nations Face-Off game vs. Canada",
                "description": "Fans in Montreal loudly booed the U.S. national anthem prior to the 4 Nations Face-Off game between the Americans and host Canada",
                "keywords": "Politics, Hockey, U.S. news, General news, World news, Sports, Article, 118868538",
                "snippet": "Fans in Montreal loudly booed the U.S. national anthem prior to the 4 Nations Face-Off game between the Americans and host Canada\n\nCanada fans cheer their team ...",
                "url": "https://abcnews.go.com/US/wireStory/fans-montreal-loudly-boo-us-anthem-prior-americans-118868538",
                "image_url": "https://i.abcnewsfe.com/a/8d592cb6-3f51-48c5-a207-65b5f514f565/wirestory_9265bda34c95a1ed0ca2e1f90e7da1b1_16x9.jpg?w=1600",
                "language": "en",
                "published_at": "2025-02-16T03:50:12.000000Z",
                "source": "abcnews.go.com",
                "categories": [
                    "general",
                    "politics"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "87003de9-ab32-46c0-88ae-c4ed50755d8b",
                        "title": "Canada fans, with Trudeau in attendance, again boo 'Star-Spangled Banner' before game vs. USA despite pushback",
                        "description": "With Justin Trudeau in attendance, Team Canada fans booed the \"Star-Spangled Banner\" ahead of a game against Team USA at the 4 Nations Face-Off.",
                        "keywords": "",
                        "snippet": "The United States and Canada rekindled their hockey rivalry Saturday in Montreal, and the tension may have been greater than ever.\n\nHowever, the tension was rai...",
                        "url": "https://www.foxnews.com/sports/canada-fans-trudeau-attendance-again-boo-star-spangled-banner-before-game-vs-usa-despite-pushback",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2025/02/4-nations-anthem.jpg",
                        "language": "en",
                        "published_at": "2025-02-16T01:43:57.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "e26376f7-8b05-4189-9904-9bc70aabfa87",
                        "title": "US, Canadian hockey stars get into numerous fights in opening seconds of 4 Nations rivalry after anthem boos",
                        "description": "Three fights broke out during the first nine seconds of Saturday's 4 Nations Face-Off game between longtime hockey rivals, the U.S. and Canada, in Montreal.",
                        "keywords": "",
                        "snippet": "Three fights broke out in the first nine seconds of a 4 Nations Face-Off game between the U.S. and Canada.\n\nAt the opening puck drop, Matthew Tkachuk of the U.S...",
                        "url": "https://www.foxnews.com/sports/usa-canada-hockey-stars-get-numerous-fights-opening-seconds-4-nations-rivalry-after-anthem-boos",
                        "image_url": "https://static.foxnews.com/foxnews.com/content/uploads/2025/02/usa-canada-fight.jpg",
                        "language": "en",
                        "published_at": "2025-02-16T01:51:35.000000Z",
                        "source": "foxnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "e66ff498-4d3e-4217-8694-e086fe5618b1",
                        "title": "U.S. outlasts Canada, earns berth in 4 Nations title game",
                        "description": "Dylan Larkin scored in the second period, and Team USA made it hold up the rest of the way, as the Americans outlasted rival Canada 3-1 in the 4 Nations Face-Off on Saturday night, securing a berth in the tournament final on Thursday night in Boston.",
                        "keywords": "",
                        "snippet": "Dylan Larkin takes advantage of a 2-on-1 situation for Team USA and buries the puck to give his team the lead. (0:48)\n\nOpen Extended Reactions\n\nMONTREAL -- Dyla...",
                        "url": "https://www.espn.com/nhl/story/_/id/43867388/us-outlasts-canada-earns-berth-4-nations-title-game",
                        "image_url": "https://a.espncdn.com/combiner/i?img=%2Fphoto%2F2025%2F0216%2Fr1452564_1296x729_16%2D9.jpg",
                        "language": "en",
                        "published_at": "2025-02-16T04:51:30.000000Z",
                        "source": "espn.com",
                        "categories": [
                            "sports",
                            "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: 2025-02-16T05:54:00 | 2025-02-16T05:54 | 2025-02-16T05 | 2025-02-16 | 2025-02 | 2025
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: 2025-02-16T05:54:00 | 2025-02-16T05:54 | 2025-02-16T05 | 2025-02-16 | 2025-02 | 2025
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2025-02-16
sort false Sort by published_on or relevance_score (only available when used in conjunction with search). Default is published_at unless search is used and sorting by published_at is not included, in which case relevance_score is used.
limit false Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan.
page false Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2

Response Objects

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

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

Example Request

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

Example Response

            
                {
    "meta": {
        "found": 1235621,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "85533f90-da66-495a-ba43-4401fbbaf033",
            "title": "Flash floods hit Virginia and Kentucky in Eastern U.S. storms",
            "description": "Weather officials warned residents in several states to seek higher ground as a powerful storm system battered the Eastern United States",
            "keywords": "",
            "snippet": "A powerful storm battered parts of the Eastern United States on Saturday, prompting flash flood warnings and evacuations across West Virginia, Kentucky, Tenness...",
            "url": "https://www.washingtonpost.com/weather/2025/02/16/virginia-flash-floods-kentucky-tennessee-arkansas/",
            "image_url": "https://www.washingtonpost.com/wp-apps/imrs.php?src=https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/FWYCHTIEXVPVNY2OM5BRFPXERQ.JPG&w=1440",
            "language": "en",
            "published_at": "2025-02-16T05:27:33.000000Z",
            "source": "washingtonpost.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "f2f256c9-eac6-41a4-a234-879060b38af9",
            "title": "U.S.-Canada hockey game starts with 3 fights in 9 seconds",
            "description": "The 2025 4 Nations Face-Off in Montreal on Saturday pitted the United States against Canada in an elite hockey matchup that kicked off with three fights among r...",
            "keywords": "",
            "snippet": "The 2025 4 Nations Face-Off in Montreal on Saturday pitted the United States against Canada in an elite hockey matchup that kicked off with three fights among r...",
            "url": "https://www.nbcnews.com/sports/hockey/us-canada-hockey-game-starts-3-fights-9-seconds-rcna192373",
            "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2025-02/24215-usa-canada-4-nations-fight-rc-931p-538a16.jpg",
            "language": "en",
            "published_at": "2025-02-16T05:17:45.000000Z",
            "source": "nbcnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "e52a9cf8-904a-4d81-a7c5-10a93a5e138c",
            "title": "Stampede kills 15 people at New Delhi train station, Indian official says",
            "description": "A top official says at least 15 people have been killed in a stampede at a railway station in India’s capital of New Delhi.",
            "keywords": "New Delhi, Rail accidents, Narendra Modi, Ashwini Vaishnaw, Fairs and festivals, General news, Religion, World news",
            "snippet": "NEW DELHI (AP) — At least 15 people were killed in a stampede at a railway station in India’s capital of New Delhi, an official said Sunday.\n\nDelhi’s care...",
            "url": "https://apnews.com/article/india-stampede-new-delhi-train-station-fe02ef8a72909f9afcfb4075c0467352",
            "image_url": "https://dims.apnews.com/dims4/default/5459461/2147483647/strip/true/crop/3000x1688+0+160/resize/1440x810!/quality/90/?url=https%3A%2F%2Fassets.apnews.com%2F90%2F2d%2F51a3679e622fbb09494963222372%2F4830400f2fba4cc2b2c1f288aecae2bf",
            "language": "en",
            "published_at": "2025-02-16T04:53:02.000000Z",
            "source": "apnews.com",
            "categories": [
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "6affe23f-eaa8-4643-bf75-379f889cba9c",
            "title": "Michigan State's Tom Izzo passes Knight for most Big Ten wins",
            "description": "Michigan State coach Tom Izzo passed Bobby Knight for the most conference wins in Big Ten history with 354.",
            "keywords": "",
            "snippet": "Open Extended Reactions\n\nCHAMPAIGN, Ill. -- No. 11 Michigan State rallied to beat Illinois 79-65 on Saturday night, giving longtime Spartans head coach Tom Izzo...",
            "url": "https://www.espn.com/mens-college-basketball/story/_/id/43867502/michigan-state-tom-izzo-passes-knight-most-big-ten-wins",
            "image_url": "https://a.espncdn.com/combiner/i?img=%2Fphoto%2F2025%2F0216%2Fr1452551_1024x576_16%2D9.jpg",
            "language": "en",
            "published_at": "2025-02-16T04:51:30.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "e66ff498-4d3e-4217-8694-e086fe5618b1",
            "title": "U.S. outlasts Canada, earns berth in 4 Nations title game",
            "description": "Dylan Larkin scored in the second period, and Team USA made it hold up the rest of the way, as the Americans outlasted rival Canada 3-1 in the 4 Nations Face-Of...",
            "keywords": "",
            "snippet": "Dylan Larkin takes advantage of a 2-on-1 situation for Team USA and buries the puck to give his team the lead. (0:48)\n\nOpen Extended Reactions\n\nMONTREAL -- Dyla...",
            "url": "https://www.espn.com/nhl/story/_/id/43867388/us-outlasts-canada-earns-berth-4-nations-title-game",
            "image_url": "https://a.espncdn.com/combiner/i?img=%2Fphoto%2F2025%2F0216%2Fr1452564_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2025-02-16T04:51:30.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "3dcf0f51-e2d6-4dd8-bc05-1e1cea382f69",
            "title": "Grades, top players from the USA's thrilling win over Canada",
            "description": "After three fights to start the game, a 3-1 win for the Americans clinched their trip to the final. And how does Canada get back on track?",
            "keywords": "",
            "snippet": "Open Extended Reactions\n\nA game that began with three fights in nine seconds resulted in some of the best hockey on display in recent memory. The result: a 3-1 ...",
            "url": "https://www.espn.com/nhl/story/_/id/43867327/nhl-4-nations-face-2025-team-usa-canada-grades-top-players-takeaways",
            "image_url": "https://a2.espncdn.com/combiner/i?img=%2Fphoto%2F2025%2F0216%2Fr1452575_1296x729_16%2D9.jpg",
            "language": "en",
            "published_at": "2025-02-16T04:51:07.000000Z",
            "source": "espn.com",
            "categories": [
                "sports",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "1ab6b7d0-7049-46f0-91ba-90a6968c285a",
            "title": "Thousands of probationary federal health agency workers fired by letter this weekend. Here's what it said.",
            "description": "The move comes amid a government-wide effort to cut probationary workers by the Department of Government Efficiency task force led by billionaire Elon Musk.",
            "keywords": "United States Department of Health and Human Services, Donald Trump, RFK Jr.",
            "snippet": "Probationary workers across multiple federal health agencies in the Department of Health and Human Services received virtually identical letters Saturday evenin...",
            "url": "https://www.cbsnews.com/news/thousands-of-probationary-federal-health-agency-workers-fired-by-letter-this-weekend/",
            "image_url": "https://assets2.cbsnewsstatic.com/hub/i/r/2025/02/16/41f344c7-598d-4548-aacc-5025b99804a4/thumbnail/1200x630/534b93d8a4d9bd8a04a116695c9df5bd/gettyimages-2196638486.jpg?v=f303dc12868a012283443d8b9123e5fe",
            "language": "en",
            "published_at": "2025-02-16T04:48:36.000000Z",
            "source": "cbsnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "0d4dd60c-1c5d-4800-8b79-4654e0713099",
            "title": "Ukrainian mayor threatens Zelensky with military ‘purge’",
            "description": "The mayor of the Ukrainian city of Borispol, Vladimir Borisenko, has issued a warning to Kiev, condemning the persecution of opposition",
            "keywords": "",
            "snippet": "The government in Kiev is “sick” and would not like the remedy, claims the head of Borispol\n\nThe mayor of the Ukrainian city of Borispol, Vladimir Borisenko...",
            "url": "https://www.rt.com/russia/612801-borispol-zelensky-military-purge/",
            "image_url": "https://mf.b37mrtl.ru/files/2025.02/article/67b16d9b85f540782d77c5ff.png",
            "language": "en",
            "published_at": "2025-02-16T04:47:11.000000Z",
            "source": "rt.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "faabe5a9-719d-4ead-b0a0-f9e2df71398f",
            "title": "Report: L.A. Fire Dept. Could Have Pre-Deployed 10 Engines to Palisades, but Did Not",
            "description": "The LAFD could have pre-deployed ten engines to the Pacific Palisades ahead of the deadly Palisades Fire, but did not, the LA Times says.",
            "keywords": "",
            "snippet": "The Los Angeles Fire Department (LAFD) could have pre-deployed ten engines to the Pacific Palisades ahead of the deadly Palisades Fire on January 7, but chose n...",
            "url": "https://www.breitbart.com/politics/2025/02/15/report-l-a-fire-dept-could-have-pre-deployed-10-engines-to-palisades-but-did-not/",
            "image_url": "https://media.breitbart.com/media/2025/02/LAFD-Associated-Press-640x335.jpg",
            "language": "en",
            "published_at": "2025-02-16T04:33:34.000000Z",
            "source": "breitbart.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "78b966a8-7ae4-4275-b276-48e67a3fae33",
            "title": "Vince Gilligan Advises Amplifying “Good Guys” And Warns Against Making Villains “Too Sexy” During WGA Honorary Award Speech",
            "description": "TV juggernaut Vince Gilligan received the WGA's honorary Paddy Chayefsky Laurel Award For Television Writing Achievement.",
            "keywords": "",
            "snippet": "For Breaking Bad creator Vince Gilligan, the WGA honorary Paddy Chayefsky Laurel For Television Writing Achievement served as an opportunity to call for action ...",
            "url": "https://deadline.com/2025/02/vince-gilligan-wga-award-speech-1236291243/",
            "image_url": "https://deadline.com/wp-content/uploads/2025/02/vince-Gilligan2.jpg?w=1024",
            "language": "en",
            "published_at": "2025-02-16T04:22:35.000000Z",
            "source": "deadline.com",
            "categories": [
                "entertainment"
            ],
            "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: 2025-02-16T05:54:00 | 2025-02-16T05:54 | 2025-02-16T05 | 2025-02-16 | 2025-02 | 2025
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: 2025-02-16T05:54:00 | 2025-02-16T05:54 | 2025-02-16T05 | 2025-02-16 | 2025-02 | 2025
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2025-02-16
sort false Sort by published_on or relevance_score (only available when used in conjunction with search). Default is published_at unless search is used and sorting by published_at is not included, in which case relevance_score is used.
limit false Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan.
page false Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2

Response Objects

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

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

Example Request

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

Example Response

            
                {
    "meta": {
        "found": 50984775,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "7e67128c-c78c-4b80-a80e-9909e92069c5",
            "title": "Caronno Pertusella, Bocedi alle medie con Anc per parlare di legalità",
            "description": "CARONNO PERTUSELLA - I ragazzi della scuola media Alcide De Gasperi sono stati protagonisti di un incontro Un incontro sulla legalità con l'associazione",
            "keywords": "",
            "snippet": "ilSaronnese\n\nCARONNO PERTUSELLA – I ragazzi della scuola media Alcide De Gasperi sono stati protagonisti di un incontro Un incontro sulla legalità con l’as...",
            "url": "https://ilsaronno.it/2025/02/16/caronno-pertusella-paolo-bocedi-alle-medie-de-gasperi-con-anc-per-parlare-di-legalita/",
            "image_url": "https://ilsaronno.it/images/images/2025/02/import-622634.jpg",
            "language": "it",
            "published_at": "2025-02-16T05:53:37.000000Z",
            "source": "ilsaronno.it",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "780e3e79-e486-42fb-8178-95cddf723ae6",
            "title": "Saronno Point organizza “Colora il Carnevale” per i più piccoli",
            "description": "SARONNO - Un pomeriggio all'insegna della creatività e del divertimento attende i bambini di Saronno sabato 22 febbraio. Dalle 15 alle 17.30, allo stadio",
            "keywords": "",
            "snippet": "Città\n\nSARONNO – Un pomeriggio all’insegna della creatività e del divertimento attende i bambini di Saronno sabato 22 febbraio. Dalle 15 alle 17.30, allo ...",
            "url": "https://ilsaronno.it/2025/02/16/saronno-point-organizza-colora-il-carnevale-per-i-piu-piccoli/",
            "image_url": "https://ilsaronno.it/images/images/2025/02/import-622468.jpg",
            "language": "it",
            "published_at": "2025-02-16T05:52:27.000000Z",
            "source": "ilsaronno.it",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "30899dcb-e8a0-4590-9910-990a984ce16d",
            "title": "科?",
            "description": "",
            "keywords": "",
            "snippet": "",
            "url": "https://blog.sciencenet.cn/home.php?mod=space&uid=71626&do=blog&id=1473300",
            "image_url": "",
            "language": "zh",
            "published_at": "2025-02-16T05:45:13.000000Z",
            "source": "blog.sciencenet.cn",
            "categories": [
                "science"
            ],
            "relevance_score": null
        },
        {
            "uuid": "0578ff09-20e4-4b96-a438-07f681bb7ba0",
            "title": "Around the Empire: Yankees news - 2/16/25",
            "description": "Cashman speaks on spending gap between Yanks and top teams; Beeter shifting to relief full-time; J.C. Escarra’s case to revive a baseball dream; checking in o...",
            "keywords": "",
            "snippet": "NY Daily News | Gary Phillips ($): As the opening days of spring training camp unfurl in front of us, the media is getting their first chance to get remarks fro...",
            "url": "https://www.pinstripealley.com/2025/2/16/24366563/yankees-mlb-news-brian-cashman-payroll-clayton-beeter-relief-jc-escarra-uber-college-baseball",
            "image_url": "https://cdn.vox-cdn.com/thumbor/QQf8Ag_gU1CB4uKL-N86-cx5HQE=/0x374:5299x3148/fit-in/1200x630/cdn.vox-cdn.com/uploads/chorus_asset/file/25875249/2198935706.jpg",
            "language": "en",
            "published_at": "2025-02-16T05:43:49.000000Z",
            "source": "pinstripealley.com",
            "categories": [
                "sports"
            ],
            "relevance_score": null
        },
        {
            "uuid": "8f0da90a-a20a-4a5b-90e9-03a888049570",
            "title": "Not Just Another Policy Book: A Former CEA's Ground-Level View Of India's Economic Future",
            "description": "",
            "keywords": "Chief Economic Adviser Krishnamurthy Subramanian",
            "snippet": "India@100: Envisioning Tomorrow’s Economic Powerhouse. Krishnamurthy Subramanian. Rupa. Pages 520. Rs 697.\n\nWhat will India’s economy look like in 2047? Wil...",
            "url": "https://swarajyamag.com/books/not-just-another-policy-book-a-former-ceas-ground-level-view-of-indias-economic-future",
            "image_url": "https://swarajya.gumlet.io/swarajya/2025-02-16/g2ekx6sk/KS-Book-Cover.jpg?w=1200&h=600&format=jpg",
            "language": "en",
            "published_at": "2025-02-16T05:43:14.000000Z",
            "source": "swarajyamag.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "32cd6541-1ceb-4c78-8955-464affe3e8e2",
            "title": "Trump’s Deference To Modi On Bangladesh Stirs Up Dhaka And Puts Yunus On The Backfoot",
            "description": "",
            "keywords": "Bangladesh, Bangladesh Nationalist Party (BNP), US President Donald J. Trump, Muhammad Yunus, Awami League Party, Prime Minister Modi's visit to US, Bangladesh Prime Minister Sheikh Hasina, Bangladesh Jamaat-e-Islami, Islamists in Bangladesh, Bangladesh interim government",
            "snippet": "United States (US) President Donald Trump’s comments on Bangladesh have set off an intense churn and speculation in political circles in Dhaka.\n\nSpeaking to r...",
            "url": "https://swarajyamag.com/world/trumps-deference-to-modi-on-bangladesh-stirs-up-dhaka-and-puts-yunus-on-the-backfoot",
            "image_url": "https://swarajya.gumlet.io/swarajya/2025-02-15/hr1juqqf/Modi-meets-Trump-in-Washington.jpg?w=1200&h=600&format=jpg",
            "language": "en",
            "published_at": "2025-02-16T05:43:14.000000Z",
            "source": "swarajyamag.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "cd59f2c8-7e3b-4d9a-b0a1-217c741cf49a",
            "title": "West Bengal’s Bagdogra Airport To Get 10 Times Bigger New Terminal, Rs 1,560-Crore Project Set For March 2027 Completion",
            "description": "",
            "keywords": "Bagdogra Airport",
            "snippet": "The new terminal being constructed at Bagdogra airport in West Bengal's Siliguri is reportedly expected to be completed by March 2027.\n\nThe first phase of the n...",
            "url": "https://swarajyamag.com/news-brief/west-bengals-bagdogra-airport-to-get-10-times-bigger-new-terminal-rs-1560-crore-project-set-for-march-2027-completion",
            "image_url": "https://swarajya.gumlet.io/swarajya/2022-06/9116c118-6946-4bea-848f-1d77369b8095/surat_airport.jpg?w=1200&h=600&format=jpg",
            "language": "en",
            "published_at": "2025-02-16T05:43:14.000000Z",
            "source": "swarajyamag.com",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "34213d28-66f8-49d4-b72b-bc7828c35534",
            "title": "Limbiate comune attrattivo, aumentano i residenti",
            "description": "LIMBIATE - La città si conferma un centro dinamico e attrattivo, registrando una crescita demografica significativa nel 2024. Con 35.425 residenti,",
            "keywords": "",
            "snippet": "Limbiate\n\nLIMBIATE – La città si conferma un centro dinamico e attrattivo, registrando una crescita demografica significativa nel 2024. Con 35.425 residenti,...",
            "url": "https://ilsaronno.it/2025/02/16/limbiate-comune-attrattivo-aumentano-i-residenti/",
            "image_url": "https://ilsaronno.it/images/images/2022/02/municipio-limbiate-colori-ucraina.jpg",
            "language": "it",
            "published_at": "2025-02-16T05:43:09.000000Z",
            "source": "ilsaronno.it",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "12ca4dce-ec6e-475e-88e2-b387f1159fd8",
            "title": "闇だらけの医療ガイドラインを読む – 3",
            "description": "",
            "keywords": "",
            "snippet": "話を「動脈硬化性疾患予防ガイドライン2007年」に戻します。2007年のガイドラインで設定された「エビデンスレベル」?...",
            "url": "https://resort.boy.jp/wordpress/cancer-survivor/decisions-made-by-consensus/",
            "image_url": "https://resort.boy.jp/wordpress/files/images7/P260012313-150x150.webp",
            "language": "ja",
            "published_at": "2025-02-16T05:42:59.000000Z",
            "source": "resort.boy.jp",
            "categories": [
                "travel"
            ],
            "relevance_score": null
        },
        {
            "uuid": "8e00f7a4-6c10-4c6b-9797-e338e5e7a6b5",
            "title": "Президент Чехии Павел счел разработку плана Маршалла для Украины отличной идеей",
            "description": "Разработка плана Маршалла для Украины была бы отличной идеей, заявил президент Чехии П?...",
            "keywords": "в мире, украина, чехия, москва, петр павел, мюнхенская конференция по безопасности",
            "snippet": "https://ria.ru/20250216/plan-1999644321.html\n\n\"Отличная идея\". Президент Чехии предложил неожиданный план по...",
            "url": "https://ria.ru/20250216/plan-1999644321.html",
            "image_url": "https://cdnn21.img.ria.ru/images/sharing/article/1999644321.jpg?18440952341739684525",
            "language": "ru",
            "published_at": "2025-02-16T05:42:04.000000Z",
            "source": "rsport.ria.ru",
            "categories": [
                "sports"
            ],
            "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: 2025-02-16T05:54:00 | 2025-02-16T05:54 | 2025-02-16T05 | 2025-02-16 | 2025-02 | 2025
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: 2025-02-16T05:54:00 | 2025-02-16T05:54 | 2025-02-16T05 | 2025-02-16 | 2025-02 | 2025
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2025-02-16
limit false Specify the number of articles you want to return in the request. The maximum limit is based on your plan. The default limit is the maximum specified for your plan.
page false Use this to paginate through the result set. Default is 1. Note that the max result set can't exceed 20,000. For example if your limit is 50, the max page you can have is 400 (50 * 400 = 20,000).
Example: page=2

Response Objects

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

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

Example Request

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

Example Response

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

News by UUID Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

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

Response Objects

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

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

Example Request

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

Example Response

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

Sources Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

HTTP GET Parameters

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

Response Objects

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

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

Example Request

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

Example Response

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

Errors

Errors

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

Errors

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

Example Error Response

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

Examples

API Examples

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

Example Request 1

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

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

Example Request 2

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

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

Example Request 3

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

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

Example Request 4

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

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

Example Request 5

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

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

Example Request 6

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

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

Code Examples

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

PHP

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

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

        $json = curl_exec($ch);

        curl_close($ch);

        $apiResult = json_decode($json, true);

        print_r($apiResult);
    

Python

    
        # Python 3
        import http.client, urllib.parse

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

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

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

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

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

Go

    
        package main

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

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

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

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

            baseURL.RawQuery = params.Encode()

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

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

            defer res.Body.Close()

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

            fmt.Println(string(body))
        }
    

JavaScript

    
        var requestOptions = {
            method: 'GET'
        };

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

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

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

C#

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

        var request = new RestRequest(Method.GET);

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

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

Java

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

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

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

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