Skip to main content
GET
/
v2
/
context
Get documentation context
curl --request GET \
  --url https://your-instance.example.com/api/v2/context \
  --header 'Authorization: Bearer <token>'
"### useRouter()\n\nSource: https://github.com/vercel/next.js/...\n\nThe `useRouter` hook allows you to programmatically change routes inside Client Components.\n\n--------------------------------\n\n### app/layout.tsx\n\n```tsx\nexport default function Layout({ children }) {\n  return <html><body>{children}</body></html>\n}\n```"

Authorizations

Authorization
string
header
required

API key generated from Personal Settings. See Authentication.

Query Parameters

libraryId
string
required

Library ID returned by GET /v2/libs/search (e.g., /your-org/your-repo)

Required string length: 1 - 500
query
string
required

Natural language question or topic to retrieve context for

Required string length: 1 - 500

Response

Relevant documentation snippets as plain text

The response is of type string.