Figma Support Forum

Get values associated with styles with files/styles API call

If I hit the file styles endpoint:
https://api.figma.com/v1/files/<key>/styles

I get an array of objects like so:

{
  "created_at": "2021-03-18T10:57:00.885Z",
  "description": "",
  "file_key": "…",
  "key": "…",
  "name": "red",
  "node_id": "2:5",
  "sort_position": "\"",
  "style_type": "FILL",
  "thumbnail_url": "…",
  "updated_at": "2021-03-18T10:57:00.885Z",
  "user": {
    …
  }
}

However what I also need is the value of that style. E.g. "value": "#ff0000"

Is there a way to get this? If not, can this be added?

5 Likes

Same problem. I see the way, but this way will be dumb.
As the first query → getting styles using https://api.figma.com/v1/files/:file/styles.
As other queries → Getting properties from each style using https://www.figma.com/file/:key/:pageNames?node-id=:node_id

Same issue here, I was trying to use GET style, but there is no values either
https://www.figma.com/developers/api#get-style-endpoint