> ## Documentation Index
> Fetch the complete documentation index at: https://www.forager.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Forager is a REST API for B2B people, company and job post data: contact lookups (phone numbers, personal emails, work emails), person, company and job post search, and bulk data feeds.
> Server: https://api-v2.forager.ai. Send the API key in the X-API-KEY header. Most paths include {account_id}. Read FORAGER_API_KEY and FORAGER_ACCOUNT_ID from the environment; never put the key in client-side code, logs or prompts.
> To add Forager to a project, follow https://www.forager.ai/docs/guides/agent-quickstart.md. To pick an endpoint, read https://www.forager.ai/docs/guides/choose-an-endpoint.md. For end-to-end builds, see https://www.forager.ai/docs/recipes/overview.md.
> Most requests spend credits. Do not guess costs; use https://www.forager.ai/docs/api-overview/credit-pricing.md and ask the user before spending credits.
> Use only endpoints and fields defined in https://www.forager.ai/docs/openapi.yaml. Forager has no MCP server for the API yet; the /mcp endpoint on this site searches the documentation only.

# Track hiring signals with job posts

> Watch target companies for new job posts with job post search, resolve company IDs with autocomplete, and alert only on posts you have not seen.

```text Recipe prompt theme={"theme":{"light":"github-light","dark":"github-dark"}}
Implement this recipe in my project: https://www.forager.ai/docs/recipes/hiring-signals.md

Build a scheduled job that watches a list of target companies for new job posts. Resolve each company to an ID with the Forager organizations autocomplete, run the job post search with organization_ids, is_active and date_featured_start, and page through results with the page field. Store the ids of posts already seen and alert only on new ones. Handle empty results, a 403, and a 429 with backoff, and cache the company IDs. Keep the API key server-side in FORAGER_API_KEY with FORAGER_ACCOUNT_ID. Add tests that stub the HTTP calls.
```

![Hiring signals: a target company and its recent job posts](https://mintcdn.com/forager/4wLamkiYCyhA7GPC/images/recipes/hiring-signals-job-posts.svg?fit=max\&auto=format\&n=4wLamkiYCyhA7GPC\&q=85\&s=ff5e3ef99f0891db26853cedd2f1d4bf)

## What you'll build

A daily check for hiring activity. You keep a list of target companies. Each run asks Forager for their active job posts since the last run, compares them with the posts you have already seen, and sends an alert for the new ones.

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
flowchart LR
  A[Target companies] --> B[Organization IDs]
  B --> C[Job post search]
  C --> D[Drop seen posts]
  D --> E[Alert]
```

## Steps

**1. Resolve companies to IDs**

Call [Organizations lookup](https://www.forager.ai/docs/openapi/autocomplete/v1_organization_lookup.md) with `q` set to a company name or domain. The `text` field reads "name - domain", so you can confirm the right company. Do this once per company and store the `id`.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -G "https://api-v2.forager.ai/api/$FORAGER_ACCOUNT_ID/datastorage/autocomplete/organizations/" \
  -H "X-API-KEY: $FORAGER_API_KEY" \
  --data-urlencode "q=example.com"
```

```python Python (requests) theme={"theme":{"light":"github-light","dark":"github-dark"}}
import os, requests

BASE = f"https://api-v2.forager.ai/api/{os.environ['FORAGER_ACCOUNT_ID']}/datastorage"
HEADERS = {"X-API-KEY": os.environ["FORAGER_API_KEY"]}

r = requests.get(f"{BASE}/autocomplete/organizations/", headers=HEADERS, params={"q": "example.com"}, timeout=30)
r.raise_for_status()
org_ids = [int(item["id"]) for item in r.json()["results"][:1]]
```

```javascript JavaScript (fetch) theme={"theme":{"light":"github-light","dark":"github-dark"}}
const BASE = `https://api-v2.forager.ai/api/${process.env.FORAGER_ACCOUNT_ID}/datastorage`;
const headers = {
  "X-API-KEY": process.env.FORAGER_API_KEY,
  "Content-Type": "application/json",
};

const res = await fetch(`${BASE}/autocomplete/organizations/?q=example.com`, { headers });
if (!res.ok) throw new Error(`Forager ${res.status}`);
const orgIds = (await res.json()).results.slice(0, 1).map((item) => Number(item.id));
```

**2. Search their active job posts**

Send a `POST` to [Job post event search](https://www.forager.ai/docs/openapi/job-posts/datastorage_job_search_create.md). `date_featured_start` takes a date such as `2026-01-01`. `title` supports a boolean text query, so you can watch for a team, such as `"data engineer" OR "analytics engineer"`.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api-v2.forager.ai/api/$FORAGER_ACCOUNT_ID/datastorage/job_search/" \
  -H "X-API-KEY: $FORAGER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"organization_ids": [123], "is_active": true, "date_featured_start": "2026-01-01", "page": 1}'
```

```python Python (requests) theme={"theme":{"light":"github-light","dark":"github-dark"}}
r = requests.post(
    f"{BASE}/job_search/",
    headers=HEADERS,
    json={
        "organization_ids": org_ids,
        "is_active": True,
        "date_featured_start": "2026-01-01",
        "page": 1,
    },
    timeout=30,
)
r.raise_for_status()
posts = r.json()["search_results"]
```

```javascript JavaScript (fetch) theme={"theme":{"light":"github-light","dark":"github-dark"}}
const r = await fetch(`${BASE}/job_search/`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    organization_ids: orgIds,
    is_active: true,
    date_featured_start: "2026-01-01",
    page: 1,
  }),
});
if (!r.ok) throw new Error(`Forager ${r.status}`);
const posts = (await r.json()).search_results;
```

Each post has `id`, `title`, `url`, `date_featured`, `is_remote`, `is_active`, `location` and `organization` (with `name` and `domain`). The `source` field says where the post came from. To filter on it, set `job_source` to `indeed`, `linkedin` or `angellist`.

**3. Keep only new posts and alert**

Compare each post's `id` with the ids you stored. Alert on the ones you have not seen, then save them. Set `date_featured_start` to the date of your last run so each run asks for less. Group alerts by `organization.name` so a sales rep sees "Example Corp opened 4 roles".

## Handle the edge cases

* **Not found.** An empty `search_results` means no posts for that company and filter. Treat it as no signal, not an error. If autocomplete returns nothing for a company, check the domain spelling.
* **403.** The key is missing or invalid. Fix the credentials; do not retry.
* **429.** Autocomplete allows 10 requests per second per account, so resolve companies once and cache the IDs. Back off on any 429. See [errors and rate limits](https://www.forager.ai/docs/errors-and-rate-limits.md).
* **Paging.** Use `page`, and stop when you have the number in `total_search_results`.
* **Credits.** A job search costs 2 credits per request. Autocomplete is free. Job search totals cost: Not yet documented. See [credit pricing](https://www.forager.ai/docs/api-overview/credit-pricing.md).

## Related

> [card] [Search job posts](https://www.forager.ai/docs/guides/search-job-posts.md)
>
> Every job search filter.

> [card] [Find filter values](https://www.forager.ai/docs/guides/find-filter-values.md)
>
> Which autocomplete feeds which filter.

> [card] [Job post event search](https://www.forager.ai/docs/openapi/job-posts/datastorage_job_search_create.md)
>
> Request and response reference.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.