> ## 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.

# People search by job title and company

> Find people by job title and role with the Person Role Search API, then use the person ID in other lookups.

![People search by job title, company and location returns a list of matching people](https://mintcdn.com/forager/OnhSHNo_LBQ7yKjR/images/illustrations/people-search-by-job-title-company.svg?fit=max\&auto=format\&n=OnhSHNo_LBQ7yKjR\&q=85\&s=6012dc68b7304ac1342973db53a340c2)

Use this to find people by role: title, description, whether the role is current, and filters on the person or organization.

## Search

Send a `POST` to [Person role search](https://www.forager.ai/docs/openapi/people/datastorage_person_role_search_create.md). `role_title` supports a boolean text search query.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api-v2.forager.ai/api/$FORAGER_ACCOUNT_ID/datastorage/person_role_search/" \
     -H "X-API-KEY: $FORAGER_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
           "role_title": "Software Engineer",
           "role_is_current": true
         }'
```

Set `FORAGER_API_KEY` and `FORAGER_ACCOUNT_ID` in your shell first, as in the [quickstart](https://www.forager.ai/docs/api-overview/send-your-first-request.md). See [Authentication](https://www.forager.ai/docs/api-overview/authentication.md).

The response has `search_results` and `total_search_results`. The [Recipes](https://www.forager.ai/docs/api-overview/recipes.md) page shows a sample response and how to take the `person.id` into a phone number lookup.

## Narrow the search with IDs

Filters such as `person_skills`, `person_locations`, `person_industries`, `organizations` and `organization_keywords` take numeric IDs. Get them from the [Autocomplete](https://www.forager.ai/docs/openapi/autocomplete) endpoints. Autocomplete is limited to 10 requests per second per account.

## Count first

[Person role search totals](https://www.forager.ai/docs/openapi/people/datastorage_person_role_search_totals_create.md) accepts the same filters and returns `total_search_results`, `total_persons` and `total_organizations`. Use it to check the size of a query before paging through results with `page`.

## Costs

See [Credit pricing](https://www.forager.ai/docs/api-overview/credit-pricing.md).


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