Metafield API - Limit

Topic summary

Issue: Increasing the number of product metafields returned via the Shopify REST API.

  • Original request used an incorrect query param: metafields[limits]=250, which still returns only the default 50 records.

  • Correct approach provided: use limit=250 to raise page size, and paginate with since_id to fetch subsequent pages.
    Example: /admin/api/2022-10/products/$Product_ID/metafields.json?limit=250&since_id=[last_metafield_id]
    Tip: since_id=0 starts from the beginning.

  • Current status: When using the correct params (limit=250&since_id=[id]), the requester reports receiving no results. Only the incorrect format returns 50 records. No resolution or confirmed cause identified.

  • Key concepts:
    • Metafields: custom key–value data attached to resources (e.g., products).
    • limit: sets the maximum records per response (up to 250).
    • since_id: paginates by returning records with IDs greater than the provided value.

  • Outcome: No final fix; discussion remains open with unanswered question on why correct pagination returns empty results.

Summarized with AI on February 5. AI used: gpt-5.

Hi

I’ve been working with Shopify API and all works perfect, but I’ve a problem. I can’t increase limit of metafield(GET), limit default is 50. Can everyone help me with?

/admin/api/2022-10/products/$Product_ID/metafields.json?metafields[limits]=250

Thanks

it’s not ‘limits’, it’s ‘limit’

/admin/api/2022-10/products/$Product_ID/metafields.json?limit=250

If your result set comes back with a count of 250 it means you reached the limit of that request.

To get additional records you need to send the id of the last record you received and include ‘since_id’ in your next request

/admin/api/2022-10/products/$Product_ID/metafields.json?limit=250&since_id=[id]

If you set since_id to 0 when you make your call it will start at the beginning of the result set.

Thanks, wbenjamin

But when I use url in this formt /admin/api/2022-10/products/$Product_ID/metafields.json?limit=250&since_id=[id] return nothing. Just return in this format /admin/api/2022-10/products/$Product_ID/metafields.json?metafields[limit]=250, but just 50 metafields.

Thanks