Figma Library Analytics API

Operations for retrieving library usage and action analytics data

Operations 1

GET /v1/analytics/libraries/{file_key}/usages Figma Get Library Analytics Usage Data #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-file-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-component-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-user-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-error-response-payload-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-get-me-response-body-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-structure/figma-get-me-response-body-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-structure/figma-error-response-payload-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-structure/figma-user-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-file-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-file-nodes-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-images-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-image-fills-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-file-versions-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-comments-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-post-comment-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-reactions-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-team-components-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-file-components-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-component-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-team-component-sets-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-team-styles-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-team-projects-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-get-project-files-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-error-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-branch-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-canvas-node-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-client-meta-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-color-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-comment-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-component-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-component-set-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-document-node-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-documentation-link-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-frame-info-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-pagination-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-project-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-project-file-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-published-component-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-published-component-set-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-published-style-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-reaction-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-style-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-success-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-user-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-rest-version-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-analytics-get-library-analytics-usages-response-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-analytics-library-analytics-usages-by-component-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-analytics-library-analytics-usages-by-file-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-analytics-library-analytics-actions-by-component-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-analytics-library-analytics-actions-by-team-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-analytics-library-analytics-style-usages-by-asset-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-analytics-library-analytics-style-usages-by-file-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-analytics-library-analytics-variable-usages-by-asset-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-analytics-library-analytics-variable-usages-by-file-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/figma/refs/heads/main/json-schema/figma-analytics-error-response-payload-schema.json

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/figma-library-analytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

figma-library-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Figma Analytics Library Analytics API
  version: 0.21.0
  description: 'This is the OpenAPI specification for the Figma REST API Analytics endpoints.

    Note: we are releasing the OpenAPI specification as a beta given the large surface area and complexity of the REST API.'
  termsOfService: https://www.figma.com/developer-terms/
  contact:
    email: support@figma.com
servers:
- url: https://api.figma.com
  description: Figma Production API Server
tags:
- name: Library Analytics
  description: Operations for retrieving library usage and action analytics data
paths:
  /v1/analytics/libraries/{file_key}/usages:
    get:
      tags:
      - Library Analytics
      summary: Figma Get Library Analytics Usage Data
      security:
      - PersonalAccessToken: []
      - OAuth2:
        - library_analytics:read
      description: Returns a list of library analytics usage data broken down by the requested dimension.
      operationId: getLibraryAnalyticsUsages
      x-microcks-operation:
        dispatcher: FALLBACK
        dispatcherRules: "{\n  \"dispatcher\": \"FALLBACK\",\n  \"fallback\": \"GetLibraryAnalyticsUsagesSuccessExample\"\n}\n"
      parameters:
      - $ref: '#/components/parameters/FileKeyPathParam'
      - $ref: '#/components/parameters/CursorQueryParam'
      - $ref: '#/components/parameters/GroupByQueryParam'
      - $ref: '#/components/parameters/OrderQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/GetLibraryAnalyticsUsagesResponse'
        '400':
          $ref: '#/components/responses/BadRequestErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedErrorResponse'
        '403':
          $ref: '#/components/responses/ForbiddenErrorResponse'
        '429':
          $ref: '#/components/responses/TooManyRequestsErrorResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  examples:
    GetLibraryAnalyticsUsagesSuccessExample:
      summary: Successful library analytics usage response
      value:
        components:
        - componentKey: comp_abc123
          componentName: Primary Button
          componentSetKey: compset_xyz789
          componentSetName: Buttons
          numInstances: 1542
          numTeamsUsing: 8
          numFilesUsing: 45
        - componentKey: comp_def456
          componentName: Secondary Button
          componentSetKey: compset_xyz789
          componentSetName: Buttons
          numInstances: 876
          numTeamsUsing: 6
          numFilesUsing: 32
        files:
        - fileName: Marketing Landing Page
          teamName: Marketing Design
          workspaceName: Company Workspace
          numInstances: 89
        - fileName: Product Dashboard
          teamName: Product Design
          workspaceName: Company Workspace
          numInstances: 156
        nextPage: true
        cursor: eyJwYWdlIjoyfQ==
    UnauthorizedExample:
      summary: Unauthorized error
      value:
        error: true
        status: 401
        message: Token is missing or incorrect
    BadRequestExample:
      summary: Bad request error
      value:
        error: true
        status: 400
        message: 'Invalid parameter: group_by must be ''component'' or ''file'''
    ForbiddenExample:
      summary: Forbidden error
      value:
        error: true
        status: 403
        message: You do not have permission to access analytics for this library
    TooManyRequestsExample:
      summary: Rate limit error
      value:
        error: true
        status: 429
        message: Rate limit exceeded. Please wait before making another request
    InternalServerErrorExample:
      summary: Internal server error
      value:
        error: true
        status: 500
        message: An internal server error occurred
  responses:
    ForbiddenErrorResponse:
      description: The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponsePayload'
          examples:
            ForbiddenExample:
              $ref: '#/components/examples/ForbiddenExample'
    BadRequestErrorResponse:
      description: Bad request. Parameters are invalid or malformed. Please check the input formats.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponsePayload'
          examples:
            BadRequestExample:
              $ref: '#/components/examples/BadRequestExample'
    GetLibraryAnalyticsUsagesResponse:
      description: Response from the GET /v1/analytics/libraries/{file_key}/usages endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetLibraryAnalyticsUsagesResponseBody'
          examples:
            GetLibraryAnalyticsUsagesSuccessExample:
              $ref: '#/components/examples/GetLibraryAnalyticsUsagesSuccessExample'
    TooManyRequestsErrorResponse:
      description: API requests may be throttled or rate limited. Please wait a while before attempting the request again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponsePayload'
          examples:
            TooManyRequestsExample:
              $ref: '#/components/examples/TooManyRequestsExample'
    InternalServerErrorResponse:
      description: An internal server error occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponsePayload'
          examples:
            InternalServerErrorExample:
              $ref: '#/components/examples/InternalServerErrorExample'
    UnauthorizedErrorResponse:
      description: Token is missing or incorrect.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponsePayload'
          examples:
            UnauthorizedExample:
              $ref: '#/components/examples/UnauthorizedExample'
  parameters:
    OrderQueryParam:
      name: order
      description: How to order response rows by number of instances. This param can be either "asc" or "desc" (default).
      in: query
      schema:
        type: string
        enum:
        - asc
        - desc
        default: desc
      example: desc
    CursorQueryParam:
      name: cursor
      description: Cursor indicating what page of data to fetch. Obtained from prior API call.
      in: query
      schema:
        type: string
      example: eyJwYWdlIjoxfQ==
    FileKeyPathParam:
      name: file_key
      in: path
      description: File key of the library to fetch analytics data for.
      required: true
      schema:
        type: string
      example: abc123xyz789
    GroupByQueryParam:
      name: group_by
      description: A dimension to group returned analytics data by. Accepts "component" or "file".
      required: true
      in: query
      schema:
        type: string
        enum:
        - component
        - file
      example: component
  schemas:
    LibraryAnalyticsUsagesByFile:
      type: object
      description: Library analytics usage data broken down by file.
      properties:
        fileName:
          type: string
          description: The name of the file using the library.
          example: example_value
        teamName:
          type: string
          description: The name of the team the file belongs to.
          example: example_value
        workspaceName:
          type: string
          description: The name of the workspace that the file belongs to.
          example: example_value
        numInstances:
          type: number
          description: The number of component instances from the library used within the file.
          example: 42.5
      required:
      - fileName
      - teamName
      - numInstances
    GetLibraryAnalyticsUsagesResponseBody:
      type: object
      properties:
        components:
          description: An array of analytics data when breaking down usage by component.
          type: array
          items:
            $ref: '#/components/schemas/LibraryAnalyticsUsagesByComponent'
          example: []
        files:
          description: An array of analytics data when breaking down usage by file.
          type: array
          items:
            $ref: '#/components/schemas/LibraryAnalyticsUsagesByFile'
          example: []
        nextPage:
          type: boolean
          description: Whether there is a next page of data that can be fetched.
          example: true
        cursor:
          type: string
          description: The cursor to use to fetch the next page of data. Not present if nextPage is false.
          example: example_value
      required:
      - nextPage
    LibraryAnalyticsUsagesByComponent:
      type: object
      description: Library analytics usage data broken down by component.
      properties:
        componentKey:
          type: string
          description: Unique, stable id of the component.
          example: example_value
        componentName:
          type: string
          description: Name of the component.
          example: example_value
        componentSetKey:
          type: string
          description: Unique, stable id of the component set that this component belongs to.
          example: example_value
        componentSetName:
          type: string
          description: Name of the component set that this component belongs to.
          example: example_value
        numInstances:
          type: number
          description: The number of instances of the component within the organization.
          example: 42.5
        numTeamsUsing:
          type: number
          description: The number of teams using the component within the organization.
          example: 42.5
        numFilesUsing:
          type: number
          description: The number of files using the component within the organization.
          example: 42.5
      required:
      - componentKey
      - componentName
      - numInstances
      - numTeamsUsing
      - numFilesUsing
    ErrorResponsePayload:
      type: object
      description: A response indicating an error occurred.
      properties:
        error:
          type: boolean
          description: For erroneous requests, this value is always `true`.
          enum:
          - true
          example: true
        status:
          type: number
          description: Status code
          example: 42.5
        message:
          type: string
          description: A string describing the error
          example: example_value
      required:
      - error
      - status
      - message
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Figma Personal Access Token
      description: Personal Access Token for authentication
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://www.figma.com/oauth
          tokenUrl: https://api.figma.com/v1/oauth/token
          scopes:
            library_analytics:read: Read library analytics