Skip to main content

Base URL

All API requests should be made to:
https://www.goharvest.ai/api/v1/developer/

Core Endpoints

1. List Indexes

GET /list-indexes Retrieve a list of all indexed services (SDKs, CLIs, APIs) available for context retrieval.
  • Purpose: Discover available indexed services and their identifiers
  • Returns: List of indexed services with index_id, name, and type
  • Use Case: Find available documentation sources before querying for context
  • Error codes:
    • 404: User account not found
    • 401: API key missing or invalid API key

2. Get Context

POST /get-context Retrieve relevant documentation, code examples, and usage guides from indexed services.
  • Purpose: Search indexed services for specific documentation and examples
  • Returns: Formatted context string with relevant documentation
  • Use Case: Power AI assistants, chatbots, or developer tools with up-to-date documentation
  • Error codes:
    • 400: Missing index_id parameter
    • 404: Index not found or User account not found
    • 401: API key missing or invalid API key

Authentication

All endpoints require API key authentication via the API-Key header:
curl -H "API-Key: your-api-key" https://www.goharvest.ai/api/v1/developer/

Response Formats

All endpoints return JSON responses with a consistent structure:
{
  "ok": true,
  "error": null,
  "data": { /* endpoint-specific data */ }
}
  • 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:
{
  "detail": "Error description",
  "status_code": 404
}
Common error codes:
  • 400: Missing required parameters
  • 401: Invalid or missing API key
  • 404: Resource not found (index, user account)
  • 429: Rate limit exceeded

Getting Started

To start using the API:
  1. Get your API key from the Harvest dashboard
  2. Call list-indexes to discover available indexed services
  3. Use get-context with an index_id to retrieve documentation and examples

Example Workflow

import requests

# 1. List available indexes
response = requests.get(
    "https://www.goharvest.ai/api/v1/developer/list-indexes",
    headers={"API-Key": "your-api-key"}
)
indexes = response.json()['data']['indexes']
print(f"Available indexes: {[idx['name'] for idx in indexes]}")

# 2. Get context from a specific index
index_id = indexes[0]['index_id']
response = requests.post(
    "https://www.goharvest.ai/api/v1/developer/get-context",
    headers={"API-Key": "your-api-key", "Content-Type": "application/json"},
    json={"query": "how to make POST request", "index_id": index_id}
)
context = response.json()['data']['context']
print(context)
Use the index_id values returned from list-indexes to query specific services with get-context.

Next Steps

I