puter.drivers.call("newsdata", ...)
Search news articles from newsdata.io.
The newsdata
method has a default parameter called q
, which is a search query.
Both of these calls are equivalent:
// Using the default parameter
puter.call('newsdata', 'pizza');
// Using named parameters
puter.call('newsdata', { q: 'pizza' });
When using named parameters, you can specify other values such as language
:
puter.call('newsdata', {
q: 'pizza',
language: 'en',
});
Parameters are the same as on the newsdata.io /latest endpoint. There are two exceptions:
apiKey
cannot be specified; Puter will always use the server's API key.
(developer-provided API keys may be supported in the future)size
cannot be specified; 10 articles will always be returned. (this may change in the future)The response matches what is provided by the newsdata.io Response Object.