Skip to main content
January 2, 2024
Question

Get the svg code of a component with api

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.

Ali_sAuthor
January 2, 2024

Yes, I meant using the REST API in Python.

Thanks for the reply!