Skip to main content

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

curl -X GET "https://api.figma.com/v1/files/YOUR_FILE_KEY/component_sets" \
  -H "X-Figma-Token: YOUR_TOKEN"

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

FieldTypeDescription
meta.component_setsarrayList of component set metadata objects
meta.component_sets[].keystringUnique component set key
meta.component_sets[].namestringComponent set name
meta.component_sets[].descriptionstringDescription set by the designer
meta.component_sets[].node_idstringThe node ID in the file
meta.component_sets[].thumbnail_urlstringURL to a rendered thumbnail
meta.component_sets[].containing_frameobjectFrame and page where the set lives
pagination.cursorstring or nullCursor for the next page

A component set is a group of related variants. For example, a “Button” component set might contain “Primary”, “Secondary”, and “Ghost” variants. Use this endpoint alongside Get Components to build a complete component inventory.