---
title: "Get library analytics component usage data."
method: GET
path: "/v1/analytics/libraries/{file_key}/component/usages"
tags: ["Library Analytics"]
---

# Get library analytics component usage data.

`GET /v1/analytics/libraries/{file_key}/component/usages`

Returns a list of library analytics component usage data broken down by the requested dimension.

## Path parameters

- `file_key` string, required

## Query parameters

- `cursor` string
- `group_by` 'component' | 'file', required

## Response `200`

Response from the PUT /v1/analytics/libraries/{file_key}/component/usages.

- object
  - `rows` union, required — An array of analytics data.
    - LibraryAnalyticsComponentUsagesByAsset[]
      - `component_key` string, required — Unique, stable id of the component.
      - `component_name` string, required — Name of the component.
      - `component_set_key` string — Unique, stable id of the component set that this component belongs to.
      - `component_set_name` string — Name of the component set that this component belongs to.
      - `usages` number, required — The number of instances of the component within the organization.
      - `teams_using` number, required — The number of teams using the component within the organization.
      - `files_using` number, required — The number of files using the component within the organization.
    - LibraryAnalyticsComponentUsagesByFile[]
      - `file_name` string, required — The name of the file using the library.
      - `team_name` string, required — The name of the team the file belongs to.
      - `workspace_name` string — The name of the workspace that the file belongs to.
      - `usages` number, required — The number of component instances from the library used within the file.
  - `next_page` boolean, required — Whether there is a next page of data that can be fetched.
  - `cursor` string — The cursor to use to fetch the next page of data. Not present if next_page is false.

## Other responses

- `400` — Bad request. Parameters are invalid or malformed. Please check the input formats. This error can also happen if the requested resources are too large to complete the request, which results in a timeout. Please reduce the number and size of objects requested.
- `401` — Token is missing or incorrect.
- `403` — The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource, or may need an account of some sort.
- `429` — In some cases API requests may be throttled or rate limited. Please wait a while before attempting the request again (typically a minute).
- `500` — An internal server error occurred.

---

[API](https://skmtc.dev/thirdstrandstudio/apis/figma-api.md) · [All operations](https://skmtc.dev/thirdstrandstudio/apis/figma-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/thirdstrandstudio/figma-api/revisions/48f84f49653a/schema)
