> For the complete documentation index, see [llms.txt](https://help.netnut.io/netnut-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.netnut.io/netnut-documentation/~/revisions/opZiiwKf3Lsw9UUdqX4a/netnut-scraper-apis/serp-api/google-search/getting-started.md).

# Getting Started

This document provides information about the API endpoints, supported environments, and available GET parameters for the NetNut SERP 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`

### 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                                                                                                                                                                                                                                              |
| ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `num`   | Optional | The 'num' parameter defines the maximum number of results to return for the query. For example `10` (default) returns 10 results, `20` returns 20 results, and `60` returns 60 results. We support max results of 100 for each query                     |
| `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.). |

#### &#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>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>

### 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>

We currently only support JSON. Here is an example of the API response schema:

```
{
    "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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.netnut.io/netnut-documentation/~/revisions/opZiiwKf3Lsw9UUdqX4a/netnut-scraper-apis/serp-api/google-search/getting-started.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
