Here are the query instructions for this component:
Query
Surround phrases with quotes (") for exact match. Prepend words or phrases that must appear with a + symbol (e.g. +bitcoin). Prepend words that must not appear with a - symbol (e.g. -bitcoin). Boolean AND/OR/NOT also works with parentheses. The complete value for the query must be URL-encoded.
Contrary to the instructions “General Electric” throws an error while General_Electric works fine. Also, I can’t get the booleans to work no matter how I format the terms and the booleans. Can someone explain what I’m doing wrong?
If yes, could you please share your exact settings (without your News API Key) ? If not would you mind sharing your current workflow so I can have a look at it? (Of course without any API Key)
My guess is that your issue is occurring because, “The complete value for the query must be URL-encoded”. This is likely why the value of General_Electric works fine but General Electric does not.
Could you please try URL-encoding your query after writing it up (online tools such as https://www.urlencoder.org/ can do this easily) and let us know if that works for you? For instance, the search term some search term -bitcoin becomes some%20search%20term%20-bitcoin and general electric would become general%20electric. We’ll take it as feedback that the URL encoding should be done under the hood so that the user isn’t responsible for knowing to do that.
If that does not solve your issue, could you please share the error that you are seeing, ideally a screenshot and output from the console?
Another problem. If I use General%20Electric it returns things like “electric vehicles” and “General Motors” as well as General Electric. If I enclose General%20Electric in quotes I get an error. What am I doing wrong now?
@rfeigel your API key is shared in this post it’s included in the text file and screenshot. I highly recommend contacting News API support to request it be changed immediately. Their support email is support@newsapi.org according to their website (it took me a second to find their support link, check the footer of the website): https://newsapi.org/
The proper encoding in this case would be %22General%20Electric%22%20AND%20Westinghouse which uses %22 for quotation characters. I pasted "General Electric" AND Westinghouse into https://www.urlencoder.org/ to get that answer.
However, we’ll likely add a feature in the very near future to the News API Advanced Search component that removes the need to perform URL encoding on the query, so please stay tuned!
Thank you @sjporter for maintaining and updating this verified component.
Verification peformed by @Francosinus
Find out more about the verified components project at:
I am probably a bit late to the party, but you could also give the native News API Nodes a try! We used them internally with a few customers for a while and just decided to make them available for free to the community. Just let me know in case you encounter any issues: mail@nodepit.com
@Daniel_Weikert Thanks for the compliment. This kind of feedback is exactly what motivates us to do the things we do
We indeed have a few nodes in the pipeline and a lot of ideas for new nodes, but usually prioritise according to what community and/or partners need. So feel free to let us know what you are missing