Programs that respect your privacy

Search Engine Syntax

Privacy Browser has the ability for the user to select a custom search engine. The purpose of this page is to explain the search engine URL syntax.

Privacy Browser expects to be able to append a search term to the search custom URL. What this URL looks like varies based on the search engine, but it will typically end in something similar to ?q= or ?query=. For example, the Startpage search URL is https://www.startpgae.com/do/search?query=.

Finding this URL isn’t always straightforward. Some search engines list it in their official documentation. Others might be documented on third-party sites. Sometimes you can determine the search URL by performing searches on the website or through trial and error. For example, if you are using searx.ninja as a Searx instance, the following is the search URL: https://searx.ninja/?q=.

It can be helpful to note that in a URL, the ? is is a separator that indicates the beginning of a list of query strings, which are separated from each other by either an & or a ;. According to the HTML spec, the order of these query strings does not matter. If you are using a search URL that contains other query strings, make sure that the last one is the search and that it ends in = so that Privacy Browser can append the search term. For example, if using Searx with saved preferences indicated in the URL, the search URL will look something like the following:

https://searx.ninja/?preferences=eJxtVMFu2zAM_Zr5YmRY18NOPgwbhhUY0GJJdxUYibY5S6InyU68rx8dx4mS7mAZpKjHRz5KGhI2HAhj1aDHALaw4JsBGqzQb163hWUNdjYKGBJrdr3FhJUZdDd_DRfkJFr1gY9TtQsDFg5Ty6Z6ed7uigg1RoSg2-pDkVp0WHHUEIqAcbApKvbK40El2FffwEYsDJOSTbYjhopBzPccmuJ0ahPTJGQsN6TZ4LgxELrCUIS9RaPQN-SllMTdxIljyx14pUYyyPHdxy8d6Q5iVKomi7OjhX2AeVGKktgTtMxKnVshjoa5sVgKQzk1r6cgb_CYR2mtN2nMEvkJQCk3RNJXkGU3i_pzAJ9ynDqAA0v7gGc-DTVSGcSbKEzMNt54Ah_I5J4ZBMJUzp5IN8GXJlx4nPmddBT_8hc_6CbycO3WXVtXd4PYJXKnozNp8pCBu8mhY6GSAvhoZd7Mf9mszVpad-GwmGsq6LvSUQi8CrZSvK-ltzCV0PeZ1gvSJXA9ueatA2IZuU4HCFgaCqiT0D7n4R59wJ4zPDMY9G9nJfcsgz9PajkvZ6w9pb3cHExne_BR6MY2q_rhmBkR_3pwOe7K_aqUpKFRJLxR-k6vtdKRQVJH1gS2dGgI7vrmeCTMB8Txb9H4dlLJdwQ643CDMKe6Znx4fPx0zPAwTY69lbt6wSzQ397h663u7SCuWD2LBuqz1ijj8vX5SR6JQ6CEgveL3MZSh6rl1OE0p3jyNXnZVVEHtlf4FWx7kmZ-ffTyBE4qohXN5ez33e5lm8Fv0dZKADk4SMR-xt8FEAmDev35QyKlYxgK6TcK9D_gKgGi&q=

Note that in the case of Searx, if you include custom search settings in the URL, you will also need to enable cookies, as the custom settings are removed from the URL and converted into a cookie when the search is performed.

As another example, the base search string for Google is https://www.google.com/search?q=. Google has a (fairly) undocumented option to request that it disable all interfaces that require JavaScript. The query string code for this is gbv=1. This can be added before the q= query string with a & separator like so: https://www.google.com/search?gbv=1&q=.

Last updated


One response to “Search Engine Syntax”