What does the &q=%s mean (and do) at the end of a Google custom search URL like http://www.google.com/search?q=@@@&tbs=qdr:y&q=%s?

Background: I'm using Anysearch Safari Extension (https://github.com/mcs07/AnySearch-safari-extension) and defining a custom search engine (using the url above) to return only results for the past year straight from my Safari menu bar. Using this setup, it seems to work without the &q=%s at the end, but not with it.

  • It's a query string. What it does is any thing the developer wants to do with it... What if does in Google today may be different tomorrow – Dave Aug 9 '17 at 14:56
  • The URL has errors becuse ir includes q= two times. What Is the source of such URL? – Rubén May 9 '18 at 22:54

I think it is less about what it does for Google and more about what it is doing to your search. % is generally a wildcard character used in SQL to mean 'A substitute for zero or more characters'. The plugin may or may not be trying to parse the % character as a wildcard. % is also an url encoding character so if you perform a Google search on say '?me on this' the URL string will look like 'q=%3Fme+on+this'. So the plugin may also be trying to parse it as a URL encoding character.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.