Base URL
All API requests should be made to:Core Endpoints
1. Get Context
POST/get-context
Search across all indexed documentation to retrieve relevant code examples and usage guides.
- Purpose: Search all available indexed services for specific documentation and examples
- Returns: Array of documentation chunks ranked by relevance with scores
- Use Case: Power AI assistants, chatbots, or developer tools with up-to-date documentation
- Error codes:
- 400: No subscription found
- 404: User account not found
- 401: API key missing or invalid API key
2. Add Index
POST/add-index
Add a new index with a source URL for indexing SDK/CLI/API documentation.
- Purpose: Create custom indexes for your own documentation or third-party services
- Returns: Created index details including
index_idand indexing status - Use Case: Index internal APIs, third-party documentation, or any web-based docs
- Error codes:
- 400: Invalid URL
- 403: Subscription required
- 409: URL already indexed or indexing in progress
- 401: API key missing or invalid API key
Authentication
All endpoints require API key authentication via theAPI-Key header:
Response Formats
All endpoints return JSON responses with a consistent structure:- HTTP Status Codes: Standard REST conventions (200, 400, 401, 404, etc.)
Rate Limits
- API endpoints: 100 requests per minute per API key
- Context retrieval: Unlimited queries based on your subscription plan
Error Handling
All endpoints return structured error responses:400: Missing required parameters401: Invalid or missing API key404: Resource not found (index, user account)429: Rate limit exceeded
Getting Started
To start using the API:- Get your API key from the Harvest dashboard
- Optionally, use
add-indexto create custom indexes for your own documentation - Use
get-contextto search across all available documentation
Example Workflow
The
get-context endpoint automatically searches across all your available indexes (both public and your own).