Hi everyone,
I'm developing an app feature that requires importing a Figma file and its nodes to create a hierarchy navigation tree. The goal is to register user clicks and analyze data from the Figma prototype.
My process involves traversing all possible nodes to identify those with navigation actions.
I'm running into a significant issue with large Figma files containing hundreds of thousands of nodes. When I try to process these files, I frequently hit the API rate limit and receive a 429 "Too Many Requests" error.
I've already tried a few things:
-
I switched from fetching the entire file at once to fetching nodes individually. This helped with smaller files, but the 429 error still occurs with complex designs.
-
I've checked the Figma API documentation and am aware of the rate limits, but the volume of my requests doesn't seem to exceed the typical per-minute limit. This suggests the issue might be related to the sheer size or complexity of the file itself, rather than just the number of requests.
-
I attempted to use the
depth
parameter to limit the file's node tree, but this isn't a viable long-term solution as I often need to go deep into the hierarchy to properly build the navigation tree.
I use Pathfix for my requests, and while I don't believe it's the root cause, I'm open to the possibility. The error seems to be directly tied to the size of the Figma file I'm trying to import.
Has anyone else encountered a similar issue with large files? Are there alternative strategies for importing and processing a file's full hierarchy without hitting the rate limit? Any help or suggestions would be greatly appreciated!