API Resources
Our API is organized around REST principles with predictable, resource-oriented URLs.Base URL
Authentication
All requests require an API key passed in theAuthorization header:
API keys are sensitive credentials. Never share them publicly or commit them to version control.
OpenAPI Spec
Download the OpenAPI 3.1 specification to import into Postman, Insomnia, or any API client:Download OpenAPI Spec
openapi.json
Billing
Our API consumes credits for Search and Research operations:- Search: 2 credits per search request (charged when search completes)
- Research: 1 credit per successful, completed research
Error Response Format
All errors follow the RFC 7807 Problem Details format:| Field | Description |
|---|---|
type | A URI reference that identifies the problem type |
title | A short, human-readable summary of the problem |
status | The HTTP status code |
detail | A human-readable explanation specific to this occurrence |
instance | A URI reference that identifies the specific occurrence |
HTTP Status Codes
2xx Success
| Code | Description |
|---|---|
200 OK | Request succeeded |
4xx Client Errors
400 Bad Request
400 Bad Request
The request was malformed or contains invalid parameters.Common Causes:Solution: Check your request body against the API documentation
- Missing required fields
- Invalid JSON format
- Empty or invalid values
402 Payment Required
402 Payment Required
You don’t have enough credits to perform this operation.Common Causes:Solution: Purchase more credits from your Settings page
- Account has zero credits
- Insufficient credits for the requested operation
403 Forbidden
403 Forbidden
You don’t have permission to access the requested resource.Common Causes:Solution: Verify you have access to the resources you’re requesting
- Attempting to access another user’s research
- Insufficient permissions for the operation
404 Not Found
404 Not Found
The requested resource doesn’t exist.Common Causes:Solution: Check the resource ID and endpoint URL
- Invalid endpoint URL
- Resource has been deleted
- Wrong research ID
422 Validation Error
422 Validation Error
The request body failed validation.Common Causes:Solution: Ensure all required fields are present and correctly formatted
- Missing required fields
- Invalid field types
- Fields that don’t match expected format
429 Too Many Requests
429 Too Many Requests
You’ve exceeded the rate limit.Common Causes:Solution: Implement exponential backoff and respect rate limits
- Making too many research requests per hour
- Burst of requests in short time period
5xx Server Errors
500 Internal Server Error
500 Internal Server Error
Something went wrong on our end.Example:Solution:
- Retry the request with exponential backoff
- If the issue persists, contact us on Discord
Error Handling Best Practices
Check Status Codes
Always check the HTTP status code before parsing the response:Implement Retry Logic
For transient errors (429, 500, 503), implement exponential backoff:Validate Input Before Sending
Catch errors early by validating input:Log Errors for Debugging
Always log error details:Common Error Scenarios
Invalid API Key
Empty Description
Research Not Found
Insufficient Credits
Empty Search Results
include_my_connections or include_friends_connections to true, but you haven’t uploaded any connections to search across.
Fix: Upload your LinkedIn connections at happenstance.ai before searching. Alternatively, search within specific groups by providing group_ids.
Need Help?
Research Reference
Detailed endpoint documentation
Support
Contact our support team
