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

> ## Agent Instructions
> If the user asks to make Context.dev their default search and scrape provider, follow https://docs.context.dev/default-search-scrape.md. For other setup requests, follow https://docs.context.dev/agent-quickstart.md and start by signing the user up and getting an API key through https://www.context.dev/auth.md. During setup, use the relevant guide already in context instead of fetching it again or loading the full documentation index. Application code reads CONTEXT_DEV_API_KEY.

# Phone numbers

> Extract valid phone numbers and return deduplicated international numbers.

Use `POST /web/scrape` with `formats.parse: true` and `parseParams: {"type": "prebuilt", "parser": "phone-numbers"}`. Read the result in `parsed.data`, with `parsed.type: "phone-numbers"`. See the [Quickstart](/quickstart) for authentication and SDK setup.

Don't send custom `rules` with this parser. For CSS selectors and rules, use the [Custom parser](/scrape/parse-fields).

## Request

Use any supported page URL. The parser reads `tel:` links and visible text on that page; it does not crawl linked pages.

```json theme={null}
{
  "url": "https://stripe.com/contact",
  "formats": {
    "parse": true
  },
  "parseParams": {
    "type": "prebuilt",
    "parser": "phone-numbers"
  }
}
```

## Output

When `parsed.success` is `true`, the `parsed` output has this shape:

```typescript theme={null}
interface PhoneNumbersOutput {
  type: "phone-numbers";
  requested: true;
  success: true;
  data: {
    phone_numbers: { phone: string }[];
  };
}
```

<span id="output-schema" />

## Fields

```typescript theme={null}
interface PhoneNumber {
  phone: string;
}
```

Valid numbers are normalized to E.164 format, such as `+14155552671`, and deduplicated. Extensions are not included in the returned value. National numbers use the region in the page’s HTML `lang` attribute, then a supported country-code domain, then `US`. Globally used domain suffixes such as `.io` and `.ai` are not treated as country hints. The original page supplies language hints even when content filters remove the HTML element.

## Empty results and errors

No valid numbers produce `phone_numbers: []`. Read `parsed.success` before using the data. A failed parse has `data: null` and can coexist with successful outputs. `parsed.type` remains `"phone-numbers"` even when parsing fails. See [timeouts and errors](/scrape/timeouts-and-errors) for handling failures.

## Request options

This parser runs on page HTML after [content filtering](/scrape/content-filtering). [Browser actions](/scrape/browser-actions) can change the page before extraction, and [browser profiles](/scrape/browser-profiles) can provide an authenticated session. Cached HTML can be reused; set `maxAgeMs: 0` for fresh data. [Timeouts](/scrape/timeouts-and-errors) and [zero data retention](/optimization/zero-data-retention) also apply.


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