Google Shopping API

GET   /api/v1/search?engine=google_shopping

API Parameters

Search Query

  • Name
    q
    Required
    Required
    Description

    Specifies the search query, similar to performing a regular Google search. Filters embedded in the q parameter act as hints rather than strict filters. If there are too few matching items, results outside the filters may appear. Examples of usage:

    • Search by price: tshirt under $30, skinny fit kids jeans between $15 and $30, charizard over $300.
    • Search by size: mens size 8.5 nike air.
    • Search by color: Playstation white.
    • Search nearby stores: Apparel nearby.
    • Search by condition: iphone used, macbook new.
    • Search by brand: prada dress, gucci shoes.
    • Search discounted products: laptop on sale, headphones on sale.

Localization

  • Name
    google_domain
    Required
    Optional
    Description

    Defines the Google domain for the search. The default is google.com. Check the full list of supported Google google_domain domains.

  • Name
    gl
    Required
    Optional
    Description

    The default parameter us defines the country of the search. See the full list of Google Shopping gl countries.

  • Name
    hl
    Required
    Optional
    Description

    The default parameter en defines the interface language of the search. Check the full list of supported Google hl languages.

Geographic Location

  • Name
    location
    Required
    Optional
    Description

    Defines from where you want the search to originate. If several locations match the requested location, the most popular one is selected. Head to the Locations API for more precise control.

  • Name
    uule
    Required
    Optional
    Description

    Defines the Google encoded location for the search. SearchApi automatically generates the uule parameter when the location parameter is used, but it can be overwritten directly. uule and location cannot be used together.

Filters

  • Name
    shoprs
    Required
    Optional
    Description

    Applies strict filtering rules based on encoded values. Example: CAEYFyoDcHM1MhwIFxISUHJpY2U6IGxvdyB0byBoaWdoKgQQARgBYAKIAQE sorts products by price (low to high). Filters provided in the JSON response can be used in subsequent requests to apply additional filters iteratively.

  • Name
    price_min
    Required
    Optional
    Description

    Specifies the minimum price of the products returned. This parameter must include the currency. For example, 2.50 filters results to products priced at $2.50 or higher. Must be used as a strict filter before applying shoprs.

  • Name
    price_max
    Required
    Optional
    Description

    Specifies the maximum price of the products returned. This parameter must include the currency. For example, 100 filters results to products priced at $100 or less. Must be used as a strict filter before applying shoprs.

  • Name
    condition
    Required
    Optional
    Description

    Filters product condition. Options include: new for new products, and used for used items.

Pagination

  • Name
    page
    Required
    Optional
    Description

    Indicates which page of results to return. The default is 1.

Engine

  • Name
    engine
    Required
    Required
    Description

    Defines the engine that will be used to retrieve real-time data. It must be set to google_shopping.

API key

  • Name
    api_key
    Required
    Required
    Description

    Authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

Zero Data Retention

  • Name
    zero_retention
    Enterprise Only
    Enterprise Only
    Required
    Optional
    Description

    Set this parameter to true to disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.

API Examples

Full Response

Full Response
GET
https://www.searchapi.org/api/v1/search?engine=google_shopping&gl=us&hl=en&location=California%2CUnited+States&q=PS5
Request
import requests

url = "https://www.searchapi.org/api/v1/search"
params = {
  "engine": "google_shopping",
  "q": "PS5",
  "gl": "us",
  "hl": "en",
  "location": "California,United States"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_Rrb28K9xoXv9c0jPpzE1BA7Q",
    "status": "Success",
    "created_at": "2024-07-12T16:54:48Z",
    "request_time_taken": 2.48,
    "parsing_time_taken": 0.02,
    "total_time_taken": 2.5,
    "request_url": "https://www.google.com/search?q=PS5&oq=PS5&gl=us&hl=en&tbm=shop&num=60&uule=w+CAIQICIYQ2FsaWZvcm5pYSxVbml0ZWQgU3RhdGVz&ie=UTF-8",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_Rrb28K9xoXv9c0jPpzE1BA7Q.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_Rrb28K9xoXv9c0jPpzE1BA7Q"
  },
  "search_parameters": {
    "engine": "google_shopping",
    "q": "PS5",
    "location": "California,United States",
    "location_used": "California,United States",
    "google_domain": "google.com",
    "hl": "en",
    "gl": "us"
  },
  "search_information": {
    "query_displayed": "PS5"
  },
  "filters": [
    {
      "type": "Sort by",
      "options": [
        {
          "text": "Price: low to high",
          "shoprs": "CAEYFyoDcHM1MhwIFxISUHJpY2U6IGxvdyB0byBoaWdoKgQQARgBYAKIAQE"
        },
        ...
      ]
    },
    {
      "type": "Category",
      "options": [
        {
          "text": "PlayStation Controllers",
          "shoprs": "CAEYCSoDcHM1MhsICRIXUGxheVN0YXRpb24gQ29udHJvbGxlcnNgAg"
        },
        ...
      ]
    },
    ...
  ],
  "shopping_ads": [
    {
      "position": 1,
      "block_position": "top",
      "title": "Playstation 5 Digital Console Slim - Marvel's Spider-Man 2 Bundle, White",
      "seller": "Walmart",
      "link": "https://www.walmart.com/ip/Playstation-5-Digital-Console-Slim-Marvel-s-Spider-Man-2-Bundle/5395472295?wmlspartner=wlpa&selectedSellerId=147",
      "price": "$459.99",
      "extracted_price": 459.99,
      "rating": 4.7,
      "reviews": 5000,
      "image": "https://encrypted-tbn1.gstatic.com/shopping?q=tbn:ANd9GcQMIFNwj3G5eCHTg3cDhtbveRuICQVC2F5Hp4vzkuGwqGS0gRic26FjqmIhjqAvFNnKXHFtvp5h7sogvM-UGHGy4ww590e3GGBzQ2RxAgJ0WSy9ujZSUe4MGiCDbi49BYFuRVR0xA&usqp=CAc"
    },
    ...
  ],
  "shopping_results": [
    {
      "position": 1,
      "product_id": "8039622388823297908",
      "title": "Sony Playstation 5 Digital",
      "product_link": "https://www.google.com/shopping/product/8039622388823297908?gl=us&hl=en",
      "seller": "GameStop",
      "offers": "3+",
      "extracted_offers": 3,
      "offers_link": "https://www.google.com/shopping/product/8039622388823297908/offers?gl=us&hl=en&uule=w+CAIQICIYQ2FsaWZvcm5pYSxVbml0ZWQgU3RhdGVz",
      "price": "$429.99",
      "extracted_price": 429.99,
      "rating": 4.4,
      "reviews": 9400,
      "delivery": "Free by 7/16",
      "durability": "Pre-owned",
      "thumbnail": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcT7iEgHamefjZlmViMlw1HwT0rpjGuX9D_SOcC7o-iehd5IVtjFKnUzgvYJkm7FGtnn9DJkEIWvcGpuzgZ9p9PeBroASb7-8peYCh4cdM0",
      "thumbnail_video": "https://www.gstatic.com/search-ar-dev/renders/11313726882518828376_ml/837011672042496373_v5/square_video.mp4"
    },
    ...
  ]
}

Shopping Results

Shopping Results
GET
https://www.searchapi.org/api/v1/search?engine=google_shopping&gl=us&hl=en&location=New+York%2CUnited+States&q=Iphone
Request
import requests

url = "https://www.searchapi.org/api/v1/search"
params = {
  "engine": "google_shopping",
  "q": "Iphone",
  "gl": "us",
  "hl": "en",
  "location": "New York,United States"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "shopping_results": [
    {
      "position": 1,
      "product_id": "5458859202991111437",
      "title": "Apple iPhone 15 Pro Max",
      "product_link": "https://www.google.com/shopping/product/5458859202991111437?gl=us&hl=en",
      "seller": "T-Mobile",
      "offers": "10+",
      "extracted_offers": 10,
      "offers_link": "https://www.google.com/shopping/product/5458859202991111437/offers?gl=us&hl=en&uule=w+CAIQICIYQ2FsaWZvcm5pYSxVbml0ZWQgU3RhdGVz",
      "price": "$399.99 now",
      "extracted_price": 399.99,
      "installment": {
        "down_payment": "$399.99 now",
        "extracted_down_payment": 399.99,
        "months": "24",
        "extracted_months": 24,
        "cost_per_month": "$50/mo",
        "extracted_cost_per_month": 50
      },
      "rating": 4.5,
      "reviews": 17000,
      "delivery": "Free delivery",
      "thumbnail": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcSWca-hAFk02X8lJn-3ez8iBbjWOmUNt5RZ_5EwGXt5sCHUix-srIxGmqUuBKcZgH-x_wqfG6Md6qjJ_TaXh5ZbEUkYT0Yc7o7e9I2EbpuIze1Eg7M3b6w1Uw"
    },
    ...
  ]
}
Popular Products
GET
https://www.searchapi.org/api/v1/search?engine=google_shopping&gl=us&hl=en&location=New+York%2CUnited+States&q=Lenovo
Request
import requests

url = "https://www.searchapi.org/api/v1/search"
params = {
  "engine": "google_shopping",
  "q": "Lenovo",
  "gl": "us",
  "hl": "en",
  "location": "New York,United States"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "popular_products": [
    {
      "position": 1,
      "product_id": "12662605563035131269",
      "title": "Lenovo Tab M8 4th Gen",
      "product_link": "https://www.google.com/shopping/product/12662605563035131269?gl=us&hl=en",
      "seller": "Lenovo",
      "offers": "10+",
      "extracted_offers": 10,
      "offers_link": "https://www.google.com/shopping/product/12662605563035131269/offers?gl=us&hl=en&uule=w+CAIQICIWTmV3IFlvcmssVW5pdGVkIFN0YXRlcw",
      "price": "$85.49",
      "extracted_price": 85.49,
      "original_price": "$100",
      "extracted_original_price": 100.0,
      "rating": 4.3,
      "reviews": 959,
      "tag": "14% OFF",
      "delivery": "Free delivery",
      "thumbnail": "https://encrypted-tbn2.gstatic.com/shopping?q=tbn:ANd9GcTJsI5xtfkZtIgEVeSbuLr0W2SLAUrqx-ggbQhAlFLy2dqXvToE-7c5Rcwv_XhTu7T6RqDPO3_GirH5aHBWvoQ6ikOR2O2w9YfkAc9Wcso"
    },
    ...
  ]
}

Shopping Ads

Shopping Ads
GET
https://www.searchapi.org/api/v1/search?engine=google_shopping&gl=us&hl=en&location=California%2CUnited+States&q=Android
Request
import requests

url = "https://www.searchapi.org/api/v1/search"
params = {
  "engine": "google_shopping",
  "q": "Android",
  "gl": "us",
  "hl": "en",
  "location": "California,United States"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "shopping_ads": [
    {
      "position": 1,
      "block_position": "top",
      "title": "TCL TAB 8 LE (with 24 monthly payments + plan)",
      "seller": "T-Mobile",
      "link": "https://www.t-mobile.com/tablet/tcl-tab-8-le?sku=610214676276",
      "price": "$0.00 now",
      "extracted_price": 0,
      "installment": {
        "down_payment": "$0.00 now",
        "extracted_down_payment": 0,
        "months": "24",
        "extracted_months": 24,
        "cost_per_month": "$7.00/mo",
        "extracted_cost_per_month": 7
      },
      "image": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcTEIfd7wek01FCqKnd7jj-7XbCJ2oBkkyNghqsAOITDqSucGCkSPgydPRKAAT1SGAjs_8pw4U_LsyZLey_z68o5NbHn-xiMl_Bbe-Qd7eORPHn7iUTWmufqNUekoxC6oc97fsCZb1lTC-0&usqp=CAc"
    },
    ...
  ]
}

Filters

Filters
GET
https://www.searchapi.org/api/v1/search?engine=google_shopping&gl=us&hl=en&location=Washington%2CUnited+States&q=Shoes
Request
import requests

url = "https://www.searchapi.org/api/v1/search"
params = {
  "engine": "google_shopping",
  "q": "Shoes",
  "gl": "us",
  "hl": "en",
  "location": "Washington,United States"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "filters": [
    {
      "type": "Sort by",
      "options": [
        {
          "text": "Price: low to high",
          "shoprs": "CAEYFyoFc2hvZXMyHAgXEhJQcmljZTogbG93IHRvIGhpZ2gqBBABGAFgAogBAQ"
        },
        ...
      ]
    },
    {
      "type": "Department",
      "options": [
        {
          "text": "Men's",
          "shoprs": "CAEYASoFc2hvZXMyFQgBEgVNZW4nczoKCICjPhCBoz4wBVjmpyBgAg"
        },
        ...
      ]
    },
    ...
  ]
}