Paginate through all profiles in a Klaviyo segment using the Segments API

domain: developers.klaviyo.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate by adding a header Authorization: Klaviyo-API-Key YOUR_KEY and a revision header matching the current API version to every request.
  2. Send GET /api/segments/{segment_id}/profiles/ to retrieve the first page of profiles; the default page size is 20 and the maximum is 100 — set page[size]=100 to minimize round trips.
  3. Inspect the response for a links.next value; if present, follow that cursor URL to retrieve the next page.
  4. Continue following links.next until it is absent, collecting profiles from each page's data array.
  5. If you need full profile attributes (e.g., email, custom properties), use the fields[profile] query parameter to specify which fields to include and avoid over-fetching.

Known gotchas

Related routes

Query reservations and guest profiles with pagination via the Mews Connector API
docs.mews.com · 5 steps · unrated
Paginate Railway API list results and explore the schema (Relay cursors, GraphiQL)
docs.railway.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans