Question
Cursor stability during file edits in Figma REST API pagination
Tasadduq BurneyownerOwner · Founder
27K reputation · 24 Aug 2024, 19:03 UTC
97.9K views0
Context
Traversing a large component library via GET /v1/files/:file_key/components requires dozens of sequential cursor-based requests under a 30-requests-per-minute limit. The cursors are opaque tokens bound to a specific file version, yet Figma does not document whether a cursor remains valid, skips entries, or returns duplicates when the file is edited mid-traversal (e.g., a component added or deleted).
Constraints
- No
page_sizeparameter exists; page sizes vary by endpoint (typically 50–500 items). - Rate-limit headers (
X-RateLimit-Remaining,Retry-After) are not consistently present on paginated responses, making adaptive throttling unreliable. - There is no official mechanism to pin a file version for a consistent snapshot across the full traversal.
Open questions
- Does a
next_cursorreturned before a file edit continue to yield correct, non-duplicate results after the edit, or does it become invalid? - Is the behavior consistent across
/components,/styles, and/variables/localendpoints? - Can a client detect cursor invalidation without comparing full result sets?