Skip to main content

Styles

Get Styles

List all published styles in a Figma file.

Returns metadata for all styles (colors, text styles, effects, grids) published from a file.

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

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

Query parameters

Example Request

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

Response

{
  "meta": {
    "styles": [
      {
        "key": "abc123",
        "name": "Brand/Primary",
        "description": "Primary brand color",
        "style_type": "FILL",
        "node_id": "1:100",
        "thumbnail_url": "https://s3-alpha.figma.com/checkpoints/...",
        "created_at": "2024-01-10T08:00:00Z",
        "updated_at": "2024-01-15T10:30:00Z"
      },
      {
        "key": "def456",
        "name": "Heading/H1",
        "description": "Main heading style",
        "style_type": "TEXT",
        "node_id": "1:101",
        "thumbnail_url": "https://s3-alpha.figma.com/checkpoints/...",
        "created_at": "2024-01-10T08:00:00Z",
        "updated_at": "2024-01-15T10:30:00Z"
      }
    ]
  },
  "pagination": {
    "cursor": null,
    "page_size": 30
  }
}

Response Fields

FieldTypeDescription
meta.stylesarrayList of style metadata objects
meta.styles[].keystringUnique style key, used with the Get Style endpoint
meta.styles[].namestringStyle name (uses / for grouping)
meta.styles[].descriptionstringDescription set by the designer
meta.styles[].style_typestringOne of: FILL, TEXT, EFFECT, GRID
meta.styles[].node_idstringThe node ID of the style in the file
meta.styles[].thumbnail_urlstringURL to a rendered thumbnail
pagination.cursorstring or nullCursor for the next page