# Google Search

This document provides information about the API, and available GET parameters for the NetNut Google Search API. \
The API allows you to retrieve search engine results pages (SERPs).

### Authentication[​](https://serp-api.netnut.io/docs/SERP/Getting%20Started#authentication) <a href="#authentication" id="authentication"></a>

To access the NetNut API, you must provide basic authentication credentials using the username and password provided by NetNut. Include these credentials in the HTTP request headers as follows:

`Authorization: Basic base64(username:password)`

Where base64(username:password) is the Base64-encoded string of your username and password concatenated with a colon (`:`) separator.

### Environments[​](https://serp-api.netnut.io/docs/SERP/Getting%20Started#environments) <a href="#environments" id="environments"></a>

* Base URL: `https://serp-api.netnut.io`
* Endpoint: `/search`&#x20;
* Method: `GET`

### API Parameters & Specifications[​](https://serp-api.netnut.io/docs/SERP/Getting%20Started#api-parameters--specifications) <a href="#api-parameters--specifications" id="api-parameters--specifications"></a>

#### &#x20;Search Query[​](https://serp-api.netnut.io/docs/SERP/Getting%20Started#----search-query-) <a href="#search-query" id="search-query"></a>

| Name | Status   | Description                                                                                                                                                             |
| ---- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `q`  | Required | The 'q' parameter defines the query you want to search for. You can use any string that you would use in a regular Google search (e.g., `inurl:`, `site:`, `intitle:`). |

#### &#x20;Pagination[​](https://serp-api.netnut.io/docs/SERP/Getting%20Started#--pagination-) <a href="#pagination" id="pagination"></a>

| Name         | Status   | Description                                                                                                                                                                                                                                              |
| ------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `start`      | Optional | The 'start' parameter defines the results offset. It allows skipping the given number of results. It is used for pagination. (e.g., `0` (default) is the first page of results, `10` is the 2nd page of results, `20` is the 3rd page of results, etc.). |
| `resultsNum` | Optional | <p>Specifies how many results to retrieve.<br>Data is gathered via paginated requests behind the scenes  and combined into one HTML/JSON file.</p>                                                                                                       |
| `sid`        | Optional | <p>The <code>sid</code> parameter defines a session identifier used to keep the same IP across multiple requests.<br>It is typically used to maintain session consistency when retrieving paginated results.</p>                                         |

#### &#x20;Geographic Location[​](https://serp-api.netnut.io/docs/SERP/Getting%20Started#--geographic-location--) <a href="#geographic-location" id="geographic-location"></a>

| Name   | Status   | Description                                                                                                                                                                     |
| ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `uule` | Optional | The 'uule' parameter is the Google encoded location you want to use for performing the Google search. [**Click here** ](https://indexguru.com/uule-generator)to generate a UULE |

#### &#x20;Localization[​](https://serp-api.netnut.io/docs/SERP/Getting%20Started#--localization--) <a href="#localization" id="localization"></a>

| Name           | Status   | Description                                                                                                                                                                                                                                                                                                |
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `googleDomain` | Optional | The 'googleDomain' parameter defines the Google domain to use for the Google search. The default is `www.google.com`. Please ensure you add "www" before the domain name.                                                                                                                                  |
| `gl`           | Optional | The 'gl' parameter defines the country to use for the Google search. It is a two-letter country code. For example - use `us` for the United States, `uk` for United Kingdom, etc.                                                                                                                          |
| `hl`           | Optional | The 'hl' parameter defines the language to use for the Google search. It is a two-letter language code. For example - use `en` for English, `de` for German, etc. [**Access** ](https://cloud.google.com/translate/docs/languages)the Google languages page for a full list of supported Google languages. |

#### &#x20;Advanced Filters[​](https://serp-api.netnut.io/docs/SERP/Getting%20Started#--advanced-filters--) <a href="#advanced-filters" id="advanced-filters"></a>

<table><thead><tr><th>Name</th><th width="222">Status</th><th>Description</th></tr></thead><tbody><tr><td><code>rawHtml</code></td><td>Optional</td><td>The 'rawHtml' parameter defines the final output you want. It can be set to <code>1 (true)</code> or <code>0 (false)</code> to get the raw html response.<br>for receiving html only (without parsing) set it to <code>2 (only)</code></td></tr><tr><td><code>url</code></td><td>Optional</td><td><p>You can use the <code>url</code> parameter to perform a direct search by passing a Google search URL in the following format:<br><code>https://www.google.com/search?{your_query}</code></p><p>If additional parameters are provided alongside the <code>url</code> , they will override any overlapping parameters defined within the URL itself.</p></td></tr><tr><td><code>tbs</code></td><td>Optional</td><td>Filters the organic results based on when they were published or last updated.</td></tr><tr><td><code>safe</code></td><td>Optional</td><td>The 'safe' parameter defines the level of filtering for adult content. It can be set to <code>active</code> or <code>off</code>, by default Google blurs explicit content.</td></tr><tr><td><code>filter</code></td><td>Optional</td><td>The 'filter' parameter allows defining whether the filters for 'Omitted Results' and 'Similar Results' are enabled or disabled. Setting the parameter to <code>1</code> (default) enables these filters, and setting the parameter to <code>0</code> disables these filters.</td></tr><tr><td><code>nfpr</code></td><td>Optional</td><td>Parameter defines the exclusion of results from an auto-corrected query that is spelled wrong. It can be set to <code>1</code> to exclude these results, or <code>0</code> to include them (default).</td></tr><tr><td><code>device</code></td><td>Optional</td><td>The 'device' parameter defines the device to use to get the Google search results. The parameter can be set to <code>desktop</code> (default) to use a regular browser, tablet to use a tablet browser (currently using iPads), or <code>mobile</code> to use a mobile browser (currently using iPhones).</td></tr></tbody></table>

{% hint style="info" %}
Customers may choose to request all 10 pages at once (`ResultNum=100`). In such cases, all 10 pages are sent concurrently, and therefore all requests are billable—regardless of the actual number of results returned for the specific search term.
{% endhint %}

### API Results HTTP Response[​](https://serp-api.netnut.io/docs/SERP/Getting%20Started#api-results-http-response) <a href="#api-results-http-response" id="api-results-http-response"></a>

```
{
    "url": "string",
    "general": {
        "searchEngine": "string",
        "resultsCount": 0,
        "searchTime": 0.0,
        "mobile": false,
        "searchType": "string",
        "pageTitle": "string",
        "timestamp": "string"
    },
    "input": {
        "originalUrl": "string",
        "userAgent": "string",
        "jobId": "string"
    },
    "organic": [
        {
            "title": "string",
            "description": "string",
            "link": "string",
            "extensions": [
                {
                    "type": "string",
                    "text": "string",
                    "extended": false,
                    "link": "string",
                    "rank": 0
                }
            ],
            "displayLink": "string",
            "rank": 0,
            "globalRank": 0
        }
    ],
    "pagination": {
        "currentPage": 0,
        "nextPage": 0,
        "nextPageLink": "string",
        "nextPageStart": 0
    },
    "related": [
        {
            "listGroup": false,
            "link": "string",
            "text": "string",
            "rank": 0,
            "globalRank": 0
        }
    ],
    "peopleAlsoAsk": [
        {
            "question": "string",
            "questionLink": "string",
            "answerSource": "string",
            "answerLink": "string",
            "answerDisplayLink": "string",
            "answerHtml": "string",
            "answers": [
                {
                    "type": "answer",
                    "text": "string",
                    "rank": 0
                }
            ],
            "rank": 0,
            "globalRank": 0
        }
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.netnut.io/netnut-documentation/netnut-scraper-apis/serp-api/google-scraper/google-search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
