How to run SERP API with Postman

Ori Goren-Bar 阳锐
Ori Goren-Bar 阳锐
  • Updated

Postman is an API platform for building and using APIs. It is available as SaaS or as a desktop application.

To configure SERP API with Postman, follow these steps:

In the Bright Data control panel:

  1. Set your SERP API proxy to work in asynchronous mode
  2. Generate an API token in your account settings

In Postman:

Initiate a request:

  1. Create a POST request
    Set the URL to:
    https://brightdata.com/api/serp/req?customer={CUSTOMER_ID}&zone={CUSTOMER_ASYCN_PROXY}

    Notes:
    - You can copy the URL and parameters from the SERP API playground when your proxy is set to asynchronous mode.

    mceclip0.png
    - The current URL is for targeting Google SERPs. Selecting another search engine in the playground will change the URL accordingly.
  2. Set the Authorization to Bearer token and enter your API token.
  3. Set the Body to “raw” and enter the required search parameters.
  4. Set the content to JSON (will update “content-Type” to “application/json”).

    mceclip1.png
  5. Send the request and extract the “x-response-id” value from the header.
    mceclip2.png

Retrieve the response:

  1. Create a GET request.
    Set the URL to:
    https://brightdata.com/api/serp/get_result?customer={CUSTOMER_ID}&zone={CUSTOMER_ASYCN_PROXY}&output=json&response_id={RESPONSE_ID}
    Notes:
    - In {RESPONSE_ID} enter the value you got in “x-response-id” from your first POST request.
    - The output in the URL can be set to “HTML” or “JSON”.
    - You can copy the URL and parameters from the SERP API playground when your proxy is set to asynchronous.
Share this

Was this article helpful?

0 out of 0 found this helpful