---
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

## 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 in format `/owner/repo`
    - `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

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error
- `503` — Service Unavailable - Search failed

---

[API](https://skmtc.dev/klavis-ai/apis/context7-public-api.md) · [All operations](https://skmtc.dev/klavis-ai/apis/context7-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/klavis-ai/context7-public-api/revisions/98dd9a151870/schema)
