---
title: "Search for libraries"
method: GET
path: "/v2/libs/search"
tags: ["Search"]
---

# Search for libraries

`GET /v2/libs/search`

Search for libraries by name with intelligent LLM-powered ranking based on your query context.

## Query parameters

- `libraryName` string, required
- `query` string, required
- `fast` 'true' | 'false'

## Response `200`

Search results ranked by relevance

- SearchResponse — Search results response
  - `results` Library[], required — Array of matching libraries ranked by relevance
    - `id` string — Library ID — the URL path of the library on context7.com. `/owner/repo` for GitHub repositories, or `/<source>/<id>` for other sources (e.g., `/vercel/next.js`, `/websites/uploadcare_com`). See [Library ID format](/api-guide#library-id-format).
    - `title` string — Display name of the library
    - `description` string — Short description
    - `branch` string — Git branch being tracked
    - `lastUpdateDate` string, date-time — ISO 8601 timestamp of last update
    - `state` 'finalized' | 'initial' | 'processing' | 'error' | 'delete' — Processing state of the library
    - `totalTokens` integer — Total tokens in documentation
    - `totalSnippets` integer — Number of code snippets
    - `stars` integer — GitHub stars count
    - `trustScore` integer — Source reputation score (0-10)
    - `benchmarkScore` number — Quality indicator score (0-100)
    - `versions` string[] — Available version tags
  - `searchFilterApplied` boolean, required — Indicates whether the search results were filtered by the teamspace's public library access settings. When true, some libraries may be excluded from results based on the teamspace's configuration (e.g., only verified libraries, selected libraries, or private repos only).

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `402` — Payment Required - the teamspace's configured monthly spending limit has been reached. A teamspace owner or admin can raise the limit in billing settings, or the cap will reset at the start of the next billing month.
- `404` — Not Found - Resource doesn't exist
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error
- `503` — Service Unavailable - Search service is temporarily unavailable

---

[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-service-production.skmtc.workers.dev/v1/apis/context7/context7-public-api/revisions/5e85fc74bff0/schema)
