Google Shopping API

Google Shopping API

The google_shopping source is designed to retrieve Google Shopping search results.

Api Details

Endpoint GET https://serpapi.abcproxy.com/search

Description Retrieve comprehensive user profile including basic info, account status and optional permission sets.


Request

HTTP Request


curl -X GET "https://serpapi.abcproxy.com/search" \
  -d "engine=google_shopping" \
  -d "q=Coffee" \
  -d "no_cache=false" \
  -d "api_key=YOUR_API_KEY"

API Parameters

Search Query

Name
Type
Required
Description
Example

q

string

Yes

Parameter defines the query you want to search. You can use anything that you would use in a regular Google Shopping search.

coffee

Geographic Location

Name
Type
Required
Description
Example

location

string

No

Korea

uule

string

No

Parameter is the Google encoded location you want to use for the search. uule and location parameters can't be used together.

-

Localization

Name
Type
Required
Description
Example

google_domain

string

No

-

gl

string

No

Amgola-ao

hl

string

No

Akan-ak

Advanced Filters

Name
Type
Required
Description
Example

tbs

string

No

(to be searched) parameter defines advanced search parameters that aren't possible in the regular query field.

-

shoprs

string

No

The parameter defines the helper ID for setting search filters. For search filters to be properly applied, the parameter must be used in combination with the updated q parameter, which now contains the name of the filter applied next to your original query.

sugar free

direct_link

boolean

No

trueorfalse

Pagination

Name
Type
Required
Description
Example

start

int

No

Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., 0 (default) is the first page of results, 60 is the 2nd page of results, 120 is the 3rd page of results, etc.). For the new layout, the parameter is not recommended. To easily retrieve paginated results accurately, it is advisable to follow the link provided in serpapi_pagination.next.

0

num

int

No

Parameter defines the maximum number of results to return. (e.g., 60 (default) returns 60 results, 40 returns 40 results, and 100 (maximum) returns 100 results). Any number greater than maximum number (100) will default to 100. Any number lesser than minimum number (1) will default to 60.

10

Serpapi Parameters

Name
Type
Required
Description
Example

engine

string

Yes

Set parameter to google_shopping (default) to use the Google API engine.

google_shopping

no_cache

boolean

No

Parameter will force SerpApi to fetch the Google Shopping results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

trueorfalse

api_key

string

Yes

Parameter defines the SerpApi private key to use.

YOUR_API_KEY


Response

Success 200

Response Body

{
  "code": 200,
  "search_metadata":
    {
        "total_time_taken":"11.6243",
        "id":"dd8694ab-d5fd-4729-8714-3772d23ae7aa",
        "json_endpoint":"https://webserp.abcproxy.com/files/3b618e3a516b13fa/dd8694ab-d5fd-4729-8714-3772d23ae7aa.json",
        "created_at":"2025-04-02 10:20:15",
        "google_shopping_url":"https://www.google.com/search?q=coffee&tbm=shop",
        "raw_html_file":"https://webserp.abcproxy.com/files/3b618e3a516b13fa/dd8694ab-d5fd-4729-8714-3772d23ae7aa.html",
        "xray_html_file":"https://webserp.abcproxy.com/files/3b618e3a516b13fa/dd8694ab-d5fd-4729-8714-3772d23ae7aa.xray",
   },
  "search_parameters":
    {
        "engine":"google_shopping",
        "q":"Coffee",
        "location_requested":"Austin, Texas, United States",
        "location_used":"Austin,Texas,United States",
        "google_domain":"google.com",
        "api_key":"YOUR_API_KEY",
        "hl":"en",
        "gl":"us",
    }
    "filters":
    [
        {
            "input_type":"checkbox",
            "options":
            [
                  	{
                    "text":"Поблизу",
                    "link":"https://www.google.com/searc30YMYAli3yx9gAg&......UKEwjN8LjVpLiMAxXoLEQIHaoZCcAQ268JKAB6BAgfEAQ",
                    },
                    {
                    "text":"Розпродаж",
                    "link":"https://www.google.com/searc....cIHaoZCcAQ268JKAF6BAgfEAU",
                    },
                	 ......
            ],
            ......
     },
     "shopping_results":
    [
        {
            "reviews":15,
            "title":"Folgers Coffee Ground Classic Roast",
            "product_id":"16914877625280977865",
            "ratting":4.6,
            "source":"Walgreens.com",
            "price":"5,49 USD",
            "extracted_price":5,
            "position":1,
            "product_link":"https://www.google.com/shopping/product/16914877625280977865?gl=us",
        },
        .......
    ],
  }
}

Response Fields

Name
Type
Remark

search_metadata

object

Contains timing and status information

search_parameters

object

Contains query parameters and search context

inline_shopping_results

object []

Inline shopping results

shopping_results

object[]

Shopping result

related_shopping_results

object []

Related shopping results

categories

object []

classification

featured_shopping_results

object[]

Featured shopping results

pagination

object

Paging information

Error Responses

Common Errors

HTTP Status
Error Code
Description

200

400

API Key can not be empty

200

401

Param error

200

402

API Key error

200

403

Insufficient Balance

200

404

Deduction failed

200

405

Failed to record usage count

200

406

Unsupported engine

200

407

Network error

200

408

File not found

200

409

Limit param error

200

410

Build url error

200

411

Failed to QueryRecentRecord

200

412

Failed to find json

200

413

Get html error

200

414

HTML is empty

200

429

Too many request

Error Example

{
  "code": 400,
  "message": "API Key can not be empty"
}

Last updated