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 extract article data from live links, check out articlextractor API .

To perform analysis on any text from our API, check out NLP-API.com for powerful Natural Language Processing tools.

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: 2023-11-30
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": "3ac715f3-4d52-445f-a657-fd680d5fffdb",
                "title": "Why it matters what happens at COP28, the UN climate conference being held in Dubai",
                "description": "The most important discussions around climate change are set to begin in the United Arab Emirates",
                "keywords": "Article, 105238978",
                "snippet": "The conference will have a drastic effect on climate policies going forward.\n\nThe most important discussions around climate change are set to begin in the Unite...",
                "url": "https://abcnews.go.com/International/matters-cop28-climate-conference-held-dubai/story?id=105238978",
                "image_url": "https://i.abcnewsfe.com/a/cc119dde-9eb4-4ca5-9321-cb09d1d250c1/cop-1-gty-er-231129_1701286207668_hpMain_16x9.jpg?w=992",
                "language": "en",
                "published_at": "2023-11-30T10:37:04.000000Z",
                "source": "abcnews.go.com",
                "categories": [
                    "general"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "24e96258-2aec-484d-9ea8-a233b7beb18a",
                        "title": "The U.S. Is in a Spectacularly Bad Position to Talk About Climate Change Right Now",
                        "description": "As the U.N. climate conference opens, American oil and gas production has never been higher.",
                        "keywords": "",
                        "snippet": "The U.S. has no plan to proactively phase out so-called “unabated” fossil fuel production, despite the pledge it’s made to that effect. There are also no ...",
                        "url": "https://newrepublic.com/article/177183/us-spectacularly-bad-position-talk-climate-change-right-now",
                        "image_url": "https://images.newrepublic.com/447cd5e145fd60e95f491c07d4d63c5a36613570.jpeg?w=1200&h=630&crop=faces&fit=crop&fm=jpg",
                        "language": "en",
                        "published_at": "2023-11-30T11:00:00.000000Z",
                        "source": "newrepublic.com",
                        "categories": [
                            "general",
                            "politics",
                            "entertainment"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "57d40897-3de1-486b-8ce5-fd97d5ae0057",
                        "title": "Countries at COP28 approve climate disaster fund deal details in early breakthrough",
                        "description": "Countries at the U.N. COP28 summit on Thursday agreed deal details for a disaster fund to help nations reeling from damages caused by the climate crisis.",
                        "keywords": "Breaking News: Politics, Breaking news, United Arab Emirates, United Nations, Climate, business news",
                        "snippet": "A man wearing a thawb walks past flags of nations participating in the UNFCCC COP28 Climate Conference the day before its official opening on November 29, 2023 ...",
                        "url": "https://www.cnbc.com/2023/11/30/cop28-delivers-breakthrough-by-way-of-climate-disaster-fund-details.html",
                        "image_url": "https://image.cnbcfm.com/api/v1/image/107341231-1701347766420-gettyimages-1820060220-sg010469_yhnqzvre.jpeg?v=1701347803&w=1920&h=1080",
                        "language": "en",
                        "published_at": "2023-11-30T13:01:09.000000Z",
                        "source": "cnbc.com",
                        "categories": [
                            "general",
                            "business"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "e3ea8c8e-3fcf-42e0-9119-9f592997d4d2",
                        "title": "COP28 begins: 4 issues that will determine if the UN climate summit is a success, from methane to money",
                        "description": "A veteran of UN climate talks lays out the top themes and their sticking points, including concerns about the host country’s oil interests.",
                        "keywords": "",
                        "snippet": "The United Nations climate conference is underway in Dubai, and representatives from around the world will be confronting an extraordinary array of challenges o...",
                        "url": "https://theconversation.com/cop28-begins-4-issues-that-will-determine-if-the-un-climate-summit-is-a-success-from-methane-to-money-218869",
                        "image_url": "https://images.theconversation.com/files/562572/original/file-20231130-19-3srly6.jpg?ixlib=rb-1.1.0&rect=610%2C0%2C3938%2C1969&q=45&auto=format&w=1356&h=668&fit=crop",
                        "language": "en",
                        "published_at": "2023-11-30T13:22:09.000000Z",
                        "source": "theconversation.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "faa18246-b2c5-465b-8cc6-3fb6f55d94e7",
                        "title": "William Shatner Pleads with King Charles on Climate Change: ‘We’re All Going to Die’",
                        "description": "William Shatner, forever immortalized as Captain Kirk, pleaded with King Charles to fight climate change for fear of \"human extinction.\"",
                        "keywords": "",
                        "snippet": "Actor William Shatner, forever immortalized as Captain Kirk on Star Trek, pleaded with King Charles to fight climate change for fear of “human extinction.”\n...",
                        "url": "https://www.breitbart.com/entertainment/2023/11/30/william-shatner-pleads-with-king-charles-on-climate-change-were-all-going-to-die/",
                        "image_url": "https://media.breitbart.com/media/2018/12/Shatnercrop2.jpg",
                        "language": "en",
                        "published_at": "2023-11-30T09:10:46.000000Z",
                        "source": "breitbart.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "ff2ec77a-0e8e-40a9-837f-c819290d0178",
                        "title": "COP28 U.N. climate talks set to engage with oil and gas companies like never before",
                        "description": "The president of the U.N. climate conference known as COP28, which opened in Dubai on Thursday, hailed an \"historic\" agreement with oil and gas companies.",
                        "keywords": "",
                        "snippet": "COP28 U.N. climate talks set to engage with oil and gas companies like never before\n\nThe president of the U.N. climate conference known as COP28, which opened i...",
                        "url": "https://www.nbcnews.com/video/cop28-u-n-climate-talks-set-to-engage-with-oil-and-gas-companies-199061573770",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/mpx/2704722219/2023_11/cop28_4957-0e8v54.jpg",
                        "language": "en",
                        "published_at": "2023-11-30T13:05:30.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    }
                ]
            },
            {
                "uuid": "1f8d8f09-0bb1-4b26-bbcb-f63b14800c2c",
                "title": "Israel and Hamas extend temporary cease-fire another day in 11th-hour agreement",
                "description": "Israel and Hamas agreed to extend the temporary cease-fire between them another day in an eleventh-hour agreement minutes before the truce was set to expire, Qatari mediators said.",
                "keywords": "News, hamas, hostages, israel, Israel war 2023",
                "snippet": "Israel and Hamas agreed to extend the temporary cease-fire between them another day in an eleventh-hour agreement minutes before the truce was set to expire, Qa...",
                "url": "https://nypost.com/2023/11/30/news/israel-hamas-cease-fire-extended-in-11th-hour-agreement/",
                "image_url": "https://nypost.com/wp-content/uploads/sites/2/2023/11/73032486.jpg?quality=75&strip=all&w=1024",
                "language": "en",
                "published_at": "2023-11-30T07:34:59.000000Z",
                "source": "nypost.com",
                "categories": [
                    "general"
                ],
                "locale": "us",
                "similar": [
                    {
                        "uuid": "53fddaa6-b875-45fe-8da1-35e28ad166c1",
                        "title": "Hamas-Israel truce extended for another day",
                        "description": "Israel and Hamas agreed to extend a temporary truce by another day minutes before it was set to expire. NBC News' Meagan Fitzgerald reports for Early Today.",
                        "keywords": "",
                        "snippet": "Israel and Hamas agreed to extend a temporary truce by another day minutes before it was set to expire. NBC News' Meagan Fitzgerald reports for Early Today.Nov....",
                        "url": "https://www.nbcnews.com/video/hamas-israel-truce-extended-for-another-day-199052357539",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/mpx/2704722219/2023_11/1701332931148_et_lon_truce_231130_1920x1080-o9zz8z.jpg",
                        "language": "en",
                        "published_at": "2023-11-30T08:29:09.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "c5dfbbf1-d4d6-4d19-93f6-e74081765c1c",
                        "title": "Israel and Hamas agree to prolong ceasefire",
                        "description": "Israel and Hamas have extended the truce in Gaza to a seventh day after the belligerents exchanged dozens more captives on Wednesday",
                        "keywords": "",
                        "snippet": "Qatari mediators said the two sides had agreed a one-day extension minutes before the previous truce was set to expire\n\nIsrael and Hamas have agreed to extend t...",
                        "url": "https://www.rt.com/news/588245-israel-hamas-extend-truce-seventh-day/",
                        "image_url": "https://mf.b37mrtl.ru/files/2023.11/article/6568429f85f5401e207c82de.jpg",
                        "language": "en",
                        "published_at": "2023-11-30T09:13:35.000000Z",
                        "source": "rt.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "a87754b3-992e-434f-8a47-749b0a679087",
                        "title": "Blinken arrives in Israel as the Gaza cease-fire with Hamas is extended another day",
                        "description": "The secretary of state said the U.S. is committed to seeing the release of all Hamas hostages. Meanwhile, gunmen killed three Israelis in an attack on the outskirts of West Jerusalem early Thursday.",
                        "keywords": "",
                        "snippet": "Blinken arrives in Israel as the Gaza cease-fire with Hamas is extended another day\n\nEnlarge this image toggle caption Saul Loeb/POOL/AFP via Getty Images Saul ...",
                        "url": "https://www.npr.org/2023/11/30/1215998728/israel-hamas-jerusalem-attack-hostages-captives-extension-ceasefire",
                        "image_url": "https://media.npr.org/assets/img/2023/11/30/gettyimages-1812207686_wide-ff025c7452820a7f972d36f83c5b39282feb4ff0-s1400-c100.jpg",
                        "language": "en",
                        "published_at": "2023-11-30T10:39:32.000000Z",
                        "source": "npr.org",
                        "categories": [
                            "general"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "4d391707-c811-44ac-9603-ab680b415b13",
                        "title": "Israel and Hamas agree to extend truce by one day",
                        "description": "A last-minute agreement for the release of more hostages and Palestinian prisoners will see the pause in fighting last through Thursday at least. Richard Engel reports.",
                        "keywords": "",
                        "snippet": "Israel and Hamas agree to extend truce by one day\n\nA last-minute agreement for the release of more hostages and Palestinian prisoners will see the pause in figh...",
                        "url": "https://www.msnbc.com/morning-joe/watch/israel-and-hamas-agree-to-extend-truce-by-one-day-199056453685",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/mpx/2704722219/2023_11/1701343100497_n_mj_engel_231130_1920x1080-cvryke.jpg",
                        "language": "en",
                        "published_at": "2023-11-30T11:18:39.000000Z",
                        "source": "msnbc.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    },
                    {
                        "uuid": "9d4ea305-888b-4c27-9a9c-3375bb99933b",
                        "title": "Israel-Hamas war live updates: Gaza cease-fire extended a day; Jerusalem shooting kills 3",
                        "description": "Follow NBC News' latest coverage of the Israel-Hamas war: Truce extended a day, Jerusalem shooting attack kills three.",
                        "keywords": "",
                        "snippet": "'We cried and we hugged each other,' says father of released Palestinian teenager Mohammad Salima returned home Tuesday to his worried father and siblings who b...",
                        "url": "https://www.nbcnews.com/news/world/live-blog/israel-hamas-war-live-updates-rcna127335",
                        "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2023-11/231130-palestinian-prisoners-mb-0801-2cd07a.jpg",
                        "language": "en",
                        "published_at": "2023-11-30T08:49:43.000000Z",
                        "source": "nbcnews.com",
                        "categories": [
                            "general",
                            "politics"
                        ],
                        "locale": "us"
                    }
                ]
            }
        ],
        "business": ...,
        "sports": ...,
        "tech": ...,
        "science": ...,
        "health": ...
    }
}
            
        

Top Stories Available on: All plans

Endpoint

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

Use this endpoint to find live and historical top stories around the world or filter to get only top stories for specific countries. Filtering by language, category, source and publish date is also possible, as well as advanced searching on title and the main text of the article.

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

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

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

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

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

When using special characters (+, -, |, ", *, ()) you MUST URL-encode this parameter.
search_fields false Comma separated list of fields to apply the search parameter to.
Supported fields: title | description | keywords | main_text
Example: title,description,keywords
Default: title,main_text
locale false Comma separated list of country codes to include in the result set. Default is all countries. Click here for a list of supported countries.
Example: us,ca (US + Canada).
categories false Comma separated list of categories to include.
Supported categories: general | science | sports | business | health | entertainment | tech | politics | food | travel
Example: business,tech
exclude_categories false Comma separated list of categories to exclude.
domains false Comma separated list of domains to include. List of domains can be obtained through our Sources endpoint, found further down this page.
exclude_domains false Comma separated list of domains to exclude
source_ids false Comma separated list of source_ids to include. List of source_ids can be obtained through our Sources endpoint, found further down this page.
exclude_source_ids false Comma separated list of source_ids to exclude.
language false Comma separated list of languages to include. Default is all.
Click here for a list of supported languages.
Examples: en,es (English + Spanish)
published_before false Find all articles published before the specified date. Supported formats include: Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2023-11-30T18:02:01 | 2023-11-30T18:02 | 2023-11-30T18 | 2023-11-30 | 2023-11 | 2023
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: 2023-11-30T18:02:01 | 2023-11-30T18:02 | 2023-11-30T18 | 2023-11-30 | 2023-11 | 2023
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2023-11-30
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": 881959,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "8a9f5f78-bb95-4a71-bc50-75555c32c888",
            "title": "Israeli prisoner release shines light on system of detaining Palestinians without charge",
            "description": "Before the temporary truce in the war in Gaza, the Israeli government approved a list of 300 Palestinian prisoners eligible for release. Roughly 80% of those on...",
            "keywords": "",
            "snippet": "Roughly 80% of those on the list were not convicted of any crimes. They were either charged with crimes that had not yet been prosecuted, or were detained under...",
            "url": "https://www.nbcnews.com/news/world/israel-palestinian-hamas-prisoner-release-gaza-west-bank-rcna127353",
            "image_url": "https://media-cldnry.s-nbcnews.com/image/upload/t_nbcnews-fp-1200-630,f_auto,q_auto:best/rockcms/2023-11/231127-israel-gaza-mb-0910-4b7ff0.jpg",
            "language": "en",
            "published_at": "2023-11-30T17:37:01.000000Z",
            "source": "nbcnews.com",
            "categories": [
                "general",
                "politics"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "4c391160-8eff-4d1a-a204-748969747390",
            "title": "‘The Walking Dead’ Maker Skybound Sets Up Shop In Japan",
            "description": "'Walking Dead's Skybound opens in Japan and is making Heart Attack with Fuji TV.",
            "keywords": "",
            "snippet": "EXCLUSIVE: The Walking Dead maker Skybound Entertainment is expanding to Japan.\n\nSkybound Japan will bolster the LA-headquartered outfit’s international prese...",
            "url": "https://deadline.com/2023/11/walking-dead-skybound-japan-1235644471/",
            "image_url": "https://deadline.com/wp-content/uploads/2023/09/Outlook-o0g3qdzi-e1694682267911.png?w=807",
            "language": "en",
            "published_at": "2023-11-30T17:36:08.000000Z",
            "source": "deadline.com",
            "categories": [
                "entertainment"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "3217835c-4f93-463c-9a92-329a4bbd4847",
            "title": "Bond market reflects jitters about wall of maturing office REIT debt",
            "description": "U.S. bonds have been reflecting growing unease about a wall of debt coming due for select owners of office buildings",
            "keywords": "article_normal, commercialrealestate, Telecommunication Services, Trusts/Funds/Financial Vehicles, Investment Trusts, Real Estate Investment Trusts, Banking/Credit, Real Estate/Construction, Diversified REITs, Financial Services, Healthcare REITs, Investing/Securities, Real Estate, Equity Markets, Debt/Bond Markets, Derivative Securities, Commodity/Financial Market News, Content Types, Factiva Filters, C&E Exclusion Filter, Commercialrealestate, U.S. 10 Year Treasury Note, BX:TMUBMUSD10Y, Boston Properties Inc., BXP, Alexandria Real Estate Equities Inc., ARE, Hudson Pacific Properties Inc., HPP, Kilroy Realty Corp., KRC, Vornado Realty Trust, VNO, NASDAQ Composite Index, COMP, S&P 500 Index, SPX, Dow Jones Industrial Average, DJIA, equity markets, debt, bond markets, derivative securities, commodity, financial market news, content types, factiva filters, c&e exclusion filter, telecommunication services, trusts, funds, financial vehicles, investment trusts, real estate investment trusts, banking, credit, real estate, construction, diversified reits, financial services, healthcare reits, investing, securities",
            "snippet": "U.S. bonds have been reflecting growing unease about a wall of debt coming due for select owners of office buildings.\n\nSelling pressure has been particularly ac...",
            "url": "https://www.marketwatch.com/story/bond-market-reflects-jitters-about-wall-of-maturing-office-reit-debt-bca3b84b",
            "image_url": "https://images.mktw.net/im-39220774/social",
            "language": "en",
            "published_at": "2023-11-30T17:34:00.000000Z",
            "source": "marketwatch.com",
            "categories": [
                "business",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "391a2d1a-3cb2-41f1-9a77-26ac7642ec4f",
            "title": "‘Swagger’ Cancelled After 2 Seasons At Apple TV+",
            "description": "Swagger will not be returning for Season 3 at Apple TV+",
            "keywords": "",
            "snippet": "Swagger will not be getting another season at Apple TV+.\n\nThe sports drama, inspired by NBA star Kevin Durant’s experiences as a kid, has been cancelled after...",
            "url": "https://deadline.com/2023/11/swagger-cancelled-apple-tv-1235644512/",
            "image_url": "https://deadline.com/wp-content/uploads/2023/11/SWAGGER.jpg?w=1024",
            "language": "en",
            "published_at": "2023-11-30T17:32:47.000000Z",
            "source": "deadline.com",
            "categories": [
                "entertainment"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "8546034e-3b58-4bb2-b613-e59205a97e3c",
            "title": "Apellis Pharmaceuticals Unusual Options Activity - Apellis Pharmaceuticals (NASDAQ:APLS)",
            "description": "",
            "keywords": "",
            "snippet": "Loading... Loading... Loading...\n\nInvestors with a lot of money to spend have taken a bullish stance on Apellis Pharmaceuticals APLS.\n\nAnd retail traders should...",
            "url": "https://www.benzinga.com/markets/options/23/11/36028879/apellis-pharmaceuticals-unusual-options-activity",
            "image_url": "https://cdn.benzinga.com/files/images/story/2023/movers_image_18.jpeg?width=1200&height=800&fit=crop",
            "language": "en",
            "published_at": "2023-11-30T17:31:28.000000Z",
            "source": "benzinga.com",
            "categories": [
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "dcbb9007-4ab4-4874-8082-83d40c99ebe7",
            "title": "Unpacking the Latest Options Trading Trends in UnitedHealth Group - UnitedHealth Group (NYSE:UNH)",
            "description": "",
            "keywords": "",
            "snippet": "Loading... Loading... Loading...\n\nInvestors with a lot of money to spend have taken a bearish stance on UnitedHealth Group UNH.\n\nAnd retail traders should know....",
            "url": "https://www.benzinga.com/markets/options/23/11/36028876/unpacking-the-latest-options-trading-trends-in-unitedhealth-group",
            "image_url": "https://cdn.benzinga.com/files/images/story/2023/movers_image_5.jpeg?width=1200&height=800&fit=crop",
            "language": "en",
            "published_at": "2023-11-30T17:31:23.000000Z",
            "source": "benzinga.com",
            "categories": [
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "3d265d1b-c131-49fe-8595-f3c53c8d407d",
            "title": "What the Options Market Tells Us About Charles Schwab - Charles Schwab (NYSE:SCHW)",
            "description": "",
            "keywords": "",
            "snippet": "Loading... Loading... Loading...\n\nWhales with a lot of money to spend have taken a noticeably bullish stance on Charles Schwab.\n\nLooking at options history for ...",
            "url": "https://www.benzinga.com/markets/options/23/11/36028874/what-the-options-market-tells-us-about-charles-schwab",
            "image_url": "https://cdn.benzinga.com/files/images/story/2023/movers_image_1.jpeg?width=1200&height=800&fit=crop",
            "language": "en",
            "published_at": "2023-11-30T17:31:18.000000Z",
            "source": "benzinga.com",
            "categories": [
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "bd33c078-ceb1-4ad4-b7aa-c4c678633796",
            "title": "Aislinn Clarke directs Hellish Nell witch tale The Picture Company Studiocanal – Deadline",
            "description": "Aislinn Clarke To Helm Hellish Nell For The Picture Company & Studiocanal; Saga Of Last UK Person Convicted & Imprisoned For Witchcraft",
            "keywords": "",
            "snippet": "EXCLUSIVE: Aislinn Clarke is set to direct Hellish Nell, the genre thriller for Studiocanal and The Picture Company.\n\nFrom Black List writer Chris Basler, Helli...",
            "url": "https://deadline.com/2023/11/aislinn-clarke-to-direct-hellish-nell-last-woman-imprisoned-for-witchcraft-the-picture-company-studiocanal-1235644314/",
            "image_url": "https://deadline.com/wp-content/uploads/2023/11/Aislinn-Clarke-1.jpg?w=1024",
            "language": "en",
            "published_at": "2023-11-30T17:30:00.000000Z",
            "source": "deadline.com",
            "categories": [
                "entertainment"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "7903508a-4bb9-42f5-b852-7159c1a673ac",
            "title": "‘Silver Linings Playbook' Execs Thought J. Law Outshined Bradley Cooper",
            "description": "‘Silver Linings Playbook’ producer Bruce Cohen recalled the moment the production team realized Jennifer Lawrence might be better than costar Bradley Cooper",
            "keywords": "",
            "snippet": "A decade after winning an Oscar, Jennifer Lawrence is still getting her flowers for her role in Silver Linings Playbook.\n\nBruce Cohen, a producer on the 2012 fi...",
            "url": "https://www.usmagazine.com/entertainment/news/silver-linings-playbook-execs-thought-j-law-outshined-bradley-cooper/",
            "image_url": "https://www.usmagazine.com/wp-content/uploads/2023/11/Silver-Linings-Playbook-Producer-Recalls-Thinking-Jennifer-Lawrence-Outshined-Bradley-Cooper-feature.jpg?crop=0px%2C0px%2C2000px%2C1051px&resize=1200%2C630&quality=86&strip=all",
            "language": "en",
            "published_at": "2023-11-30T17:29:23.000000Z",
            "source": "usmagazine.com",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null,
            "locale": "us"
        },
        {
            "uuid": "70ae43ad-b72f-459c-a1b9-20784e4eed5c",
            "title": "BP Takes Full Control Of Lightsource bp, Accelerating Growth In Solar And Battery Storage Sector - BP (NYSE:BP)",
            "description": "BP P.L.C. (NYSE: BP) has agreed to",
            "keywords": "",
            "snippet": "Loading... Loading... Loading...\n\nBP P.L.C. BP has agreed to fully acquire Lightsource bp, a solar and battery storage entity. The acquisition places the value ...",
            "url": "https://www.benzinga.com/news/earnings/23/11/36023253/bp-takes-full-control-of-lightsource-bp-accelerating-growth-in-solar-and-battery-storage-sector",
            "image_url": "https://cdn.benzinga.com/files/images/story/2023/11/30/bp_light.png?width=1200&height=800&fit=crop",
            "language": "en",
            "published_at": "2023-11-30T17:29:02.000000Z",
            "source": "benzinga.com",
            "categories": [
                "business"
            ],
            "relevance_score": null,
            "locale": "us"
        }
    ]
}
            
        

All News Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

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

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

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

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

When using special characters (+, -, |, ", *, ()) you MUST URL-encode this parameter.
search_fields false Comma separated list of fields to apply the search parameter to.
Supported fields: title | description | keywords | main_text
Example: title,description,keywords
Default: title,main_text
categories false Comma separated list of categories to include.
Supported categories: general | science | sports | business | health | entertainment | tech | politics | food | travel
Example: business,tech
exclude_categories false Comma separated list of categories to exclude.
domains false Comma separated list of domains to include. List of domains can be obtained through our Sources endpoint, found further down this page.
exclude_domains false Comma separated list of domains to exclude
source_ids false Comma separated list of source_ids to include. List of source_ids can be obtained through our Sources endpoint, found further down this page.
exclude_source_ids false Comma separated list of source_ids to exclude.
language false Comma separated list of languages to include. Default is all.
Click here for a list of supported languages.
Examples: en,es (English + Spanish)
published_before false Find all articles published before the specified date. Supported formats include: Y-m-d\TH:i:s | Y-m-d\TH:i | Y-m-d\TH | Y-m-d | Y-m | Y.
Examples: 2023-11-30T18:02:01 | 2023-11-30T18:02 | 2023-11-30T18 | 2023-11-30 | 2023-11 | 2023
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: 2023-11-30T18:02:01 | 2023-11-30T18:02 | 2023-11-30T18 | 2023-11-30 | 2023-11 | 2023
published_on false Find all articles published on the specified date. Supported formats include: Y-m-d.
Examples: 2023-11-30
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": 48376470,
        "returned": 10,
        "limit": 10,
        "page": 1
    },
    "data": [
        {
            "uuid": "e2c722fb-d3d4-4f5f-98c9-71638bc1bae1",
            "title": "전주 완산공원 관광명소화로 구도심 변혁 ‘신호탄’",
            "description": "전주의 옛 지명인 ‘완산’이 자리한 역사의 탯줄과 같은 곳이자 전주화약을 이끈 동학농민혁명군의 격전지였던 완산칠...",
            "keywords": "",
            "snippet": "30일 전주시청 회의실에서 우범기 시장이 완산공원 힐링 아트밸리 조성계획 발표 브리핑을 열고 질의에 답변하고 있다. ?...",
            "url": "http://www.domin.co.kr/news/articleView.html?idxno=1449107",
            "image_url": "http://www.domin.co.kr/news/thumbnail/202311/1449107_611592_122_v150.jpg",
            "language": "ko",
            "published_at": "2023-11-30T18:01:58.000000Z",
            "source": "domin.co.kr",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "9879fd8d-21c9-465a-89ec-45633fb00aef",
            "title": "3조1천억원 신한울 3,4호기 시공사로 현대건설컨소시엄",
            "description": "[이투뉴스] 3조1196억원(부가세 포함) 규모의 신한울 3,4호기 원전 주설비공사 시공사업을 현대건설컨소시엄(현대건설·두?...",
            "keywords": "두산에너빌리티, 현대건설, 신한울3",
            "snippet": "신한울 3,4호기 주기기 공사를 수주한 현대건설컨소시엄의 일원인 두산에너빌리티 본사\n\n[이투뉴스] 3조1196억원(부가세 ?...",
            "url": "http://www.e2news.com/news/articleView.html?idxno=303513",
            "image_url": "https://cdn.e2news.com/news/thumbnail/202311/303513_203077_129_v150.jpg",
            "language": "ko",
            "published_at": "2023-11-30T18:01:52.000000Z",
            "source": "e2news.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "6e176eb4-4a2c-43c9-8088-3ccc884b009e",
            "title": "S&P",
            "description": "국제 신용평가사 스탠더드앤드푸어스(S&P)가 우리나라의 높은 가계부채로 국내은행의 건전성이 악하할 가능성은 낮다고 ...",
            "keywords": "",
            "snippet": "저신용 차주·리스크 선호에 비은행 예금기관 신용리스크↑\n\n내년 금리 하락 전환으로 NIM 축소…은행 수익성 하락할 것\n\n...",
            "url": "https://news.einfomax.co.kr/news/articleView.html?idxno=4289783",
            "image_url": "https://cdn.news.einfomax.co.kr/news/thumbnail/202311/4289783_173476_22_v150.jpg",
            "language": "ko",
            "published_at": "2023-11-30T18:01:40.000000Z",
            "source": "news.einfomax.co.kr",
            "categories": [
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "7b1d6040-f3f7-4e30-ab57-230640527791",
            "title": "김해시의회 '자치분권·생활체육복지' 연구회, 지역문제 공유·해결책 모색",
            "description": "김해시의회 의원연구단체인 자치분권연구회와 생활체육복지연구회가 각각 연구용역 최종보고회를 열어 지역사회 문제?...",
            "keywords": "",
            "snippet": "자치분권연구회, 주민자치 활성화 위한 시의회 역할 고민\n\n생활체육복지연구회, 지역 복지·생활체육 연계 방안 연구\n\n김...",
            "url": "https://www.idomin.com/news/articleView.html?idxno=840419",
            "image_url": "http://www.idomin.com/news/photo/202311/840419_516945_4621.jpg",
            "language": "ko",
            "published_at": "2023-11-30T18:01:35.000000Z",
            "source": "idomin.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "b20e2399-8e21-46dd-819f-364792b8000f",
            "title": "吉林减税降费让企业得实惠 经济呈现回升向好态势-中新网",
            "description": "",
            "keywords": "刘亚楠, 刘震, 点对点, 税费政策, 小巨人",
            "snippet": "中新网长春11月30日电 (谭伟旗)记者30日从国家税务总局吉林省税务局获悉,税收大数据显示,前三季度,吉林省企业销售?...",
            "url": "https://www.chinanews.com.cn/cj/2023/11-30/10120398.shtml",
            "image_url": "https://i2.chinanews.com.cn/simg/ypt/2023/231130/74bd8409-246c-4108-90cb-ab1fbf4a5bfc_zsite.jpg",
            "language": "zh",
            "published_at": "2023-11-30T18:01:19.000000Z",
            "source": "chinanews.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "f35b70ef-6220-408a-b3ff-036714699624",
            "title": "中島、賞金王の貫禄 5人目の2億円突破へ|【西日本新聞me】",
            "description": "男子ゴルフで既に賞金王を確定させた中島啓太が30日、貫禄のプレーを見せつけた。持ち前のピンを攻めるショットで?...",
            "keywords": "西日本新聞me, 西日本新聞, ニュース, 九州, 福岡",
            "snippet": "男子ゴルフで既に賞金王を確定させた中島啓太が30日、貫禄のプレーを見せつけた。持ち前のピンを攻めるショットで?...",
            "url": "https://www.nishinippon.co.jp/item/o/1152001/",
            "image_url": "https://www.nishinippon.co.jp/uploads/image/1613512/sns_PN2023113001001473.-.-.CI0003.jpg",
            "language": "ja",
            "published_at": "2023-11-30T18:01:04.000000Z",
            "source": "nishinippon.co.jp",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "198baf74-5995-4fad-976c-614b9fa9cc1c",
            "title": "(乡村行·看振兴)福建罗源:勾勒乡村振兴“高颜值”画卷-中新网",
            "description": "",
            "keywords": "",
            "snippet": "中新网福州11月30日电 (林彭轩)看山,苍翠欲滴;望水,碧波轻荡;进村,赏心悦目;入院,别致静雅……曾经以石材业为...",
            "url": "https://www.chinanews.com.cn/cj/2023/11-30/10120397.shtml",
            "image_url": "https://www.chinanews.com.cn/2023/11-22/U610P4T8D10116025F5012DT20231122133419.jpg",
            "language": "zh",
            "published_at": "2023-11-30T18:01:03.000000Z",
            "source": "chinanews.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "614f0631-9a49-43cb-910e-7c781dd88727",
            "title": "현직 도의원 테러 의혹 진실공방전",
            "description": "김영환 충북지사 지인이 박진희 충청북도 도의원과 현 기자 2명의 테러를 사주했다는 주장이 제기됐다.이에 대해 당사자...",
            "keywords": "사설",
            "snippet": "박진희 충북도의원이 '김영환 충북도지사 측근의 테러 사주 의혹' 관련 기자회견을 하는 모습. /중부매일DB\n\n김영환 충북?...",
            "url": "http://www.jbnews.com/news/articleView.html?idxno=1416599",
            "image_url": "https://cdn.jbnews.com/news/thumbnail/202311/1416599_1232256_127_v150.jpg",
            "language": "ko",
            "published_at": "2023-11-30T18:01:00.000000Z",
            "source": "jbnews.com",
            "categories": [],
            "relevance_score": null
        },
        {
            "uuid": "7f4199d8-ba8f-4b96-bdfa-978ebc969800",
            "title": "ホールvsオーツ続報 ダリル・ホールは新たな裁判書類でデュオ解消について明かす ジョン・オーツは裁判所に反論提出",
            "description": "ダリル・ホールがジョン・オーツを訴えた件で、ホールは新たに裁判所に提出した書類の中で、ホール&オーツの現状?...",
            "keywords": "音楽, 洋楽, 邦楽, music, アニメ, 映画, 特撮, cd, dvd, Blu-ray",
            "snippet": "",
            "url": "https://amass.jp/171524/",
            "image_url": "https://amassing2.sakura.ne.jp/image/jacket/300/2020/110911.jpg",
            "language": "ja",
            "published_at": "2023-11-30T18:01:00.000000Z",
            "source": "amass.jp",
            "categories": [
                "entertainment",
                "general"
            ],
            "relevance_score": null
        },
        {
            "uuid": "619f41af-34a4-43f7-abbe-39be7206e660",
            "title": "김해 ㈜다울피피티, 기업 R&D 챌린지 ‘대상’ 영예",
            "description": "김해시가 30일 오전 시청 대회의실에서 ‘김해 기업 R&D 챌린지’ 10개 기업을 선정해 시상했다.김해 기업 R&D 챌린지는 4차...",
            "keywords": "",
            "snippet": "김해시, 혁신기술 가진 기업 10개사 선정·지원\n\n㈜다울피피티, 자동 용접 시스템 상용화 추진\n\n김해시가 30일 오전 시청 ?...",
            "url": "https://www.idomin.com/news/articleView.html?idxno=840420",
            "image_url": "http://www.idomin.com/news/photo/202311/840420_516947_4838.jpg",
            "language": "ko",
            "published_at": "2023-11-30T18:00:56.000000Z",
            "source": "idomin.com",
            "categories": [],
            "relevance_score": null
        }
    ]
}
            
        

Similar News Available on: All plans

Endpoint

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

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

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

All text data returned is UTF-8.

All dates are in UTC (GMT).

HTTP GET Parameters

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

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.