# Business Phone Finder (`oneary/business-phone-finder`) Actor

Find public business phones from company websites. Validated E.164 numbers with source URLs. Name search is best-effort; no-match rows are billed.

- **URL**: https://apify.com/oneary/business-phone-finder.md
- **Developed by:** [Luan M.](https://apify.com/oneary) (community)
- **Categories:** Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 dataset records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Business Phone Finder

Clean-room, in-house implementation. Finds **public business phone numbers** from a company's name, domain, or website URL.

**Sources:** the **company's own website** (homepage plus contact and about pages), and **public DuckDuckGo/Bing search** only to resolve **company name -> website**.

No third-party APIs, no private data.

**Scope:** the **business or institutional phone number published by the company**. It does not collect individuals' personal mobile numbers.

### Pricing

US$ 0.005 per start + US$ 0.025 per record written to the dataset (US$ 25 / 1,000 records).

Rows with no match (`phone: null`) **also count as a billed record**, because they document the target that was processed. You are not charged per confirmed active phone.

### Input

| field | type | default | description |
|---|---|---|---|
| `queries` | array | — | company names, domains, or URLs |
| `countryCode` | string | `BR` | country used to validate numbers in national format |
| `maxPagesPerSite` | int | `6` | pages visited per site |
| `maxResultsPerQuery` | int | `20` | maximum phones per target |
| `resolveNames` | bool | `true` | use DuckDuckGo to resolve name -> site |
| `useApifyProxy` | bool | `false` | route requests through Apify Proxy |

### Output (dataset)

```json
{
  "query": "https://www.stone.com.br/suporte-stone",
  "site": "stone.com.br",
  "phone": "+558003260506",
  "phoneType": "toll_free",
  "method": "tel_link",
  "confidence": 0.86,
  "sourceUrl": "https://www.stone.com.br/suporte-stone"
}
```

- `phone` is always in **E.164** (`+5511999999999`).
- `phoneType`: `landline` | `mobile` | `toll_free` | `voip` | `unknown`.
- `method`: `tel_link` | `json_ld` | `text_scan` (the more structured, the higher the confidence).
- A target with no phone produces an item with `phone: null` (so there's a record that it was tried).

### Engineering notes

- `phonenumbers` validates and classifies numbers. Invalid numbers are dropped, never converted by simply adding a prefix.
- `tel:` links and `telephone` in JSON-LD (schema.org) are the highest-confidence sources.
- Requests use a browser User-Agent, with retry and backoff on 429/5xx.
- Data is pushed to the dataset with the Apify SDK (`Actor.push_data`).
- Exact row contract: `OUTPUT_SCHEMA.json`; it includes `shared_cost`, `landline_or_mobile`, and `premium_rate`.
- Tests: `python3 -m unittest discover -s tests -v`. The build runs the tests.
- Local run: `python3 -m src.main src/input.json`; output goes to `out/dataset.json`.

### Limitations

Prefer the official domain or a contact URL. Name resolution is best-effort, can fail because of CAPTCHAs or rate limits, and does not verify company ownership. The actor does not make up domains after a search with no results. It does not render JavaScript or get around site blocking. A `phone: null` row can also mean an access or search failure, not that there is no phone.

`confidence` is an extraction heuristic, not a calibrated probability that the number belongs to the company or that the line is active. The real cost depends on run time, memory, storage, and the optional proxy; check each run's `usageTotalUsd`.

# Actor input Schema

## `queries` (type: `array`):

Lista de alvos. Aceita nome da empresa (ex.: 'Magazine Luiza'), dominio (ex.: 'magazineluiza.com.br') ou URL completa. Nomes sao resolvidos para o site via busca publica.

## `countryCode` (type: `string`):

Codigo ISO de 2 letras do pais usado para validar/normalizar numeros em formato nacional (ex.: BR, US, PT). A saida e sempre E.164.

## `maxPagesPerSite` (type: `integer`):

Quantas paginas do site visitar por alvo (homepage + paginas de contato/sobre encontradas).

## `maxResultsPerQuery` (type: `integer`):

Trava de volume: numero maximo de telefones devolvidos por alvo.

## `resolveNames` (type: `boolean`):

Quando o alvo e um nome (nao um dominio/URL), usar busca publica DuckDuckGo para achar o site. Desligue se ja for passar dominios/URLs.

## `useApifyProxy` (type: `boolean`):

Rotear as requisicoes pelo proxy do Apify. Ajuda quando o site bloqueia o IP do datacenter.

## `siteTimeoutSecs` (type: `integer`):

Deadline por alvo; ao estourar, devolve o que achou ate ali.

## `maxConcurrency` (type: `integer`):

Quantos sites processar ao mesmo tempo.

## `renderJs` (type: `boolean`):

Fallback com Chromium headless (Playwright) so quando a coleta estatica nao achou telefone.

## `proxyOnBlock` (type: `boolean`):

Em 403/429/erro de rede, tenta de novo pelo Apify Proxy.

## `deeplookBaseUrl` (type: `string`):

Instancia DeepLook (getdeeplook.dev) para renderizar JS via POST /v1/open, antes do Playwright.

## `deeplookApiKey` (type: `string`):

Bearer token da instancia DeepLook.

## Actor input object example

```json
{
  "queries": [
    "https://www.stone.com.br/suporte-stone",
    "https://nubank.com.br/contatos"
  ],
  "countryCode": "BR",
  "maxPagesPerSite": 4,
  "maxResultsPerQuery": 20,
  "resolveNames": true,
  "useApifyProxy": false,
  "siteTimeoutSecs": 30,
  "maxConcurrency": 4,
  "renderJs": true,
  "proxyOnBlock": true
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset records produced by the Actor.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "https://www.stone.com.br/suporte-stone",
        "https://nubank.com.br/contatos"
    ],
    "maxPagesPerSite": 4,
    "siteTimeoutSecs": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("oneary/business-phone-finder").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "queries": [
        "https://www.stone.com.br/suporte-stone",
        "https://nubank.com.br/contatos",
    ],
    "maxPagesPerSite": 4,
    "siteTimeoutSecs": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("oneary/business-phone-finder").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "https://www.stone.com.br/suporte-stone",
    "https://nubank.com.br/contatos"
  ],
  "maxPagesPerSite": 4,
  "siteTimeoutSecs": 30
}' |
apify call oneary/business-phone-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,oneary/business-phone-finder"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pWj3XzcSD1FgIZrBB/builds/ISXjfo4DGo2L76lsl/openapi.json
