ImportJSON icon indicating copy to clipboard operation
ImportJSON copied to clipboard

Trouble with quote marks

Open BabelPR opened this issue 4 years ago • 3 comments

I'm using this script to import json via an API with the API call in the following format:

https://api.scaleserp.com/search?api_key=MY_API_KEY&q="test+search"&google_domain=google.co.uk&location=United+Kingdom&gl=uk&hl=en&search_type=news&time_period=custom&time_period_min=6/1/2021&time_period_max=7/31/2021&page=1&num=100&output=json

I need the quote marks ("test search") to get the API in question to deliver an exact match from a Google search but for some reason the script doesn't like it. It works perfectly well without the quote marks but that doesn't give me the exact match results I need. I can also get the required output by simply pasting that API call into a browser so for some reason the script just doesn't like the quotes.

Any ideas how I can fix this?

Ian

BabelPR avatar Sep 16 '21 12:09 BabelPR

Maybe try replacing those with single quotes.

Chaffy-0 avatar Jan 21 '22 14:01 Chaffy-0

any solution for that, tried with single quotes but doesn't work either

msb07 avatar Jan 25 '22 22:01 msb07

Yes, use the encoded format for the quote mark I.e. %22 instead of “

BabelPR avatar Jan 25 '22 22:01 BabelPR