Documentation Index
Fetch the complete documentation index at: https://docs.thehog.ai/llms.txt
Use this file to discover all available pages before exploring further.
Every request to The Hog API — except the public health endpoint — requires authentication. You authenticate by including your credentials in the request headers. The API supports two credential formats: a single API key sent as a Bearer token, or an access key and secret key pair sent as separate headers.
Keep your API keys and secret keys secure. Never expose them in client-side code, public repositories, or logs. If a key is compromised, rotate it immediately from your account settings.
Authentication methods
API key
Access key + secret key
Use your API key as a Bearer token in the Authorization header. This is the simplest authentication method and works for all endpoints.Authorization: Bearer <your-api-key>
Example request:curl -X POST https://api.thehog.ai/api/companies/search \
-H "Authorization: Bearer hog_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"query": "Salesforce", "limit": 5}'
If you have been issued an access key and secret key pair, send them as separate headers. Do not use the Authorization header when using this method.X-Access-Key: ak_xxxxxxxxxxxxxxxx
X-Secret-Key: sk_xxxxxxxxxxxxxxxx
Example request:curl -X POST https://api.thehog.ai/api/companies/search \
-H "X-Access-Key: ak_xxxxxxxxxxxxxxxx" \
-H "X-Secret-Key: sk_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"query": "Salesforce", "limit": 5}'
Adding project context
On any authenticated request, you can include the optional X-Project-Id header to scope the operation to your project. When present, The Hog uses your project’s brand voice, messaging guide, personas, and competitive intel to shape search rankings, generated content, and signal classifications.
X-Project-Id: proj_xxxxxxxxxxxxxxxx
Example with project context:
curl -X POST https://api.thehog.ai/api/companies/search \
-H "Authorization: Bearer hog_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "X-Project-Id: proj_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"query": "enterprise data platforms", "limit": 10}'
Authentication errors
| Status code | Meaning | What to check |
|---|
401 Unauthorized | Missing or invalid credentials | Verify your API key or access/secret key pair is correct and has not been revoked. |
403 Forbidden | Valid credentials but insufficient permissions | Your key does not have access to this endpoint or resource. Check your plan and permissions. |
All error responses follow a consistent shape:
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid or missing authentication token",
"path": "/api/companies/search",
"requestId": "01HZXAMPLE000000000000000",
"timestamp": "2025-06-01T12:00:00.000Z"
}
Every API response includes an X-Request-Id header. Include this value when contacting support — it lets the team trace your specific request.
Next steps
Once you can authenticate successfully, follow the quickstart to make your first company search, find people, and enrich a contact.