Format of URL for advanced Google search engine query

10.8k Views Asked by At

I am trying to find the advanced search query for HTML to automatically search the results.

For example, a plain google.com query is https://google.com/search, while image search query is https://images.google.com/images

I can't find the query to automatically search the values from 4 text boxes through the Advanced Search engine.

The functionality I am looking for is that when I try searching for keywords from my web page it should go through the advanced search engine:

<form action="https://www.google.com/advanced_search?as_q=q&as_epq=r&as_oq=s&as_eq=t">
3

There are 3 best solutions below

0
Bijin Abraham On BEST ANSWER

I found an alternative to going through the Advanced Search engine. The Advanced Search has a few parameters that are passed in the URL for a search query:

  • all these words: the operator passed is as_q like this.
<input class="" type="text" name="as_q"> 
  • this exact word or phrase: the operator passed is as_epq
  • any of these words: the operator passed is as_oq
  • none of these words: the operator passed is as_eq

So I named the HTML textboxes with the corresponding names and concatenated the above parameters to the search query.

0
Guna On

If you are trying to create HTML page, I would like to share this code.

You can add a space for a right indentation using & nbsp;.

Here is an example:

<form action="https://google.com/search">
             All these words:<input type="text" name="as_q" >
            <br><br>Exact word/phrase:<input type="text" name="as_epq" >
            <br><br>Any of these words:<input type="text" name="as_oq" >
            <br><br>None of these words:<input type="text" name="as_eq" >
           <br><br> <input type="submit" value="advanced search">
</form>
0
KevinCK On

For the first section of the advanced search, try

<form action="https://google.com/search" name="f">
    <div class="field">
        <label for="field1">all these words:</label>
        <input type="text" class="textinput" id="field1" value=""  name="as_q">
    </div>
    <br>
    <div class="field">
        <label for="field2">this exact word or phrase: </label>
        <input type="text" class="textinput" id="field2" value=""  name="as_epq">
    </div>
    <br>
    <div class="field">
        <label for="field3">any of this words: </label>
        <input type="text" class="textinput" id="field3" value=""  name="as_oq">
    </div>
    <br>
    <div class="field">
        <label for="field4">none of these words: </label>
        <input type="text" class="textinput" id="field4" value=""  name="as_eq">
    </div>
    <br>
    <div class="field">
        <label for="field5">numbers ranging from: </label>
        <input type="text" class="textinput1" id="field5" value=""  name="as_nlo">
        <span class="seperator">to</span>
        <input type="text" class="textinput2" id="field5" value=""  name="as_nhi">
    </div>
    <input type="submit" value="advanced search">
</form>