### Install NewsData.io React Client Source: https://newsdata.io/documentation Command to install the NewsData.io React client library using npm. ```bash npm install newsdataapi ``` -------------------------------- ### Install NewsData.io Python Client Source: https://newsdata.io/documentation Command to install the NewsData.io Python client library using pip. ```bash $ pip install newsdataapi ``` -------------------------------- ### Example Queries Source: https://newsdata.io/documentation Illustrative examples of how to construct API requests to fetch news articles based on different criteria. ```APIDOC ## Example Queries 1. **News from category technology and science** ``` Get https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&category=technology,science ``` 2. **News from_date April 20, 2026 to May 3, 2026** ``` Get https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&from_date=2026-04-20&to_date=2026-05-03&category=technology ``` 3. **News from April 4, 2026 till present date** ``` Get https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&from_date=2026-04-04&category=science ``` To dive deeper with practical examples visit - All about News "Archive" Endpoint ``` -------------------------------- ### Market News API Endpoint Examples Source: https://newsdata.io/documentation Examples demonstrating how to query the Market News API for specific news. ```APIDOC ## Organization-Specific News ### Description Retrieves market news related to specific organizations. ### Method GET ### Endpoint https://newsdata.io/api/1/market ### Query Parameters - **apikey** (string) - Required - Your unique API key. - **organization** (string) - Required - Comma-separated list of organization names. ### Request Example ``` https://newsdata.io/api/1/market?apikey=YOUR_API_KEY&organization=uber,microsoft ``` ``` ```APIDOC ## Sentiment-Filtered Market News ### Description Retrieves market news for specified stock tickers with a particular sentiment. ### Method GET ### Endpoint https://newsdata.io/api/1/market ### Query Parameters - **apikey** (string) - Required - Your unique API key. - **symbol** (string) - Required - Comma-separated list of stock tickers. - **sentiment** (string) - Optional - The sentiment of the news (e.g., 'positive', 'negative'). ### Request Example ``` https://newsdata.io/api/1/market?apikey=YOUR_API_KEY&symbol=MSFT,GOOGL&sentiment=positive ``` ``` ```APIDOC ## Market News by Stock Ticker ### Description Retrieves market news for specified stock tickers. ### Method GET ### Endpoint https://newsdata.io/api/1/market ### Query Parameters - **apikey** (string) - Required - Your unique API key. - **symbol** (string) - Required - Comma-separated list of stock tickers. ### Request Example ``` https://newsdata.io/api/1/market?apikey=YOUR_API_KEY&symbol=AAPL,TSLA ``` ``` -------------------------------- ### Hourly market news volume for 'NASDAQ' Source: https://newsdata.io/documentation Example request to get the hourly volume of market news related to 'NASDAQ' for a specific day. ```http https://newsdata.io/api/1/market/count?apikey=YOUR_API_KEY&q=nasdaq&from_date=2024-04-01&to_date=2024-04-01&interval=hour ``` -------------------------------- ### Example Query: News from Australia and USA Source: https://newsdata.io/documentation This example demonstrates how to fetch the latest news articles from Australia and the United States using the API. Ensure you replace 'YOUR_API_KEY' with your actual API key. ```http https://newsdata.io/api/1/latest?apikey=YOUR_API_KEY&country=au,us ``` ```json { status: "success" totalResults: 190 results: [ 0: { article_id: "0298306cb1fa86f1b619780ffcda3e76" link: "https://au.investing.com/news/stock-market-news/earnings-call-transcript-federal-signal-q1-2026-bea..." title: "Earnings call transcript: Federal Signal Q1 2026 beats expectations with strong growth" description: "Earnings call transcript: Federal Signal Q1 2026 beats expectations with strong growth" content: "Opening the Strait, or maybe not Federal Signal Corporation (FSS) reported impressive financial res..." keywords: null creator: [ 0: "investing.com" ] language: "english" country: [ 0: "australia" ] category: [ 0: "business" ] datatype: "news" pubDate: "2026-05-04 06:08:09" pubDateTZ: "UTC" fetched_at: "2026-05-04 06:31:55" image_url: "https://i-invdn-com.investing.com/news/LYNXNPEB670Y6_L.jpg" video_url: null source_id: "investing_au" source_name: "Investing Australia" source_priority: 1205 source_url: "https://au.investing.com" source_icon: "https://n.bytvi.com/investing_au.jpg" sentiment: "positive" sentiment_stats: { negative: 0.02 neutral: 0.15 positive: 99.83 } ai_tag: [ 0: "financial markets" ] ai_region: null ai_org: [ 0: "federal signal" ] ai_summary: "Federal Signal Corporation reported a strong Q1 2026 with an EPS of $1.18, surpassing the forecaste..." duplicate: true } 1: { article_id: "f16242ad47ce337a345f7f80c4c00c4e" link: "https://uk.investing.com/news/stock-market-news/earnings-call-transcript-federal-signal-q1-2026-bea..." title: "Earnings call transcript: Federal Signal Q1 2026 beats expectations with strong growth" description: "Earnings call transcript: Federal Signal Q1 2026 beats expectations with strong growth" content: "Bitcoin rises past $80k on ETF inflows; Strategy earnings on tap Federal Signal Corporation (FSS) r..." keywords: null creator: [ 0: "investing.com" ] language: "english" country: [ 0: "united kingdom" ] category: [ 0: "business" ] datatype: "news" pubDate: "2026-05-04 06:08:09" pubDateTZ: "UTC" fetched_at: "2026-05-04 06:32:03" image_url: "https://i-invdn-com.investing.com/news/LYNXMPEAA60AX_L.jpg" video_url: null source_id: "investing_uk" source_name: "Investing Uk" source_priority: 1205 source_url: "https://uk.investing.com" source_icon: "https://n.bytvi.com/investing_uk.jpg" sentiment: "positive" sentiment_stats: { negative: 0.02 neutral: 0.2 positive: 99.78 } ai_tag: [ 0: "financial markets" ] ai_region: null ai_org: [ 0: "federal signal" ] ai_summary: "Federal Signal Corporation (FSS) reported a strong Q1 2026 with an EPS of $1.18, surpassing the for..." duplicate: true } 2: { article_id: "5f2181c597a199895a6fb63e4153e37b" link: "http://www.euronews.com/business/2026/05/04/irish-economic-miracle-explained-why-all-that-glitter-i..." title: "Irish economic miracle explained: Why all that glitter isn't gold" description: "Ireland's GDP soared 12.3% in 2025 — but it was a mirage. Pharma multinationals front-loaded €25.4b..." content: "When Ireland's GDP figures for 2025 came in, a startling 12.3% in real terms, many spoke of a fresh..." keywords: [ 0: "trump tariffs" 1: "ireland" 2: "irish economy" ] creator: [ 0: "piero cingari" ] language: "english" country: [ 0: "moldova" 1: "netherland" 2: "norway" 3: "ireland" 4: "albania" 5: "macedonia" 6: "russia" 7: "latvia" 8: "san marino" 9: "belarus" 10: "italy" 11: "montenegro" 12: "lithuania" 13: "cyprus" 14: "germany" 15: "monaco" 16: "ukraine" 17: "belgium" 18: "estonia" 19: "bosnia and herzegovina" 20: "hungary" 21: "france" 22: "bulgaria" 23: "finland" 24: "switzerland" 25: "united kingdom" 26: "sweden" 27: "romania" 28: "slovakia" 29: "poland" 30: "greece" 31: "malta" 32: "czech republic" 33: "kosovo" 34: "vatican" 35: "luxembourg" 36: "iceland" 37: "liechtenstein" 38: "spain" 39: "croatia" 40: "andorra" 41: "denmark" 42: "portugal" 43: "slovenia" 44: "serbia" 45: "austria" ] category: [ 0: "top" 1: "business" ] datatype: "news" pubDate: "2026-05-04 06:06:18" pubDateTZ: "UTC" fetched_at: "2026-05-04 06:30:51" image_url: "https://images.euronews.com/articles/stories/09/74/17/91/1440x810_cmsv2_a1a8a936-01b2-518f-baf8-95c..." video_url: null source_id: "euronews" source_name: "Euronews" source_priority: 3311 source_url: "https://www.euronews.com" source_icon: "https://n.bytvi.com/euronews.png" sentiment: "positive" sentiment_stats: { negative: 1.43 neutral: 40.04 positive: 58.53 } ai_tag: [ 0: "economy" ] ai_region: [ 0: "ireland,indiana,united states of america,north america" 1: "united states of america,north america" 2: "irish" ] ai_org: null } ] } ``` -------------------------------- ### Get All News Sources Source: https://newsdata.io/documentation Retrieve a list of all available news sources. Replace YOUR_API_KEY with your actual API key. ```bash https://newsdata.io/api/1/sources?apikey=YOUR_API_KEY ``` -------------------------------- ### Total count of news about 'electric vehicles' Source: https://newsdata.io/documentation Example request to get the total count of news articles related to 'electric vehicles' within a specified date range. ```http https://newsdata.io/api/1/count?apikey=YOUR_API_KEY&q=electric%20vehicle&from_date=2024-01-01&to_date=2024-01-31&interval=all ``` -------------------------------- ### Newsdata.io API Parameters Source: https://newsdata.io/documentation This section outlines the available parameters for querying the Newsdata.io API, including their requirements, descriptions, and examples. ```APIDOC ## Parameters Below are the Request Parameters you need to put in your query to run the API. Name| Required| Description| Default Value| Example ---|---|---|---|--- apikey| Required| You need to add your API Key while accessing the newsdata API. How to get the NewsData.io API key.| | id| Optional| Search the specific news article from its unique article_id string. You can add up to 50 article id strings in a single query or as per your specified limit.| | id=article_id id=article_id_1,article_id_2,article_id_3 coin| Optional| Search the news articles for a specific language. Include up to 5 coins per query on Free and Basic plans. Professional and Corporate plans support up to 10 coins| | coin=btc coin=eth,usdt,bnb q| Optional| Search news articles for specific keywords or phrases present in the news title, content, URL, meta keywords and meta description. The value must be URL-encoded and the maximum character limit permitted is 512 characters. Please refer Advanced Search for more details| | q=pizza qInTitle| Optional| Search news articles for specific keywords or phrases present in the news titles only. The value must be URL-encoded and the maximum character limit permitted is 512 characters. Note: qInTitle can't be used with q or qInMeta parameter in the same query.| | qInTitle=pizza qInMeta| Optional| Search news articles for specific keywords or phrases present in the news titles, URL, meta keywords and meta description only. The value must be URL-encoded and the maximum character limit permitted is 512 characters. Note: qInMeta can't be used with q or qInTitle parameter in the same query.| | qInMeta=pizza timeframe| Optional| Search the news articles for a specific timeframe (Minutes and Hours). For hours, you can set a timeframe of 1 to 48, and for minutes, you can define a timeframe of 1m to 2880m. For example, if you want to get the news for the past 6 hours then use timeframe=6 and if you want to get news for the last 15 min then use timeframe=15m.Note - You can only use timeframe either in hours or minutes.| | For Hours -timeframe=1timeframe=6timeframe=24For Minutes -timeframe=15mtimeframe=45mtimeframe=90m from_date| Optional| Use from_date filter to get news data from a particular date in the past. Note: If you didn’t specify from_date then from_date will be considered as per your subscription plan. For example, if you have purchased the professional subscription plan and didn’t mention from_date then the API will automatically fetch the data from the past 1 year.| | from_date=YYYY-MM-DD from_date=2025-01-01 from_date=YYYY-MM-DD HH:MM:SS from_date=2025-01-01 06:12:45 to_date| Optional| This filter is used to set an end date for the search result. Note: If you didn't specify to_date then the API will fetch the data till today| | to_date=YYYY-MM-DD to_date=2025-01-30 to_date=YYYY-MM-DD HH:MM:SS to_date=2025-01-30 06:12:45 language| Optional| Search the news articles for a specific language. Include up to 5 languages per query on Free and Basic plans. Professional and Corporate plans support up to 10 languages. Check the codes for all the languages here.| | language=fr,en excludelanguage| Optional| You can exclude specific languages to search for news articles. Exclude up to 5 languages per query on Free and Basic plans. Professional and Corporate plans support up to 10 languages. Note: You can use either the 'language' parameter to include specific languages or the 'excludelanguage' parameter to exclude them, but not both simultaneously.| | excludelanguage=fr,en sort| Optional| You can sort the search results based on your preferred criteria to organize how news articles appear in the response. You can use the sort parameter with one of the following options: pubdateasc – Sort articles by publish date in ascending order (oldest to newest).relevancy – Sort by most relevant results first based on your query.source – Sort results by source priority (top to low).fetched_at - Sort articles by their fetched date.Note: By default, results are sorted by publish date (newest first) if no sort parameter is specified.| | sort=relevancysort=fetched_at url| Optional| You can search for a specific news article by providing its URL.| | url=https://newsdata.io/blog/multiple-api-key-newsdata-io tag| Optional| Search the news articles for specific AI-classified tags. Include up to 10 tags per query.(Available only for Professional and Corporate users)Check the codes for all the crypto AI tags here.With Custom AI Tags (Corporate Yearly Plan only), you can request your own tag to classify articles based on your specific topic or tag| | tag=blockchain sentiment| Optional| Search the news articles based on the sentiment of the news article (positive, negative, neutral).(Available only for Professional and Corporate users)| | sentiment=positive ``` -------------------------------- ### Get News Sources by Multiple Parameters Source: https://newsdata.io/documentation Combine multiple parameters like language, country, and category to refine your news source search. Replace YOUR_API_KEY with your actual API key. ```bash https://newsdata.io/api/1/sources?apikey=YOUR_API_KEY&language=fr,en&country=au,jp&category=sports,top ``` -------------------------------- ### Newsdata.io API Query Parameters Source: https://newsdata.io/documentation This section outlines the available parameters for querying the Newsdata.io API, including their requirements, descriptions, and examples. ```APIDOC ## Newsdata.io API Parameters ### Description This document details the parameters available for querying the Newsdata.io API to retrieve news articles. ### Parameters #### Query Parameters - **apikey** (string) - Required - Your unique API Key for accessing the Newsdata.io API. - **id** (string) - Optional - Search for specific news articles using their unique article_id. Multiple IDs can be provided, separated by commas (e.g., `id=article_id_1,article_id_2`). - **q** (string) - Optional - Search for keywords or phrases in the title, content, URL, and meta fields. The value must be URL-encoded. Max 512 characters. - **qInTitle** (string) - Optional - Search for keywords or phrases specifically within the news article titles. The value must be URL-encoded. Max 512 characters. Cannot be used with `q` or `qInMeta`. - **qInMeta** (string) - Optional - Search for keywords or phrases within the title, URL, meta keywords, and meta description. The value must be URL-encoded. Max 512 characters. Cannot be used with `q` or `qInTitle`. - **timeframe** (string) - Optional - Specify a timeframe for news articles. Use hours (e.g., `timeframe=6`) or minutes (e.g., `timeframe=15m`). Max 48 hours or 2880 minutes. - **country** (string) - Optional - Search articles from specific countries. Separate multiple country codes with commas (e.g., `country=au,jp`). Up to 5 countries on Free/Basic plans, 10 on Professional/Corporate. - **excludecountry** (string) - Optional - Exclude articles from specific countries. Separate multiple country codes with commas (e.g., `excludecountry=au,jp`). Up to 5 countries on Free/Basic plans, 10 on Professional/Corporate. Cannot be used with `country`. - **category** (string) - Optional - Search articles within specific categories. Separate multiple category codes with commas (e.g., `category=sports,top`). Up to 5 categories on Free/Basic plans, 10 on Professional/Corporate. - **excludecategory** (string) - Optional - Exclude articles from specific categories. Separate multiple category codes with commas (e.g., `excludecategory=top`). Up to 5 categories on Free/Basic plans, 10 on Professional/Corporate. Cannot be used with `category`. - **language** (string) - Optional - Search articles in specific languages. Separate multiple language codes with commas (e.g., `language=fr,en`). Up to 5 languages on Free/Basic plans, 10 on Professional/Corporate. - **excludelanguage** (string) - Optional - Exclude articles from specific languages. Separate multiple language codes with commas (e.g., `excludelanguage=fr,en`). Up to 5 languages on Free/Basic plans, 10 on Professional/Corporate. Cannot be used with `language`. - **sort** (string) - Optional - Sort search results. Options: `pubdateasc` (oldest first), `relevancy` (most relevant), `source` (source priority), `fetched_at` (fetched date). Default is newest first. - **datatype** (string) - Optional - Filter articles by type. Supported values: `news`, `blog`, `multimedia`, `forum`, `press_release`, `review`, `research`, `opinion`, `analysis`, `podcast`. Up to 5 types on Free/Basic plans, 10 on Professional/Corporate. ### Example Usage ``` https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&q=pizza&country=us&timeframe=24 ``` ``` -------------------------------- ### Get News Sources by Domain URL Source: https://newsdata.io/documentation Search for specific domains or news sources. You can include up to 5 domains per query. Replace YOUR_API_KEY with your actual API key. ```bash https://newsdata.io/api/1/sources?apikey=YOUR_API_KEY&domainurl=nytimes.com,bbc.com,bbc.co.uk ``` -------------------------------- ### Get News Sources by Priority Domain Source: https://newsdata.io/documentation Filter news articles based on domain priority (top, medium, low). Replace YOUR_API_KEY with your actual API key. ```bash https://newsdata.io/api/1/sources?apikey=YOUR_API_KEY&prioritydomain=topprioritydomain=mediumprioritydomain=low ``` -------------------------------- ### Daily count of crypto news with keyword 'Bitcoin' Source: https://newsdata.io/documentation Example request to retrieve the daily count of crypto news articles mentioning 'Bitcoin' within a specific date range. ```http https://newsdata.io/api/1/crypto/count?apikey=YOUR_API_KEY&q=bitcoin&from_date=2024-06-01&to_date=2024-06-15&interval=day ``` -------------------------------- ### Latest News API Request Source: https://newsdata.io/documentation This example demonstrates how to retrieve the latest news articles using the NewsData.io API. It includes the base URL, your API key, and a query parameter for 'pizza'. ```APIDOC ## Latest News API ### Description Retrieves the latest news articles based on a specified keyword. ### Method GET ### Endpoint https://newsdata.io/api/1/latest ### Parameters #### Query Parameters - **apikey** (string) - Required - Your unique API key for authentication. - **q** (string) - Required - The keyword or phrase to search for in news articles. ### Request Example ``` https://newsdata.io/api/1/latest?apikey=YOUR_API_KEY&q=pizza ``` ### Response #### Success Response (200) Returns a JSON object containing a list of the latest news articles matching the query. ``` -------------------------------- ### NewsData.io Search Query Examples Source: https://newsdata.io/documentation Demonstrates various ways to construct search queries using 'q', 'qInTitle', or 'qInMeta' parameters with different operators like AND, OR, and NOT. Note the 512 character limit for queries for corporate users. ```URL q=social ``` ```URL q=\"social pizza\" ``` ```URL q=social AND pizza AND pasta ``` ```URL q=social NOT pizza ``` ```URL q=social NOT (pizza AND wildfire) ``` ```URL q=social OR pizza OR pasta ``` ```URL q=(pizza OR social) NOT pasta ``` -------------------------------- ### Initialize and use NewsData.io React Client Source: https://newsdata.io/documentation React code to initialize the NewsData.io client and fetch the latest news articles with specified query parameters. ```javascript import useNewsDataApiClient from "newsdataapi"; # API key authorization, Initialize the client with your API key const { latest } = useNewsDataApiClient(YOUR_API_KEY) # You can pass empty or with request parameters (ex. country: "us") const data = await latest({ q: "ronaldo", country: "us" }); ``` -------------------------------- ### Get Crypto News Source: https://newsdata.io/documentation Retrieves the latest cryptocurrency news from various reliable sources. ```APIDOC ## GET https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY ### Description This endpoint allows you to search and monitor worldwide cryptocurrency-related news and blog data. ### Method GET ### Endpoint https://newsdata.io/api/1/crypto ### Parameters #### Query Parameters - **apikey** (string) - Required - Your API key for authentication. ### Request Example ``` https://newsdata.io/api/1/crypto?apikey=YOUR_API_KEY ``` ### Response #### Success Response (200) - The response will be in JSON format and contain cryptocurrency news data. #### Response Example ```json { "status": "success", "totalResults": 100, "results": [ { "title": "Bitcoin Price Surges Amidst Market Optimism", "link": "https://example.com/bitcoin-surge", "pubDate": "2023-10-27T10:00:00Z", "creator": ["Author Name"], "description": "Details about the recent Bitcoin price increase...", "content": "Full content of the article...", "source_id": "news-source-1", "country": ["us"], "category": ["crypto"] } ] } ``` ``` -------------------------------- ### Initialize NewsData.io Python Client Source: https://newsdata.io/documentation Python code to initialize the NewsDataApiClient with an API key and make a basic news search request. ```python from newsdataapi import NewsDataApiClient # API key authorization, Initialize the client with your API key api = NewsDataApiClient (apikey="YOUR_API_KEY") # You can pass empty or with request parameters (ex. country = "us") response = api.news_api(q="ronaldo", country="us") ``` -------------------------------- ### Get News Archive Source: https://newsdata.io/documentation Retrieves historical news data based on specified criteria. Available only in paid plans. ```APIDOC ## GET https://newsdata.io/api/1/archive ### Description Retrieves historical news data for a topic, event, country, category, or domain. Access is limited by subscription plan and historical depth (up to 5 years). ### Method GET ### Endpoint https://newsdata.io/api/1/archive ### Parameters #### Query Parameters - **apikey** (string) - Required - Your API key for authentication. - **from_date** (string) - Required - The start date for the archive search (YYYY-MM-DD). - **to_date** (string) - Required - The end date for the archive search (YYYY-MM-DD). - **category** (string) - Optional - Filters news by a specific category (e.g., technology). ### Request Example ``` https://newsdata.io/api/1/archive?apikey=YOUR_API_KEY&from_date=2025-03-13&to_date=2025-03-26&category=technology ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the response. - **totalResults** (integer) - The total number of results found. - **results** (array) - An array of news articles. - Each article object contains fields like **title**, **link**, **keywords**, **creator**, **pubDate**, **country**, **category**, **description**, **content**, **image_url**, **source_id**, **source_priority**, **url**. #### Response Example ```json { "status": "success", "totalResults": 100, "results": [ { "title": "Example News Title", "link": "https://example.com/news/123", "keywords": ["example", "news"], "creator": ["John Doe"], "pubDate": "2025-03-15T10:00:00Z", "country": ["us"], "category": ["technology"], "description": "This is an example description of the news article.", "content": "Full content of the news article...", "image_url": "https://example.com/image.jpg", "source_id": "example-news", "source_priority": 1, "url": "https://example.com/news/123" } ] } ``` ``` -------------------------------- ### Fetch Latest News with PHP Client Source: https://newsdata.io/documentation Instantiate the NewsdataApi client with your API key and make a request for the latest news, specifying search parameters like 'q' and 'country'. Ensure you have the 'newsdataio/newsdataapi' package installed via Composer. ```php "ronaldo", "country" => "ie"); $response = $newsdataApiObj->get_latest_news($data); ?> ``` -------------------------------- ### Crypto Count Endpoint URL Source: https://newsdata.io/documentation Use this URL to get the total count of crypto-specific news articles matching your query filters. ```http https://newsdata.io/api/1/crypto/count?apikey=YOUR_API_KEY ``` -------------------------------- ### Newsdata.io API Query Parameters Source: https://newsdata.io/documentation This section outlines the available parameters for constructing API requests to Newsdata.io. Each parameter has a name, indicates whether it's required or optional, provides a description of its function, and may include default values or examples. ```APIDOC ## Parameters Below are the Request Parameters you need to put in your query to run the API. Name| Required| Description| Default Value| Example ---|---|---|---|--- apikey| Required| You need to add your API Key while accessing the newsdata API. How to get the NewsData.io API key.| | id| Optional| Search the specific news article from its unique article_id string. You can add up to 50 article id strings in a single query or as per your specified limit.| | id=article_id id=article_id_1,article_id_2,article_id_3 q| Optional| Search news articles for specific keywords or phrases present in the news title, content, URL, meta keywords and meta description. The value must be URL-encoded and the maximum character limit permitted is 512 characters. Please refer Advanced Search for more details| | q=pizza qInTitle| Optional| Search news articles for specific keywords or phrases present in the news titles only. The value must be URL-encoded and the maximum character limit permitted is 512 characters. Note: qInTitle can't be used with q or qInMeta parameter in the same query.| | qInTitle=pizza qInMeta| Optional| Search news articles for specific keywords or phrases present in the news titles, URL, meta keywords and meta description only. The value must be URL-encoded and the maximum character limit permitted is 512 characters. Note: qInMeta can't be used with q or qInTitle parameter in the same query.| | qInMeta=pizza timeframe| Optional| Search the news articles for a specific timeframe (Minutes and Hours). For hours, you can set a timeframe of 1 to 48, and for minutes, you can define a timeframe of 1m to 2880m. For example, if you want to get the news for the past 6 hours then use timeframe=6 and if you want to get news for the last 15 min then use timeframe=15m.Note - You can only use timeframe either in hours or minutes.| | For Hours -timeframe=1timeframe=6timeframe=24For Minutes -timeframe=15mtimeframe=45mtimeframe=90m from_date| Optional| Use from_date filter to get news data from a particular date in the past. Note: If you didn’t specify from_date then from_date will be considered as per your subscription plan. For example, if you have purchased the professional subscription plan and didn’t mention from_date then the API will automatically fetch the data from the past 1 year.| | from_date=YYYY-MM-DD from_date=2025-01-01 from_date=YYYY-MM-DD HH:MM:SS from_date=2025-01-01 06:12:45 to_date| Optional| This filter is used to set an end date for the search result. Note: If you didn't specify to_date then the API will fetch the data till today| | to_date=YYYY-MM-DD to_date=2025-01-30 to_date=YYYY-MM-DD HH:MM:SS to_date=2025-01-30 06:12:45 country| Optional| Search news articles from specific countries. Include up to 5 countries per query on Free and Basic plans. Professional and Corporate plans support up to 10 countries.Check the codes for all the countries here.| | country=au,jp excludecountry| Optional| Exclude news articles from specific countries. Include up to 5 countries per query on Free and Basic plans. Professional and Corporate plans support up to 10 countries.Check the codes for all the countries here.Note: You can use either the 'country' parameter to include specific countries or the 'excludecountry' parameter to exclude them, but not both simultaneously.| | excludecountry=au,jp language| Optional| Search the news articles for a specific language. Include up to 5 languages per query on Free and Basic plans. Professional and Corporate plans support up to 10 languages. Check the codes for all the languages here.| | language=fr,en excludelanguage| Optional| You can exclude specific languages to search for news articles. Exclude up to 5 languages per query on Free and Basic plans. Professional and Corporate plans support up to 10 languages. Note: You can use either the 'language' parameter to include specific languages or the 'excludelanguage' parameter to exclude them, but not both simultaneously.| | excludelanguage=fr,en Indices (Coming soon)| Optional| Filter news articles related to specific stock market indices. Include up to 5 indices per query on Free and Basic plans. Professional and Corporate plans support up to 10 indices.| | indices=SP500,NIKKEI225,FTSE100 symbol| Optional| Search market news articles related to specific stock symbols or tickers. You can add up to 5 tickers in a single query. Professional and Corporate plans support up to 10 symbols.| | symbol=AAPLsymbol=AAPL,TSLA,MSFT organization| Optional| Search the news articles related to specific organizations. Include up to 10 tags per query. (Available only Corporate users)| | organization=uber,apple tag| Optional| Search the news articles for specific AI-classified tags. Include up to 10 tags per query.(Available only for Professional and Corporate users). Check the codes for all the AI tags here| | tag=IPO ``` -------------------------------- ### Archive Count Endpoint URL Source: https://newsdata.io/documentation Use this URL to get the total count of historical news articles matching your query filters. ```http https://newsdata.io/api/1/count?apikey=YOUR_API_KEY ``` -------------------------------- ### Crypto Count Endpoint Source: https://newsdata.io/documentation Get the exact number of crypto-specific news articles available in the NewsData.io database that match your query filters. ```APIDOC ## Crypto Count Endpoint ### Description Retrieves the total count of crypto-specific news articles matching specified criteria. ### Method GET ### Endpoint https://newsdata.io/api/1/crypto/count?apikey=YOUR_API_KEY ### Parameters #### Query Parameters - **apikey** (string) - Required - Your API key for authentication. - **from_date** (string) - Required - The start date for the search range (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS). - **to_date** (string) - Required - The end date for the search range (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS). - **interval** (string) - Optional - Specifies how the count data should be grouped. Options: 'all', 'day', 'hour'. Defaults to 'all'. - **q** (string) - Optional - Search query for keywords. ### Request Example ```http GET https://newsdata.io/api/1/crypto/count?apikey=YOUR_API_KEY&q=bitcoin&from_date=2024-06-01&to_date=2024-06-15&interval=day ``` ### Response #### Success Response (200) - **count** (integer) - The number of articles matching the query. - **nextPage** (string) - Token for the next page of results (if applicable). #### Response Example ```json { "count": 750, "nextPage": "..." } ``` ```