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:
- Set your SERP API proxy to work in asynchronous mode
- Generate an API token in your account settings
In Postman:
Initiate a request:
- Create a POST request
Set the URL to:
https://api.brightdata.com/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.
- The current URL is for targeting Google SERPs. Selecting another search engine in the playground will change the URL accordingly. - Set the Authorization to Bearer token and enter your API token.
- Set the Body to “raw” and enter the required search parameters.
- Set the content to JSON (will update “content-Type” to “application/json”).
- Send the request and extract the “x-response-id” value from the header.
Retrieve the response:
- Create a GET request.
Set the URL to:
https://api.brightdata.com/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.