The KnowledgeSDK API is organized around REST. All requests and responses use JSON. The API is designed to be predictable: it uses standard HTTP status codes, returns consistent error formats, and follows conventional URL structures.
Base URL
All API requests should be made to:
https://api.knowledgesdk.com
Authentication
Every request must include your API key in the x-api-key header. You can get your API key from the dashboard.
curl https://api.knowledgesdk.com/v1/account \
-H "x-api-key: sk_ks_your_api_key"API keys start with the prefix sk_ks_ and are tied to your account. Keep your key secret — do not expose it in client-side code or public repositories.
Never expose your API key in frontend code, public repositories, or client-side applications. Always make API calls from your server.
Error Handling
The API returns standard HTTP status codes. Errors include a JSON body with a message field describing what went wrong.
| Status Code | Meaning |
|---|---|
200 | Success |
400 | Bad request — check your parameters |
401 | Unauthorized — invalid or missing API key |
429 | Rate limited — you have exceeded your plan's rate limit |
500 | Server error — something went wrong on our end |
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid API key"
}Rate Limits
Rate limits depend on your plan. When you exceed the limit, you will receive a 429 response with a Retry-After header indicating how many seconds to wait.
| Plan | Requests per minute |
|---|---|
| Usage | 10 |
| Starter | 30 |
| Pro | 60 |
Endpoints Overview
Knowledge Extraction
/v1/businessSynchronously run the full AI extraction pipeline on a URL. Crawls the site, classifies the business, and returns structured knowledge items. Typically takes 1-3 minutes.
/v1/business/asyncStart an async business extraction job. Returns a jobId immediately. Poll with /v1/jobs/{jobId} or provide a callbackUrl to receive a webhook when complete.
/v1/business/streamStream business extraction progress via Server-Sent Events (SSE). Receive real-time updates as pages are scraped and knowledge is extracted.
Search
/v1/searchSemantic search across your extracted knowledge using hybrid keyword + vector search. Filter by category and control result count.
Utilities
/v1/extractConvert a single URL to clean, LLM-ready markdown. Useful for one-off page extraction without the full business pipeline.
/v1/screenshotCapture a full-page screenshot of a URL. Returns a base64-encoded PNG image.
/v1/sitemapDiscover all URLs on a site via sitemap.xml parsing and link crawling.
Jobs
/v1/jobs/{jobId}Check the status and result of an async extraction job.
Account
/v1/accountView your current plan, API key details, and usage statistics for the current billing period.
Detailed Endpoint Documentation
Full reference for sync, async, and streaming business extraction including all parameters, response formats, and code examples.
Semantic search endpoint with filtering, pagination, and response format details.
Polling async jobs — status codes, progress tracking, and result retrieval.
View your plan, usage statistics, and API key information.