Components
Get Component Sets
List all component sets (variant groups) in a Figma file.
Returns metadata for all component sets — groups of component variants — published from a file.
GET https://api.figma.com/v1/files/:file_key/component_sets
Authentication
Requires a valid access token with file_content:read scope. Pass via X-Figma-Token header (personal access token) or Authorization: Bearer header (OAuth).
Parameters
Path parameters
The key of the file to retrieve component sets from.
Query parameters
Example Request
Response
{
"meta": {
"component_sets": [
{
"key": "def456",
"name": "Button",
"description": "Button with Primary, Secondary, and Ghost variants",
"node_id": "1:50",
"thumbnail_url": "https://s3-alpha.figma.com/checkpoints/...",
"created_at": "2024-01-10T08:00:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"containing_frame": {
"name": "Components",
"nodeId": "0:1",
"pageName": "Library"
}
}
]
},
"pagination": {
"cursor": null,
"page_size": 30
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
meta.component_sets | array | List of component set metadata objects |
meta.component_sets[].key | string | Unique component set key |
meta.component_sets[].name | string | Component set name |
meta.component_sets[].description | string | Description set by the designer |
meta.component_sets[].node_id | string | The node ID in the file |
meta.component_sets[].thumbnail_url | string | URL to a rendered thumbnail |
meta.component_sets[].containing_frame | object | Frame and page where the set lives |
pagination.cursor | string or null | Cursor for the next page |