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

# Trova Telefoni

> Trova più numeri di telefono in un unico batch (fino a 3.000 ricerche) a partire da URL LinkedIn oppure nome e azienda, con notifiche webhook

<Badge color="green">POST</Badge>

```
https://api.enrow.io/phone/bulk
```

Esegui più ricerche di numeri di telefono in un'unica richiesta. Fino a 3.000 ricerche per batch. Autentica ogni richiesta con la tua [chiave API](/it/authentication) nell'header `x-api-key`. Per trovare un singolo numero di telefono, usa l'endpoint [Trova Telefono](/it/api-reference/phone/find-single).

Ogni ricerca deve contenere uno tra:

* L'URL del **profilo LinkedIn** di una persona (ad esempio, `https://www.linkedin.com/in/michael-scott/`)
* La combinazione di informazioni individuali: `firstname` + `lastname` + (`company_name` o `company_domain`)

L'**URL LinkedIn avrà sempre la precedenza** sulle informazioni individuali se entrambi sono presenti.

## Request Body

<ParamField body="searches" type="array of objects" required>
  Payload di ricerca per i quali trovare i numeri di telefono corrispondenti.

  <Expandable title="proprietà dell'oggetto search">
    **Opzione 1 (Consigliata):**

    <ParamField body="linkedin_url" type="string">
      URL del profilo LinkedIn
    </ParamField>

    **Opzione 2:**

    <ParamField body="firstname" type="string">
      Nome
    </ParamField>

    <ParamField body="lastname" type="string">
      Cognome
    </ParamField>

    <ParamField body="company_domain" type="string">
      Dominio dell'azienda
    </ParamField>

    <ParamField body="company_name" type="string">
      Nome dell'azienda (alternativa a `company_domain`)
    </ParamField>

    **Aggiuntivo:**

    <ParamField body="custom" type="string">
      Un valore personalizzato per fare riferimento a un ID interno. Sarà presente nei risultati.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="custom" type="object">
  Parametri personalizzati che verranno restituiti nella risposta GET e nella notifica webhook.
</ParamField>

<ParamField body="settings" type="object">
  Impostazioni relative all'intera ricerca in batch.

  <Expandable title="proprietà settings">
    <ParamField body="webhook" type="string">
      Un URL che verrà notificato tramite una richiesta HTTP POST una volta completata la ricerca in batch. Vedi [Come funzionano i webhook](/it/how-webhooks-work).
    </ParamField>
  </Expandable>
</ParamField>

## Response

### 201 — Ricerca in batch creata

<ResponseField name="message" type="string">
  Messaggio di conferma
</ResponseField>

<ResponseField name="id" type="string">
  Identificatore univoco per questo batch. Usalo per recuperare i risultati tramite l'[endpoint GET](/it/api-reference/phone/get-bulk-results).
</ResponseField>

<ResponseField name="credits_used" type="number">
  Crediti totali consumati. Vedi [Crediti e fatturazione](/it/credits-billing) per i costi per endpoint.
</ResponseField>

<ResponseField name="estimated_duration" type="number">
  Tempo di elaborazione stimato in minuti (non garantito)
</ResponseField>

<ResponseField name="credits" type="object">
  Dettaglio dei crediti

  <Expandable title="proprietà credits">
    <ResponseField name="amount" type="number">
      Crediti consumati
    </ResponseField>

    <ResponseField name="source" type="string">
      Origine dei crediti: `sub` (abbonamento) o `paygo` (pay-as-you-go)
    </ResponseField>

    <ResponseField name="split" type="object">
      Suddivisione tra crediti dell'abbonamento e crediti pay-as-you-go (`fromSub`, `fromPaygo`)
    </ResponseField>
  </Expandable>
</ResponseField>

### Risposte di errore

| Code    | Message                                                       |
| ------- | ------------------------------------------------------------- |
| **400** | `At least 1 phone search must be present in the payload`      |
| **400** | `Missing payload`                                             |
| **400** | `Too many searches. Limit is currently at 3000 per batch.`    |
| **401** | `This apikey is not valid`                                    |
| **401** | `This account is not allowed to use the phone search feature` |
| **402** | `Insufficient credits`                                        |

<Note>
  Quando i crediti sono insufficienti, l'endpoint in batch restituisce HTTP **402** con un corpo nel formato `{ "message": "..." }`. Vedi [Gestione degli errori](/it/error-handling) per l'elenco completo dei codici di stato e dei formati di risposta.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.enrow.io/phone/bulk \
    --header 'Content-Type: application/json' \
    --header 'x-api-key: YOUR_API_KEY' \
    --data '{
      "searches": [
        {
          "linkedin_url": "https://www.linkedin.com/in/michael-scott"
        },
        {
          "linkedin_url": "https://www.linkedin.com/in/dwight-schrute"
        }
      ],
      "settings": {
        "webhook": "https://your-app.com/webhooks/enrow/phone"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.enrow.io/phone/bulk', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': process.env.ENROW_API_KEY
    },
    body: JSON.stringify({
      searches: [
        { linkedin_url: 'https://www.linkedin.com/in/michael-scott' },
        { linkedin_url: 'https://www.linkedin.com/in/dwight-schrute' }
      ],
      settings: {
        webhook: 'https://your-app.com/webhooks/enrow/phone'
      }
    })
  });

  const data = await response.json();
  console.log(`Batch ID: ${data.id}`);
  ```

  ```python Python theme={null}
  import requests
  import os

  url = "https://api.enrow.io/phone/bulk"
  headers = {
      "Content-Type": "application/json",
      "x-api-key": os.getenv("ENROW_API_KEY")
  }
  payload = {
      "searches": [
          {"linkedin_url": "https://www.linkedin.com/in/michael-scott"},
          {"linkedin_url": "https://www.linkedin.com/in/dwight-schrute"}
      ],
      "settings": {
          "webhook": "https://your-app.com/webhooks/enrow/phone"
      }
  }

  response = requests.post(url, json=payload, headers=headers)
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "credits_used": 80,
    "estimated_duration": 1,
    "id": "e3b61122-d6a6-4ea7-b331-9b734682a76a",
    "message": "Bulk search operating",
    "credits": {
      "amount": 80,
      "source": "sub",
      "split": {
        "fromPaygo": 0,
        "fromSub": 80
      }
    }
  }
  ```

  ```json Error Response theme={null}
  {
    "message": "..."
  }
  ```
</ResponseExample>

## Passaggi successivi

<CardGroup cols={2}>
  <Card title="Ottieni risultati batch" icon="inbox" href="/it/api-reference/phone/get-bulk-results">
    Recupera i numeri di telefono trovati usando l'`id` del batch.
  </Card>

  <Card title="Trova un singolo telefono" icon="phone" href="/it/api-reference/phone/find-single">
    Esegui una singola ricerca di telefono da un URL LinkedIn oppure nome e azienda.
  </Card>

  <Card title="Webhook" icon="bell" href="/it/how-webhooks-work">
    Ricevi una notifica automatica al completamento di una ricerca in batch.
  </Card>

  <Card title="Crediti e fatturazione" icon="coins" href="/it/credits-billing">
    Scopri come vengono consumati i crediti per ciascun endpoint.
  </Card>
</CardGroup>
