# Porte mobili e rotazione degli IP

> API LocalSERP Proxy: porte 4G/5G, rotazione IP (subito, programmata o tramite link) e traffico giornaliero. Parametri, esempi di risposta e codice per curl, Python e Node.js.

- URL: https://localserpproxy.com/it/docs/api/mobile/
- Ultimo aggiornamento: 2026-10-15
- Publisher: LocalSERP Proxy (https://localserpproxy.com)

Porte dedicate 4G/5G: cambia IP subito o con un timer, usa il link di rotazione e consulta il traffico giornaliero.

**Endpoint in questa pagina**

- `GET /v1/mobile`: Elenca le porte mobili
- `GET /v1/mobile/{portId}`: Recupera una porta mobile
- `PATCH /v1/mobile/{portId}`: Rinomina, attiva o disattiva il rinnovo automatico oppure configura la rotazione automatica
- `POST /v1/mobile/{portId}/rotate`: Cambia IP subito
- `GET /v1/mobile/{portId}/rotate`: Link di rotazione (GET con la chiave API nella stringa di query)
- `POST /v1/mobile/{portId}/reset-password`: Genera una nuova password proxy per la porta
- `GET /v1/mobile/{portId}/usage`: Traffico giornaliero tramite la porta (a titolo informativo: dati illimitati, nel rispetto dell'uso corretto)
- `GET /v1/catalog/countries/{countryCode}/carriers`: Operatori mobili con porte 4G/5G disponibili in un paese

URL di base `https://localserpproxy.com/api/v1`. Autenticazione, errori e limiti: consulta la [panoramica API](https://localserpproxy.com/it/docs/api/).

## Elenca le porte mobili

`GET /v1/mobile`

Autenticazione: chiave API nell'intestazione `Authorization: Bearer API_KEY`.

**Risposta** `200 OK`

```json
{
  "data": [
    {
      "id": "mob_2v8k1q",
      "label": "US Verizon #1",
      "status": "active",
      "country": "US",
      "city": null,
      "carrier": "verizon",
      "carrierName": "Verizon",
      "networkType": "4G",
      "currentIp": "203.0.113.201",
      "ipChangedAt": "2026-10-05T14:03:11Z",
      "endpoint": {
        "host": "gw.localserpproxy.com",
        "httpPort": 7777,
        "socksPort": 7778
      },
      "username": "USERNAME",
      "password": "PASSWORD",
      "rotation": {
        "mode": "interval",
        "intervalMinutes": 10
      },
      "minRotationIntervalSeconds": 30,
      "rotationLink": "https://localserpproxy.com/api/v1/mobile/mob_2v8k1q/rotate?key=API_KEY",
      "planId": "mob-us-30d",
      "autoRenew": false,
      "createdAt": "2026-10-05T14:03:11Z",
      "expiresAt": "2026-11-04T14:03:11Z"
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/mobile" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/mobile", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/mobile`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Ottieni una porta mobile

`GET /v1/mobile/{portId}`

Autenticazione: chiave API nell'intestazione `Authorization: Bearer API_KEY`.

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sì | — |

**Risposta** `200 OK`

```json
{
  "id": "mob_2v8k1q",
  "label": "US Verizon #1",
  "status": "active",
  "country": "US",
  "city": null,
  "carrier": "verizon",
  "carrierName": "Verizon",
  "networkType": "4G",
  "currentIp": "203.0.113.201",
  "ipChangedAt": "2026-10-05T14:03:11Z",
  "endpoint": {
    "host": "gw.localserpproxy.com",
    "httpPort": 7777,
    "socksPort": 7778
  },
  "username": "USERNAME",
  "password": "PASSWORD",
  "rotation": {
    "mode": "interval",
    "intervalMinutes": 10
  },
  "minRotationIntervalSeconds": 30,
  "rotationLink": "https://localserpproxy.com/api/v1/mobile/mob_2v8k1q/rotate?key=API_KEY",
  "planId": "mob-us-30d",
  "autoRenew": false,
  "createdAt": "2026-10-05T14:03:11Z",
  "expiresAt": "2026-11-04T14:03:11Z"
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/mobile/mob_2v8k1q" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/mobile/mob_2v8k1q", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Rinomina, attiva o disattiva il rinnovo automatico oppure configura la rotazione automatica

`PATCH /v1/mobile/{portId}`

Rinomina la porta, attiva o disattiva il rinnovo automatico oppure imposta un timer per la rotazione automatica, da ogni 2 minuti a ogni 24 ore: `"rotation": { "mode": "interval", "intervalMinutes": 10 }` (2–1440 minuti); `"mode": "manual"` la disattiva. Altrimenti, la porta mantiene il suo IP finché non lo ruoti, anche se l’operatore può cambiarlo autonomamente di tanto in tanto.

Autenticazione: chiave API nell'intestazione `Authorization: Bearer API_KEY`.

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sì | — |

**Corpo della richiesta**

| Campo | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `label` | string | No | max. 60 caratteri |
| `autoRenew` | boolean | No | — |
| `rotation` | object | No | Timer per la rotazione automatica: `{ "mode": "interval", "intervalMinutes": 2–1440 }` (da ogni 2 minuti a ogni 24 ore) oppure `{ "mode": "manual", "intervalMinutes": null }` per ruotare solo su richiesta. |

*Esempio: Rotazione automatica*

```json
{
  "rotation": {
    "mode": "interval",
    "intervalMinutes": 10
  }
}
```

*Esempio: Manuale*

```json
{
  "rotation": {
    "mode": "manual",
    "intervalMinutes": null
  }
}
```

**Risposta** `200 OK`

```json
{
  "id": "mob_2v8k1q",
  "label": "US Verizon #1",
  "status": "active",
  "country": "US",
  "city": null,
  "carrier": "verizon",
  "carrierName": "Verizon",
  "networkType": "4G",
  "currentIp": "203.0.113.201",
  "ipChangedAt": "2026-10-05T14:03:11Z",
  "endpoint": {
    "host": "gw.localserpproxy.com",
    "httpPort": 7777,
    "socksPort": 7778
  },
  "username": "USERNAME",
  "password": "PASSWORD",
  "rotation": {
    "mode": "interval",
    "intervalMinutes": 10
  },
  "minRotationIntervalSeconds": 30,
  "rotationLink": "https://localserpproxy.com/api/v1/mobile/mob_2v8k1q/rotate?key=API_KEY",
  "planId": "mob-us-30d",
  "autoRenew": false,
  "createdAt": "2026-10-05T14:03:11Z",
  "expiresAt": "2026-11-04T14:03:11Z"
}
```

*curl*

```bash
curl -s -X PATCH "https://localserpproxy.com/api/v1/mobile/mob_2v8k1q" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rotation":{"mode":"interval","intervalMinutes":10}}'
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.patch(f"{API}/mobile/mob_2v8k1q", headers=HEADERS, json={"rotation": {"mode": "interval", "intervalMinutes": 10}}, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q`, {
  method: 'PATCH',
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ rotation: { mode: 'interval', intervalMinutes: 10 } }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Cambia IP ora

`POST /v1/mobile/{portId}/rotate`

A ogni rotazione, la porta si riconnette all’operatore per ottenere un nuovo IP e di solito impiega 5–15 secondi; occasionalmente l’operatore può assegnare di nuovo lo stesso IP: basta ruotarlo ancora. Al massimo una volta ogni 30 secondi per porta (`minRotationIntervalSeconds`): una rotazione richiesta troppo presto restituisce `429 rotation_too_soon` con `Retry-After` (secondi di attesa).

Autenticazione: chiave API nell'intestazione `Authorization: Bearer API_KEY`.

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sì | — |

**Risposta** `200 OK`

```json
{
  "ip": "203.0.113.201",
  "previousIp": "203.0.113.77",
  "rotatedAt": "2026-10-05T14:03:11Z",
  "nextRotationAvailableAt": "2026-10-05T14:03:41Z"
}
```

*curl*

```bash
curl -s -X POST "https://localserpproxy.com/api/v1/mobile/mob_2v8k1q/rotate" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.post(f"{API}/mobile/mob_2v8k1q/rotate", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q/rotate`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Link di rotazione (GET con chiave API nella stringa di query)

`GET /v1/mobile/{portId}/rotate`

Come `POST`, per script e segnalibri: `GET https://localserpproxy.com/api/v1/mobile/{portId}/rotate?key=API_KEY`. La chiave deve avere l’ambito `proxies`. `format=text` restituisce il nuovo IP come `text/plain`.

Autenticazione: chiave API nel parametro di query `key` (ambito `proxies`), così il link funziona da un segnalibro.

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `key` | query | string | Sì | La tua chiave API (ambito `proxies`). |
| `portId` | path | string | Sì | — |
| `format` | query | `json` · `text` | No | predefinito `json` |

**Risposta** `200 OK`

```json
{
  "ip": "203.0.113.201",
  "previousIp": "203.0.113.77",
  "rotatedAt": "2026-10-05T14:03:11Z",
  "nextRotationAvailableAt": "2026-10-05T14:03:41Z"
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/mobile/mob_2v8k1q/rotate?key=$API_KEY&format=text"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"

r = requests.get(f"{API}/mobile/mob_2v8k1q/rotate", params={"key": os.environ["API_KEY"], "format": "text"}, timeout=30)
r.raise_for_status()
print(r.text)
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q/rotate?key=${process.env.API_KEY}&format=text`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.text());
```

## Genera una nuova password proxy per la porta

`POST /v1/mobile/{portId}/reset-password`

Autenticazione: chiave API nell'intestazione `Authorization: Bearer API_KEY`.

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sì | — |

**Risposta** `200 OK`

```json
{
  "id": "mob_2v8k1q",
  "label": "US Verizon #1",
  "status": "active",
  "country": "US",
  "city": null,
  "carrier": "verizon",
  "carrierName": "Verizon",
  "networkType": "4G",
  "currentIp": "203.0.113.201",
  "ipChangedAt": "2026-10-05T14:03:11Z",
  "endpoint": {
    "host": "gw.localserpproxy.com",
    "httpPort": 7777,
    "socksPort": 7778
  },
  "username": "USERNAME",
  "password": "PASSWORD",
  "rotation": {
    "mode": "interval",
    "intervalMinutes": 10
  },
  "minRotationIntervalSeconds": 30,
  "rotationLink": "https://localserpproxy.com/api/v1/mobile/mob_2v8k1q/rotate?key=API_KEY",
  "planId": "mob-us-30d",
  "autoRenew": false,
  "createdAt": "2026-10-05T14:03:11Z",
  "expiresAt": "2026-11-04T14:03:11Z"
}
```

*curl*

```bash
curl -s -X POST "https://localserpproxy.com/api/v1/mobile/mob_2v8k1q/reset-password" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.post(f"{API}/mobile/mob_2v8k1q/reset-password", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q/reset-password`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Traffico giornaliero sulla porta (a titolo informativo: dati illimitati, nel rispetto dell’uso corretto)

`GET /v1/mobile/{portId}/usage`

Solo a titolo informativo. Dati illimitati sulla tua porta dedicata, nel rispetto dell’uso corretto: l’operatore può rallentare o sospendere un uso molto intenso.

Autenticazione: chiave API nell'intestazione `Authorization: Bearer API_KEY`.

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sì | — |
| `from` | query | string (date) | No | Primo giorno (UTC), incluso. Predefinito = 29 giorni prima di `to`. |
| `to` | query | string (date) | No | Ultimo giorno (UTC), incluso. Predefinito = oggi. Intervallo massimo: 366 giorni. |

**Risposta** `200 OK`

```json
{
  "from": "2026-10-04",
  "to": "2026-10-05",
  "totalBytes": 2350000000,
  "totalRequests": 48210,
  "points": [
    {
      "date": "2026-10-04",
      "bytes": 1200000000,
      "requests": 24800
    },
    {
      "date": "2026-10-05",
      "bytes": 1150000000,
      "requests": 23410
    }
  ],
  "byCountry": [
    {
      "country": "US",
      "bytes": 2350000000
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/mobile/mob_2v8k1q/usage" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/mobile/mob_2v8k1q/usage", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/mobile/mob_2v8k1q/usage`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Operatori mobili con porte 4G/5G disponibili in un Paese

`GET /v1/catalog/countries/{countryCode}/carriers`

Pubblico: non serve una chiave API.

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Sì | ISO 3166-1 alpha-2, in maiuscolo. |

**Risposta** `200 OK`

```json
{
  "data": [
    {
      "id": "verizon",
      "name": "Verizon",
      "networkTypes": [
        "4G",
        "5G"
      ],
      "available": true,
      "cities": []
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/catalog/countries/US/carriers"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"

r = requests.get(f"{API}/catalog/countries/US/carriers", timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/catalog/countries/US/carriers`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

---

LocalSERP Proxy: LocalSERP Proxy è un servizio di proxy residenziali negli Stati Uniti per verificare risultati di ricerca locali, annunci e prezzi città per città, con pagamento in criptovalute e senza caricare documenti di identità.
