Skip to main content

Components

Get Components

List all published components in a Figma file.

Returns metadata for all components published from a file. Use this to catalog component usage and build design system dashboards.

GET https://api.figma.com/v1/files/:file_key/components

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 components from.

Query parameters

Example Request

curl -X GET "https://api.figma.com/v1/files/YOUR_FILE_KEY/components?page_size=50" \
  -H "X-Figma-Token: YOUR_TOKEN"

Response

{
  "meta": {
    "components": [
      {
        "key": "abc123",
        "name": "Button",
        "description": "Primary action button",
        "node_id": "1:23",
        "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": "eyJpZCI6IjEyMzQ1In0=",
    "page_size": 50
  }
}

Response Fields

FieldTypeDescription
meta.componentsarrayList of component metadata objects
meta.components[].keystringUnique component key
meta.components[].namestringComponent name
meta.components[].descriptionstringComponent description set by the designer
meta.components[].node_idstringThe node ID of the component in the file
meta.components[].thumbnail_urlstringURL to a rendered thumbnail
meta.components[].containing_frameobjectFrame and page where the component lives
pagination.cursorstring or nullCursor for the next page, or null if this is the last page
pagination.page_sizenumberNumber of items returned

This endpoint supports pagination. If your file has many components, iterate through pages using the cursor value.