Using the “shoprs” parameter in Google Shopping Merchant API
In DataForSEO’s Merchant API for Google Shopping, you can replicate the exact advanced filtering and sorting options available in the new Google Shopping interface. This works through a special parameter called shoprs
, which you can use in the search_param
field to gain greater flexibility and precision when setting your tasks with the Products endpoint.
Let’s take a closer look at what shoprs
is, how it works, and how to use it.
What is shoprs?
shoprs
is a special parameter used by Google Shopping to handle advanced filtering and sorting in the new Shopping interface. It contains all applied filters and sorting options packed into a protobuf object (Google’s binary data format) and then encoded in Base64 so it can be safely passed in a URL.
Example:
&shoprs=CAESDRILCQAAAICT3MRBGAEqFnNhbXN1bmcgcGhvbmUgczI1IGVkZ2UyGwgFEghPdmVyIDcwMCINEgsJAAAAgJPcxEEYAQ
How to get a shoprs value
- Go to the new Google Shopping results page.
- Enter your keyword and apply the desired filters (price, brand, ratings, etc.) and sorting options.
- Copy the
shoprs
value from the updated URL. - Use this value in the
search_param
field of your task.
Things to note
The shoprs
value is tied to the specific keyword, location, and language for which it was generated. We do not recommend reusing it for other searches as it may not work correctly.
If you include shoprs
in search_param
but also set price_min
, price_max
, or sort_by
separately, these fields will overwrite the shoprs
value.