Skip to main content
POST
/
v1
/
add
curl --request POST \
--url https://context7.com/api/v1/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"docsRepoUrl": "https://github.com/okken/pytest-check",
"branch": "main",
"folders": [
"docs"
]
}'
{
  "message": "Parsing process started for https://github.com/okken/pytest-check",
  "status": "processing",
  "docsRepoUrl": "https://github.com/okken/pytest-check",
  "projectName": "/okken/pytest-check",
  "description": "A pytest plugin that allows multiple failures per test.",
  "folders": [
    "docs",
    "examples"
  ],
  "excludeFolders": [
    "archive"
  ],
  "excludeFiles": [
    "CHANGELOG.md",
    "changelog.md",
    "CHANGELOG.mdx",
    "changelog.mdx",
    "LICENSE.md",
    "license.md",
    "CODE_OF_CONDUCT.md",
    "code_of_conduct.md"
  ],
  "metadata": {
    "authentication": "paid"
  }
}

Authorizations

Authorization
string
header
required

Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely.

Body

application/json

Request to add a library. Provide exactly one of: docsRepoUrl, llmstxtUrl, or both libraryName and libraryTagCode.

docsRepoUrl
string

GitHub or GitLab repository URL

Example:

"https://github.com/okken/pytest-check"

llmstxtUrl
string

URL to llms.txt, llms-full.txt, or llms-small.txt file

Example:

"https://example.com/llms.txt"

libraryName
string

Library identifier for tag-based sources (use with libraryTagCode)

Example:

"/vercel/next.js"

libraryTagCode
string

Version tag for tag-based sources (use with libraryName)

Example:

"v15.1.8"

branch
string

Git branch to parse (defaults to repository's default branch)

Example:

"main"

folders
string[]

Specific folders to include for documentation

Example:
["docs", "examples"]
excludeFolders
string[]

Folders to exclude from parsing

Example:
["tests", "archive"]
excludeFiles
string[]

Files to exclude from parsing

Example:
["CHANGELOG.md", "LICENSE.md"]

Response

Library parsing process started successfully

Response after submitting a library for indexing

message
string

Status message

Example:

"Parsing process started for https://github.com/okken/pytest-check"

status
enum<string>

Current processing status (transitions from processing to finalized)

Available options:
processing,
finalized
Example:

"processing"

docsRepoUrl
string

GitHub repository URL

Example:

"https://github.com/okken/pytest-check"

projectName
string

Project name in format /owner/repo

Example:

"/okken/pytest-check"

description
string

Auto-detected project description

Example:

"A pytest plugin that allows multiple failures per test."

folders
string[]

Folders included in parsing

Example:
["docs", "examples"]
excludeFolders
string[]

Folders excluded from parsing

Example:
["archive"]
excludeFiles
string[]

Files excluded from parsing (default excludes common files)

Example:
[
"CHANGELOG.md",
"changelog.md",
"CHANGELOG.mdx",
"changelog.mdx",
"LICENSE.md",
"license.md",
"CODE_OF_CONDUCT.md",
"code_of_conduct.md"
]
metadata
object