Skip to main content
Agent quickstart flow: a setup prompt sends a coding agent to the Forager docs as Markdown, then into your projectAgent quickstart flow: a setup prompt sends a coding agent to the Forager docs as Markdown, then into your project
This page is written for coding agents such as Claude Code, Codex or Cursor. To use it, paste this prompt into your agent:
Setup prompt

Instructions for the agent

Follow these steps in order. Ask the user before any step that spends credits.
1

Get the credentials from the user

You can’t create a Forager account or API key yourself. Ask the user to:
  1. Sign up at app.forager.ai, or sign in.
  2. Create a key on the API page.
  3. Copy the Account ID from My Account.
Then:
  • Store them as FORAGER_API_KEY and FORAGER_ACCOUNT_ID in the project’s existing secrets setup, such as .env (gitignored) or the platform’s secret store.
  • Never write the key into source files, logs, prompts or client-side code.
2

Learn the API

The essentials:
  • Server https://api-v2.forager.ai.
  • Send the key in the X-API-KEY header.
  • Most paths include {account_id}.
3

Write a small server-side client

Follow the project’s existing conventions for HTTP calls, configuration and errors. The client should:
  • Read FORAGER_API_KEY and FORAGER_ACCOUNT_ID from the environment.
  • Send JSON bodies with Content-Type: application/json.
  • Treat 403 as a credentials problem and surface it clearly.
  • Back off and retry on 429, as described in API errors and rate limits.
  • Handle an empty result as “not found”, not as an error.
If the project matches a recipe, follow the recipe instead. See Recipes; each starts with its own prompt.
4

Check the cost, then test one call

Most lookups spend credits; see credits and pricing. A phone number lookup costs 15 credits per lookup.
  • Tell the user what a test call costs and get a yes before you send it.
  • Prefer one request with a known LinkedIn public identifier the user gives you.
  • Never loop over real data during setup.
5

Add tests and document the setup

  • Add tests that mock the HTTP layer. Tests must not call the live API or spend credits.
  • Document the two environment variables and how to try the integration.

Rules for agents

Coding agent setup asks the user to approve one test call before spending Forager creditsCoding agent setup asks the user to approve one test call before spending Forager credits
  • Don’t guess credit costs, endpoints or field names. Use credit pricing and the API reference.
  • Don’t call the API from browser code; the key would be exposed.
  • Report bad data with the feedback endpoints instead of retrying the same lookup.
  • The docs MCP server at /mcp searches these docs only. It does not call the Forager API.
Last modified on October 28, 2026