For the complete documentation index, see llms.txt. This page is also available as Markdown.

Google Shopping

API Playground is ScraperAPI's request builder for testing and configuring scraping requests. In this tutorial, you will use the API Playground to monitor Google Shopping prices for any query list. By the end, you will have shopping results with price, retailer, and delivery options for every query you track, so you can spot pricing shifts and new entrants before they affect your positioning.


Step 1: Configure the Google Shopping endpoint

Open the API Playground from the left sidebar.

  1. Select scraping method: Structured Data Endpoints.

  2. In the endpoint dropdown, select Google Shopping.

  3. Enter query running shoes. Set Country code to us.

  4. Review the Summary panel on the right to understand the cost of the job before you run it.

  5. Scroll down to the generated code and click Try it.

The Playground runs the request and shows the response inline. Each entry in shopping_results includes position, title, price, extracted_price, source, and delivery_options. Use extracted_price for numeric comparisons — price is a formatted string.

Use the language dropdown to switch to Python, Node.js, PHP, Ruby, or Java. Click Copy to clipboard to run the request in your own terminal instead.

Step 2: Additional options and filters

Use Additional options & filters to fine-tune your request. The Playground adds the relevant parameters to the generated code automatically.

  • Country code adds country_code. Targets a specific country's Google Shopping results.

  • Domain adds domain. Sets the Google domain to search (e.g. co.uk, com.au).

  • Output format adds output_format. Returns results as json (default) or csv.

  • UULE adds uule. Encodes a specific city for local search results. Generate a UULE value using a UULE encoder tool.

  • Number of results adds num. Sets how many shopping results to return per page.

Some parameters increase the cost per request. Check the Summary panel before committing to a configuration at scale.

Step 3: Batch across queries and markets

Switch the scraping method to Async in the Playground and paste your queries as full structured endpoint URLs, one per line:

The response returns a statusUrl per job that you can use to track progress.

Step 4: Poll for results

Async jobs run in the background. Use the statusUrl from the batch response to check progress. When status is finished, the response.body field contains your scraped data.

Step 5: Schedule daily runs

To run your batch automatically on a recurring schedule, add it to your crontab. The example below runs every day at 6am.


More API tutorials

Last updated