Skip to main content

Get Top Used Products

GET 

/api/v2/products/top-used

Return the most frequently used products.

Uses the same filters as list products, plus n.

Query filters (all optional; combine as needed):

  • search_term — partial match on product name or description
  • activetrue for active products only, false for inactive only
  • type — product type: RECURRING, ONE_OFF, or METERED (when enabled)
  • currency — only products with an active price in this ISO currency code (e.g. SAR)
  • n — number of results to return (1-10, default 9)

External metadata filters (optional, combine with other filters):

  • Use any external metadata key you stored on create/update as a query parameter: external_metadata.<key>=<value>
  • Exact match, case-sensitive. Multiple keys are ANDed.
  • Example: if a consumer was created with "external_metadata": {"segment": "enterprise", "tier": "gold"}, filter with ?external_metadata.segment=enterprise&external_metadata.tier=gold

Sorting: sort_field (price, name, created_at; default created_at), sort_direction (asc or desc; default desc)

Example: /api/v2/products/top-used?n=5&active=true&external_metadata.plan=pro

Request

Responses

Successful Response