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

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

  • Base URL: https://serp-api.netnut.io

  • Endpoint: /search

API Parameters & Specifications

Search Query

NameStatusDescription

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:).

Pagination

NameStatusDescription

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.).

Geographic Location

NameStatusDescription

uule

Optional

The 'uule' parameter is the Google encoded location you want to use for performing the Google search. Click here to generate a UULE

Localization

NameStatusDescription

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 the Google languages page for a full list of supported Google languages.

Advanced Filters

NameStatusDescription

rawHtml

Optional

The 'rawHtml' parameter defines the final output you want. It can be set to true or false to get the raw html response.

safe

Optional

The 'safe' parameter defines the level of filtering for adult content. It can be set to active or off, by default Google blurs explicit content.

filter

Optional

The 'filter' parameter allows defining whether the filters for 'Omitted Results' and 'Similar Results' are enabled or disabled. Setting the parameter to 1 (default) enables these filters, and setting the parameter to 0 disables these filters.

nfpr

Optional

Parameter defines the exclusion of results from an auto-corrected query that is spelled wrong. It can be set to 1 to exclude these results, or 0 to include them (default).

device

Optional

The 'device' parameter defines the device to use to get the Google search results. The parameter can be set to desktop (default) to use a regular browser, tablet to use a tablet browser (currently using iPads), or mobile to use a mobile browser (currently using iPhones).

API Results HTTP Response

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
        }
    ]
}

Last updated

Copyright NetNut LTD