get_component_api
Retrieve the full property API of a Figma component or instance, including property names, types, default values, and variant options. Uses a single node ID to return the prop contract.
Instructions
Return a component's full property API — the prop contract behind its instances. Pass a COMPONENT, COMPONENT_SET, or INSTANCE id (an instance resolves to its main component / set). Returns { id, name, type, properties } where properties maps each property name to { type (VARIANT|BOOLEAN|TEXT|INSTANCE_SWAP|SLOT), defaultValue, variantOptions?, preferredValues?, description? }. Property names come back verbatim for set_instance_properties: VARIANT by bare name (e.g. "Size"), BOOLEAN/TEXT/INSTANCE_SWAP suffixed with #id (e.g. "Label#2:0"). Unlike get_local_components (a subtree inventory), this targets one component and is safe on large files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | A COMPONENT, COMPONENT_SET, or INSTANCE node id to read the property API of |