The Shopify Collections API lists collections from a public Shopify shop. query is the shop domain or any URL on that shop, such as decathlon.com or https://www.decathlon.com. A collection link on the same host selects that shop too. shopify.com and apps.shopify.com are rejected.
The shop's public /collections.json feed is returned as results and pagination.
GET https://api.piloterr.com/v2/shopify/collections?query=decathlon.com&page=1&limit=30
| Parameter |
Type |
Required |
Description |
query |
string |
yes |
Shop domain or shop URL. decathlon.com and https://www.decathlon.com/collections/camping-tents both read the Decathlon shop. |
page |
integer |
no |
Page number, starting at 1. Omit it for page 1. page=2 is the next slice. |
limit |
integer |
no |
Collections on this page. Default 30. Maximum 250. |
| Field |
Type |
Description |
results[].title |
string |
Collection title |
results[].handle |
string |
Collection handle |
results[].url |
string |
Collection URL on the shop |
results[].description |
string |
Collection description |
results[].products_count |
number |
Products in the collection |
results[].image |
object or null |
Collection image when the shop sends one |
results[].published_at |
string |
Publish time |
results[].updated_at |
string |
Update time |
pagination.page |
number |
Requested page |
pagination.per_page |
number |
Requested limit |
pagination.total_results |
null |
The shop JSON does not include a total |
pagination.total_pages |
null |
The shop JSON does not include a page count |
pagination.next |
string or null |
Next shop JSON URL when this page is full, otherwise null |
- List a shop's collections before opening each one
- Track collection titles and product counts
- Follow
pagination.next until the shop runs out of collections
| Code |
Meaning |
| 400 |
Missing query, a domain that is not a shop, or page / limit out of range |
| 403 |
The shop blocked the JSON feed |
| 404 |
This page has no collections |
| 500 |
The feed could not be fetched |