Skip to main content
Question

Get the svg code of a component with api

  • January 2, 2024
  • 2 replies
  • 633 views

How to get the svg code of a component using its id through python api? I use component_id.get(‘vectorNetwork’, {}) but it doesn’t work.

This topic has been closed for replies.

2 replies

Gleb
  • Power Member
  • January 2, 2024

What do you mean by Python API? Figma doesn’t have one.

If you are using REST API, you need to either export SVG through /images endpoint or use fillPath/strokePath property of a node.


  • Author
  • January 2, 2024

Yes, I meant using the REST API in Python.

Thanks for the reply!