Figma icon

Figma

Use the Figma API

Variable → List Local Variables

AI-generated

Summary

Retrieve the list of local and remote variables used in a specific Figma file, supporting various query parameters for filtering and pagination.

Inputs

  • Key (required) — The unique file key of the Figma file from which to list local variables.
  • Query Parameters — Optional parameters to filter and paginate the list of variables, including 'after', 'before', 'limit', 'order', 'cursor', 'version', and others affecting the scope and format of returned data.

Output shape

a JSON object representing the list of local variables in the specified Figma file, possibly paginated according to the given query parameters.

The response format depends on the Figma API's standard output for listing local variables and may include pagination cursors when applicable. The 'Key' parameter must be provided, or the operation will fail. Other query parameters are optional and can refine the results returned.

Examples

Example 1: List local variables from a Figma file

Specify the file 'Key' of the Figma file and optionally set 'limit' in 'Query Parameters' to control number of results per call.

Discussion