From b14eb37c6fa821fba1ddebdb9a20dd0f1b009a11 Mon Sep 17 00:00:00 2001 From: arjunjain Date: Thu, 13 Aug 2026 11:51:03 +0530 Subject: [PATCH] Rename market symbol filter to market_id Sync with python-client: the /market and /market/count endpoints now take market_id instead of symbol. The old filter was removed upstream, so no alias is kept. Updates the count_and_market example too. --- examples/count_and_market.js | 2 +- src/constants.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/count_and_market.js b/examples/count_and_market.js index 82d7c10..388e68b 100644 --- a/examples/count_and_market.js +++ b/examples/count_and_market.js @@ -11,7 +11,7 @@ const client = new NewsDataApiClient(process.env.NEWSDATA_API_KEY); try { // Market / financial news. - const market = await client.marketApi({ q: 'apple', symbol: 'AAPL' }); + const market = await client.marketApi({ q: 'apple', market_id: 'AAPL' }); console.log('market articles:', market.results.length); // Count endpoints require from_date and to_date. diff --git a/src/constants.js b/src/constants.js index eb14dff..b37de6b 100644 --- a/src/constants.js +++ b/src/constants.js @@ -78,7 +78,7 @@ export const FILTERS = Object.freeze({ 'excludecountry', 'domain', 'domainurl', 'excludedomain', 'language', 'excludelanguage', 'prioritydomain', 'timezone', 'timeframe', 'size', 'full_content', 'image', 'video', 'page', 'tag', 'sentiment', - 'excludefield', 'removeduplicate', 'organization', 'symbol', 'id', 'url', + 'excludefield', 'removeduplicate', 'organization', 'market_id', 'id', 'url', 'sort', 'creator', 'datatype', 'sentiment_score', ], count: [ @@ -99,7 +99,7 @@ export const FILTERS = Object.freeze({ 'from_date', 'to_date', 'q', 'qintitle', 'qinmeta', 'country', 'excludecountry', 'domain', 'domainurl', 'excludedomain', 'language', 'excludelanguage', 'full_content', 'image', 'video', 'organization', - 'symbol', 'prioritydomain', 'page', 'sentiment', 'removeduplicate', 'size', + 'market_id', 'prioritydomain', 'page', 'sentiment', 'removeduplicate', 'size', 'sort', 'tag', 'interval', 'creator', 'datatype', 'sentiment_score', ], });