Figma API - Design Asset Extraction & Export avatar
Figma API - Design Asset Extraction & Export

Pricing

Pay per event

Go to Apify Store
Figma API - Design Asset Extraction & Export

Figma API - Design Asset Extraction & Export

Extract designs, components, styles, and images from Figma files using the official REST API. Export frames and nodes as PNG, JPG, SVG, or PDF. Perfect for design system documentation, asset pipelines, and design-to-code workflows.

Pricing

Pay per event

Rating

0.0

(0)

Developer

John Rippy

John Rippy

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 hours ago

Last modified

Share

Figma API

Built by John Rippy | johnrippy.link

🏆 2025 Zapier Automation Hero of the YearProject Phoenix: A 95-step AI sales pipeline cutting development time by 50%. Read more →

Design Asset Extraction & Export - Components, Styles & Images

Extract designs, components, styles, and images from Figma files using the official REST API. Export frames and nodes as PNG, JPG, SVG, or PDF. Perfect for design system documentation, asset pipelines, and design-to-code workflows.

What is the Figma REST API?

The Figma REST API allows programmatic access to Figma files, enabling you to extract design data, export assets, manage comments, and integrate Figma into your workflows.

Features

File Operations

  • Get File - Retrieve complete file JSON with all layers and properties
  • Get File Nodes - Extract specific nodes by ID
  • Get File Metadata - Get file info without full content
  • Get File Versions - Access version history

Asset Export

  • Export Images - Render nodes as PNG, JPG, SVG, or PDF
  • Get Image Fills - Download all images used in the file
  • Batch Export - Export multiple nodes in one run

Components & Styles

  • Get Team/File Components - List published components
  • Get Component - Fetch component details by key
  • Get Team/File Styles - List color, text, and effect styles
  • Get Style - Fetch style details by key
  • Get Variables - Access design tokens and variables

Collaboration

  • Get Comments - Retrieve file comments
  • Post Comment - Add comments to files

Organization

  • Get Team Projects - List projects in a team
  • Get Project Files - List files in a project
  • Get User - Current user info

Use Cases

Design System Documentation

  • Auto-generate component libraries
  • Extract color palettes and typography
  • Document design tokens/variables

Asset Pipelines

  • Export icons and assets at multiple scales
  • Generate app store screenshots
  • Create marketing asset libraries

Design-to-Code

  • Extract design specifications
  • Generate style guides
  • Sync design tokens to code

Design QA

  • Track design changes via versions
  • Monitor comments and feedback
  • Audit component usage

Automation Workflows

  • Trigger exports when files change
  • Sync assets to CDN or storage
  • Generate design reports

Input Parameters

ParameterTypeRequiredDescription
taskstringYesOperation to perform (see tasks below)
accessTokenstringYes*Figma personal access token (*not needed for demoMode)
fileKeystringNoFile key from Figma URL
nodeIdsstringNoComma-separated node IDs
teamIdstringNoTeam ID for team operations
projectIdstringNoProject ID
componentKeystringNoComponent key
styleKeystringNoStyle key
exportFormatstringNoExport format: png, jpg, svg, pdf
exportScalenumberNoExport scale (0.01-4)
depthintegerNoDocument traversal depth (1-4)
batchNodesarrayNoNodes for batch export
webhookUrlstringNoURL for webhook delivery
demoModebooleanNoRun with sample data (default: true)

Available Tasks

TaskDescription
get_fileGet complete file JSON
get_file_nodesGet specific nodes by ID
get_file_metadataGet file metadata only
get_file_versionsGet version history
export_imagesExport nodes as images
get_image_fillsGet all image fill URLs
get_commentsGet file comments
post_commentAdd a comment
get_team_projectsList team projects
get_project_filesList project files
get_team_componentsList team components
get_file_componentsList file components
get_componentGet component by key
get_team_stylesList team styles
get_file_stylesList file styles
get_styleGet style by key
get_variablesGet file variables
get_userGet current user
batch_exportExport multiple nodes

Getting Your Access Token

  1. Go to Figma Account Settings
  2. Scroll to Personal access tokens
  3. Click Generate new token
  4. Give it a description and select scopes:
    • file_content:read - Read file content
    • file_metadata:read - Read file metadata
    • file_comments:read/write - Read/write comments
  5. Copy the token (shown only once!)

Note: Personal access tokens now have a maximum 90-day expiration.

Example Usage

Get File Structure

{
"task": "get_file",
"accessToken": "your-figma-token",
"fileKey": "abc123xyz",
"depth": 2
}

Export Specific Nodes as PNG

{
"task": "export_images",
"accessToken": "your-figma-token",
"fileKey": "abc123xyz",
"nodeIds": "1:2,1:3,1:4",
"exportFormat": "png",
"exportScale": 2
}

Export as SVG

{
"task": "export_images",
"accessToken": "your-figma-token",
"fileKey": "abc123xyz",
"nodeIds": "3:1,3:2,3:3",
"exportFormat": "svg"
}

Batch Export with Different Formats

{
"task": "batch_export",
"accessToken": "your-figma-token",
"fileKey": "abc123xyz",
"batchNodes": [
{ "nodeId": "1:2", "format": "png", "scale": 1 },
{ "nodeId": "1:2", "format": "png", "scale": 2 },
{ "nodeId": "1:3", "format": "svg" },
{ "nodeId": "1:4", "format": "pdf" }
]
}

Get All Components

{
"task": "get_file_components",
"accessToken": "your-figma-token",
"fileKey": "abc123xyz",
"maxResults": 50
}

Get Design Tokens/Variables

{
"task": "get_variables",
"accessToken": "your-figma-token",
"fileKey": "abc123xyz"
}

Post a Comment

{
"task": "post_comment",
"accessToken": "your-figma-token",
"fileKey": "abc123xyz",
"commentMessage": "This design is approved for development!",
"commentX": 150,
"commentY": 200
}

Output

Results are saved to the default dataset:

Export Result

{
"task": "export_images",
"success": true,
"images": {
"1:2": "https://figma-alpha-api.s3.us-west-2.amazonaws.com/images/...",
"1:3": "https://figma-alpha-api.s3.us-west-2.amazonaws.com/images/..."
},
"format": "png",
"scale": 2,
"fileKey": "abc123xyz"
}

Components Result

{
"task": "get_file_components",
"success": true,
"components": [
{
"key": "comp_abc123",
"name": "Button/Primary",
"description": "Primary action button",
"thumbnailUrl": "https://..."
}
],
"total": 45,
"fileKey": "abc123xyz"
}

Finding File Keys and Node IDs

File Key: From any Figma URL:

  • https://www.figma.com/file/FILE_KEY/File-Name
  • https://www.figma.com/design/FILE_KEY/File-Name

Node IDs:

  1. Select a layer in Figma
  2. Right-click → "Copy link"
  3. The URL contains node-id=X:Y - the node ID is X:Y

Or use get_file with depth: 2 to explore the document structure.

Rate Limits

Figma API has rate limits based on tiers:

  • Tier 1 (file/nodes/images): ~30 requests/minute
  • Tier 2 (image fills): ~60 requests/minute
  • Tier 3 (metadata): ~120 requests/minute

Image export URLs expire after 30 days.

Webhook Integration

Send results to Zapier, Make, n8n, or any webhook:

{
"task": "export_images",
"accessToken": "your-figma-token",
"fileKey": "abc123xyz",
"nodeIds": "1:2",
"webhookUrl": "https://hooks.zapier.com/hooks/catch/123456/abcdef/"
}

Demo Mode

Test the actor without API credentials:

{
"task": "get_file",
"demoMode": true
}

Demo mode returns realistic sample data for testing integrations.

Pricing

Pay-per-result pricing:

OperationCost
Get file/nodes/metadata$0.02
Get file versions$0.01
Export images (per node)$0.03
Get image fills$0.02
Get/post comments$0.01
Get team projects/files$0.01
Get components/styles$0.02
Get variables$0.02
Batch export (per node)$0.03

Support