How do I properly add multiple domains to the request? If I’m understanding this correctly, as long as you have a paid version you should be able to do this right?
Here is the full code, with api keys & stuff set in the env file:
var unirest = require("unirest");
var req = unirest("POST", process.env.RAPIDAPI_LATESTNEWS_URL);
req.headers({
"content-type": "application/json",
"x-rapidapi-key": process.env.RAPIDAPI,
"x-rapidapi-host": process.env.RAPIDAPI_LATESTNEWS,
"useQueryString": true
});
req.type("json");
req.send({
"author_only": "true",
"content": "true",
"domains": ["fox.com","cnn.com"],
"page": "1",
"q": "",
"qInTitle": "",
"topic": ""
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body.result);
});
Join in the discussion - add comment below:
We will not change the price when we add multiple domain filtering ability. Currently, you can get results from all the domains by keyword such as:
{“author_only”:"",“content”:"",“domains”:"",“page”:“1”,“q”:“bitcoin”,“qInTitle”:"",“topic”:""}
When you add the functionality will the price change, and is there an approximate timeline for this?
Hi traderbot1, we have turned off this functionality few versions back since we were having latency and pagination issues; right now, you can only query/filter for one domain per API call. I am sorry for any inconvenience and I will be happy to email you when we add this functionality. Also, for any questions or concerns please email me at patel.jay@specrom.com and I will personally look into it. Thanks! Jay.