v1

latestOpenAPI 3.1.02026-07-1750229379.2 KB
Files

Get file JSON for specific nodes

Returns the nodes referenced to by ids as a JSON object. The nodes are retrieved from the Figma file referenced to by file_key.

The node ID and file key can be parsed from any Figma node url: https://www.figma.com/file/{file_key}/{title}?node-id={id}

The name, lastModified, thumbnailUrl, editorType, and version attributes are all metadata of the specified file.

The linkAccess field describes the file link share permission level. There are 5 types of permissions a shared link can have: "inherit", "view", "edit", "org_view", and "org_edit". "inherit" is the default permission applied to files created in a team project, and will inherit the project's permissions. "org_view" and "org_edit" restrict the link to org users.

The document attribute contains a Node of type DOCUMENT.

The components key contains a mapping from node IDs to component metadata. This is to help you determine which components each instance comes from.

By default, no vector data is returned. To return vector data, pass the geometry=paths parameter to the endpoint. Each node can also inherit properties from applicable styles. The styles key contains a mapping from style IDs to style metadata.

Important: the nodes map may contain values that are null. This may be due to the node id not existing within the specified file.

get/v1/files/{file_key}/nodes

Path parameters

file_keystring required

File to export JSON from. This can be a file key or branch key. Use GET /v1/files/:key with the branch_data query param to get the branch key.

Query parameters

idsstring required

A comma separated list of node IDs to retrieve and convert.

versionstring

A specific version ID to get. Omitting this will get the current version of the file.

depthnumber

Positive integer representing how deep into the node tree to traverse. For example, setting this to 1 will return only the children directly underneath the desired nodes. Not setting this parameter returns all nodes.

Note: this parameter behaves differently from the same parameter in the GET /v1/files/:key endpoint. In this endpoint, the depth will be counted starting from the desired node rather than the document root node.

geometrystring

Set to "paths" to export vector data.

plugin_datastring

A comma separated list of plugin IDs and/or the string "shared". Any data present in the document written by those plugins will be included in the result in the pluginData and sharedPluginData properties.

Response

Response from the GET /v1/files/{file_key}/nodes endpoint.

namestring required

The name of the file as it appears in the editor.

role'owner' | 'editor' | 'viewer' required

The role of the user making the API request in relation to the resource.

lastModifiedstring date-time required

The UTC ISO 8601 time at which the file was last modified.

editorType'figma' | 'figjam' required

The type of editor associated with this file.

thumbnailUrlstring required

A URL to a thumbnail image of the file.

versionstring required

The version number of the file. This number is incremented when a file is modified and can be used to check if the file has changed between requests.

nodesobject required

A mapping from node IDs to node metadata.