Callback Mechanism

This documentation explains how to use the NetNut SERP API to test callback functionality by sending a POST request to your own endpoint.

The callbackUrl parameter allows you to receive the SERP API response directly to your own API endpoint.

When this parameter is included in the request, the API returns a confirmation response indicating that the request has been received. Once the request is completed, the SERP API sends the final results to the specified callbackUrl.


Environments

Base URL: https://serp-api.netnut.io Endpoint: /search Method: GET


Param

Add callbackUrl={your_endpoint} to the request URL.

Example:

https://serp-api.netnut.io/search?q=netnut&callbackUrl=https://my-api.com

Example Request

curl --location 'https://serp-api.netnut.io/search?hl=en&gl=us&q=netnut&callbackUrl=https://my-api.com' \
--header 'Authorization: Basic base64(username:password)'

Initial API Response

When callbackUrl is provided, the API returns HTTP 202 (Accepted) with a confirmation response:


Callback Response

Once the request is completed, the SERP API sends the final response to your endpoint using the POST method.

Example payload sent to your endpoint:


Things to Consider

  • callbackUrl must be a publicly accessible endpoint that can receive POST requests.

  • The initial response includes a traceId you can use for tracking.

  • The callback payload follows the same response structure as the SERP API response.

Last updated