Sample - Stripe API
GET/v1/subscriptions/search

Search subscriptions

Lists subscriptions matching a search query. Supply query using the subscription search query language, and use page with the returned next_page value to retrieve subsequent pages. Search results can lag behind recent changes and are limited to 100 objects per request.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

4 parameters
expandarray<string>optional
Specifies which response fields to expand; each value can contain up to 5,000 characters.
limitintegeroptional
The maximum number of subscriptions to return. Must be between 1 and 100 and defaults to 10 when omitted.
pagestringoptional
A pagination cursor from a previous response's `next_page` value. Omit it for the first request.
querystringrequired
The search query string written in the subscription search query language. Maximum 5,000 characters.

2 status codes
200Returns a search result containing matching subscription objects in `data`, pagination fields including `has_more` and `next_page`, the result object type, the request URL, and an approximate `total_count`.
dataarray<Subscription>required
has_morebooleanrequired
next_pagestringoptional
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:search_result
total_countintegeroptional
The total number of objects that match the query, only accurate up to 10,000.
urlstringrequired
defaultError response.
errorobjectrequired

Error handling

query is required and must be a search query string of no more than 5,000 characters. page and each expand value must not exceed 5,000 characters; limit must be an integer, and query must identify supported subscription fields.