---
title: "Get a library"
method: GET
path: "/v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}"
tags: ["Teamspace Libraries"]
---

# Get a library

`GET /v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}`

## Request

- Base URL: `https://context7.com/api`
- URL: `https://context7.com/api/v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}`
- Auth: HTTP bearer

The library's parse state, counts, versions and the active parse task. Poll it after adding or refreshing a library. Works for the teamspace's private and claimed libraries, and for any public library.

## Response `200`

The library

- TeamspaceLibraryDetail: A library of the teamspace: one of its private sources or a library it has claimed.
  - `id` string, required: Library id, `/owner/repo`.
  - `title` string
  - `description` string
  - `type` 'repo' | 'llmstxt' | 'website' | 'openapi' | 'pdf' | 'docx' | 'file' | 'confluence' | 'notion': Source type.
  - `sourceUrl` string: Where the library is read from (repository, website, llms.txt or OpenAPI URL).
  - `branch` string: Default branch (repositories).
  - `private` boolean, required: One of the teamspace's private sources.
  - `owned` boolean, required: Claimed by the teamspace. Owner operations (config, versions delete, analytics) need it.
  - `state` 'processing' | 'finalizing' | 'complete' | 'error', required: Parse state. `processing`: a parse runs. `finalizing`: the new data is ready and cleanup still runs. `complete`: done. `error`: the last parse failed, or a first parse ended without a library.
  - `lastUpdateDate` string, date-time: Last successful update.
  - `totalTokens` integer
  - `totalSnippets` integer
  - `totalPages` integer
  - `benchmarkScore` number: Context7's benchmark score of the library's docs, 0 to 100.
  - `lastRunDate` string, date-time: When the last parse ran, successful or not.
  - `issues` object: Problems the last parse found.
    - `tooLarge` boolean
    - `noCode` boolean
    - `languageMismatch` boolean
    - `redirect` string
    - `blocked` boolean
    - `disallowed` boolean
  - `versions` TeamspaceLibraryVersion[], required
    - `name` string, required: Tag or branch name. Use it in `DELETE .../versions/{version}`.
    - `title` string
    - `isBranch` boolean, required
    - `state` 'processing' | 'finalizing' | 'complete' | 'error', required: Parse state. `processing`: a parse runs. `finalizing`: the new data is ready and cleanup still runs. `complete`: done. `error`: the last parse failed, or a first parse ended without a library.
    - `lastUpdateDate` string, date-time
    - `totalTokens` integer
    - `totalSnippets` integer
  - `task` TeamspaceLibraryTask, required: The active parse task, as the public task list shows it.
    - `lockState` 'processing' | 'waiting' | 'crawling' | 'crawled', required
    - `lockDate` string, date-time, required: When the task started.
    - `progress` string: The parser's progress line.
    - `task` object, required
      - `type` string, required: Task type, for example `parse_repo` or `refresh_website`.
      - `projectName` string, required: Library id, with `@tag` for a version task.
      - `displayName` string, required
  - `config` TeamspaceLibraryConfig: The saved owner settings. Unset fields are null.
    - `projectTitle` string, nullable
    - `description` string, nullable
    - `baseUrl` string, nullable
    - `webUrl` string, nullable
    - `branch` string, nullable
    - `folders` string[], nullable
    - `excludeFolders` string[], nullable
    - `excludeFiles` string[], nullable
    - `includeExtensions` string[], nullable
    - `rules` string[], nullable
    - `disallow` boolean, nullable
    - `useQueryParams` boolean, nullable
    - `excludeUrls` string[], nullable
    - `skipClaudeVersionExclusion` boolean, nullable
    - `generateDocs` boolean, nullable: Null for public repositories.
    - `configSource` 'dashboard' | 'context7json', nullable

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `403`: The caller cannot access this teamspace, the API key belongs to another teamspace, or the caller's role is too low
- `404`: The teamspace has no library with this id (neither claimed nor one of its private sources)
- `500`: Internal Server Error

## Changes

- **2026-10-28** `f5831eae055c`: 1 info
  - added the optional property `allOf[subschema #2]/config/allOf[#/components/schemas/TeamspaceLibraryConfig]/includeExtensions` to the response with the `200` status
- **2026-10-28** `1fd763a39c5d`: 1 info
  - added the optional property `allOf[subschema #2]/config` to the response with the `200` status
- **2026-10-22** `cd09292c6641`: 1 info
  - added the optional property `allOf[#/components/schemas/TeamspaceLibrarySummary]/benchmarkScore` to the response with the `200` status
- **2026-10-22** `e17589fd8767`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context7/apis/context7-public-api/changes/v2/teamspaces/:teamspaceId/libraries/:owner/:repo/get.md)

---

[API](https://skmtc.dev/context7/apis/context7-public-api.md) - [All operations](https://skmtc.dev/context7/apis/context7-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/context7/apis/context7-public-api/revisions/945f7834fa8c?raw)
