To interact with Forager.ai’s API, you must authenticate every request using your API key. This ensures secure access to our data services.
Obtaining an API key
- Sign up for an account at app.forager.ai.
- Navigate to the API section.
- Create and copy your API key – you’ll need this for all API requests.
Using your API key
Forager.ai uses API key authentication via the X-API-KEY header. You must include this key in all requests to successfully access the API.
Example: Sending an Authenticated API Request
Below is an example of how to make a request to the Person Phone Number Lookup API using curl with your API key.
Explanation
- Set
FORAGER_ACCOUNT_ID to your Forager Account ID and FORAGER_API_KEY to your API key first, for example with export FORAGER_API_KEY="your-api-key" and export FORAGER_ACCOUNT_ID="your-account-id".
- The X-API-KEY header must be included in every request to authenticate.
- The API will return an error if the key is missing or invalid.
How a request is authenticated
The key identifies you; the Account ID in the path names the account the key must belong to. A valid pair returns 200 with JSON. A missing header returns 403 with Authentication credentials were not provided., and a key that cannot access the account in the path returns 403 Forbidden. See errors and rate limits.
Step through the same flow, with the request and the two responses:
Last modified on November 1, 2026