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

# Find phone numbers | Agent guide

> Find a phone number for a known person, with an optional mobile-only acceptance rule.

[Human guide: task steps and agent prompt →](https://deepline.com/docs/human/plays/task-find-mobile-phone.md)

Use `prebuilt/person-to-phone` for one known person or
`prebuilt/person-to-phone-batch` for a CSV. Both require `first_name` and
`last_name`; domain, email, or LinkedIn URL adds identity context. `country`
helps normalize national-format numbers, not select geographic providers.

## Choose the line-type rule

The default accepts a valid line, including landlines. Set `require_mobile: true`
when only mobile numbers qualify. A validated non-mobile candidate is rejected
and the Play continues its configured route.

[Inspect the maintained contract](https://deepline.com/docs/sdk-v2/prebuilt-plays.md) before execution.
This fictional lookup illustrates mobile-only input; replace it with an
authorized person. The command starts provider work and can incur usage:

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline plays run prebuilt/person-to-phone \
  --input '{"first_name":"Jane","last_name":"Doe","domain":"example.com","require_mobile":true}' \
  --watch
```

For a file, inspect the batch's actual column mapping. Default headers include
`FIRST_NAME`, `LAST_NAME`, `COMPANY_DOMAIN`, `CONTACT_EMAIL`, and `LINKEDIN_URL`.
Use [CSV input](https://deepline.com/docs/sdk-v2/batch-csv.md) for different headers and sampling, then
[inspect the saved run](https://deepline.com/docs/sdk-v2/calling-plays.md#inspect-and-export-an-existing-run).

## Check the returned number

Read `phone`, `phone_validated`, `phone_line_type`, `phone_source`, and
`phone_reject_reason`. Retain attempt evidence and unresolved outcomes; a
completed run need not contain an accepted number.

| Result under `require_mobile: true` | Decision |
| - | - |
| Validated mobile and matching person identity | Accept the channel |
| Validated landline | Reject as non-mobile; retain line-type evidence |
| Request error without a number | Record a provider error, not an invalid number |

Keep supplied country, source, observation time, rejection and no-result
reasons, and scoped usage. Formatting and validation do not establish ownership,
reachability, or permission to call. Preserve the mobile-only rule even when a
row remains unresolved.

## Use Apollo when explicitly requested

> [accordion] Apollo matching and asynchronous phone results
>
> Apollo requires your own connected Apollo API key; Deepline has no managed
> Apollo access. Use it only when you explicitly request Apollo and confirm the
> key is connected. An owner or admin can [connect the account](https://deepline.com/docs/integrations.md).
>
> [Free preview search](https://deepline.com/docs/providers/apollo/apollo-search-people.md) masks last names.
> [Search with match](https://deepline.com/docs/providers/apollo/search-people-with-match.md) performs paid
> matching for full identities. Inspect the selected action's access, inputs,
> and pricing before execution.
>
> This fictional person illustrates a name-and-domain match. Replace it with an
> authorized record; execution can incur usage:
>
> ```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
> deepline describe apollo_people_match --json
> deepline run apollo_people_match \
>   --input '{"first_name":"Jane","last_name":"Doe","domain":"example.com"}' \
>   --json-out match.json
> ```
>
> This request omits phone reveal. Check the person and employer, retain missing
> fields and the execution ID, and keep provider failures separate from no match.
> For a lost response, [recover that execution](https://deepline.com/docs/sdk-v2/tool-execution-recovery.md)
> before submitting again.
>
> For phone reveal:
>
> 1. Add `reveal_phone_number: true` and `poll_only: true` to the inspected match
>    input; omit `webhook_url`. Submit once and save the returned exact request ID.
>    Initial match completion does not mean phone results are ready.
>
> 2. Use `request_id_exact` from the launch response. In a Play, read
>    `result.toolResponse.rawV2.request_id_exact`, or that field within the
>    provider's `data` envelope. Pass this exact string as `request_id`:
>
>    ```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
>    deepline run apollo_poll_webhook_result \
>      --input '{"request_id":"<request_id_exact>"}' \
>      --json-out phone-poll.json
>    ```
>
>    Preserve large IDs as strings. Converting an already-rounded numeric ID to
>    a string cannot repair it; recover the original exact response.
>
> 3. While the poll is `running`, wait `retry_after_seconds` when supplied.
>    Bound the wait and save the ID to resume later; pending results do not
>    justify another enrichment submission.
>
> 4. Read completed `webhook_result.people[].phone_numbers` and join people by
>    `id`, not array position. A completed empty phone list is a no-result.
>    `request_id_unknown`, `request_id_expired`, and `invalid_request_id` are
>    terminal: stop polling. Check the original ID for unknown/invalid results;
>    expiration requires fresh enrichment.
>
> The [poll action reference](https://deepline.com/docs/providers/apollo/apollo-poll-webhook-result.md)
> owns exact inputs and responses. Callback delivery instead uses your own
> `webhook_url` without `poll_only`; callback delivery status can remain
> `in_progress` after result data is ready.


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