Skip to content

Instantly share code, notes, and snippets.

@markpapadakis
Created October 18, 2014 12:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markpapadakis/3295307527d2f2b8e059 to your computer and use it in GitHub Desktop.
Save markpapadakis/3295307527d2f2b8e059 to your computer and use it in GitHub Desktop.

I and many others do not get any Wikipedia or web search results on Spotlight, neither in Yosemite, nor in iOS 8.0+. Apparently, it's because Apple doesn't want us to get any results.

Try

curl "https://api.smoot.apple.com/search?q=Apple&locale=en-US&calendar=gregorian&key=andromeda" -H "X-Apple-UI-Scale: 1.000000"   -A "(OS X 14A389) Spotlight/916" -H "Accept-Language: en-us"

Chances are you are getting:

[{"status":"NO_RESULTS","query":"Apple","prefix":"Apple"}]

I tried the same HTTP request from one of our remote nodes in the UK, and, what do you know, it worked: I got back lots of nice results in JSON representation. I tried again on my laptop, making sure that I was connecting to the same IP address, to no avail. Even setting 'X-Forwarded-For: UK ip address` didn't do the trick.

So Apple, for some reason, is providing results for some regions, but not for others. It's definitely not an OS/Spotlight issue, per se.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment