# Ports mobiles et rotation d’IP

> API LocalSERP Proxy : ports 4G/5G, rotation d’IP (immédiate, programmée ou par lien) et trafic quotidien. Paramètres, exemples de réponses, code curl, Python et Node.js.

- URL: https://localserpproxy.com/fr/docs/api/mobile/
- Dernière mise à jour: 2026-10-15
- Publisher: LocalSERP Proxy (https://localserpproxy.com)

Ports 4G/5G dédiés : changez d’IP maintenant ou selon une minuterie, utilisez le lien de rotation et consultez le trafic quotidien.

**Points de terminaison sur cette page**

- `GET /v1/mobile` : Lister les ports mobiles
- `GET /v1/mobile/{portId}` : Obtenir un port mobile
- `PATCH /v1/mobile/{portId}` : Renommer, activer ou désactiver le renouvellement automatique, ou configurer la rotation automatique
- `POST /v1/mobile/{portId}/rotate` : Changer l’IP maintenant
- `GET /v1/mobile/{portId}/rotate` : Lien de rotation (GET avec la clé API dans la chaîne de requête)
- `POST /v1/mobile/{portId}/reset-password` : Générer un nouveau mot de passe proxy pour le port
- `GET /v1/mobile/{portId}/usage` : Trafic quotidien via le port (à titre indicatif : données illimitées, dans le respect de l’usage équitable)
- `GET /v1/catalog/countries/{countryCode}/carriers` : Opérateurs mobiles proposant des ports 4G/5G dans un pays

URL de base `https://localserpproxy.com/api/v1`. Authentification, erreurs et limites : consultez la [présentation de l’API](https://localserpproxy.com/fr/docs/api/).

## Liste des ports mobiles

`GET /v1/mobile`

Authentification : clé API dans l’en-tête `Authorization: Bearer API_KEY`.

**Réponse** `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());
```

## Obtenir un port mobile

`GET /v1/mobile/{portId}`

Authentification : clé API dans l’en-tête `Authorization: Bearer API_KEY`.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Oui | — |

**Réponse** `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());
```

## Renommer, activer ou désactiver le renouvellement automatique, ou configurer la rotation automatique

`PATCH /v1/mobile/{portId}`

Renommez le port, activez ou désactivez le renouvellement automatique, ou définissez un délai de rotation automatique, de 2 minutes à 24 heures : `"rotation": { "mode": "interval", "intervalMinutes": 10 }` (2–1440 minutes) ; `"mode": "manual"` désactive cette option. Sinon, votre port conserve son IP jusqu’à ce que vous la changiez, même si l’opérateur peut la modifier de temps à autre.

Authentification : clé API dans l’en-tête `Authorization: Bearer API_KEY`.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Oui | — |

**Corps de la requête**

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `label` | string | Non | 60 caractères max. |
| `autoRenew` | boolean | Non | — |
| `rotation` | object | Non | Délai de rotation automatique : `{ "mode": "interval", "intervalMinutes": 2–1440 }` (de 2 minutes à 24 heures), ou `{ "mode": "manual", "intervalMinutes": null }` pour changer l’IP uniquement à la demande. |

*Exemple: Rotation automatique*

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

*Exemple: Manuelle*

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

**Réponse** `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());
```

## Changer l’IP maintenant

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

À chaque rotation, votre port se reconnecte à l’opérateur pour obtenir une nouvelle IP. Cela prend généralement 5 à 15 secondes ; il arrive que l’opérateur attribue la même IP : relancez simplement la rotation. Une rotation est autorisée au maximum toutes les 30 secondes par port (`minRotationIntervalSeconds`) : si elle est demandée trop tôt, la réponse est `429 rotation_too_soon` avec `Retry-After` (secondes à attendre).

Authentification : clé API dans l’en-tête `Authorization: Bearer API_KEY`.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Oui | — |

**Réponse** `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());
```

## Lien de rotation (GET avec la clé API dans la chaîne de requête)

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

Même chose que `POST`, pour les scripts et les favoris : `GET https://localserpproxy.com/api/v1/mobile/{portId}/rotate?key=API_KEY`. La clé doit disposer de l’autorisation `proxies`. `format=text` renvoie la nouvelle IP au format `text/plain`.

Authentification : clé API dans le paramètre de requête `key` (portée `proxies`), pour que le lien fonctionne depuis un favori.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `key` | query | string | Oui | Votre clé API (autorisation `proxies`). |
| `portId` | path | string | Oui | — |
| `format` | query | `json` · `text` | Non | par défaut `json` |

**Réponse** `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());
```

## Générer un nouveau mot de passe proxy pour le port

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

Authentification : clé API dans l’en-tête `Authorization: Bearer API_KEY`.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Oui | — |

**Réponse** `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());
```

## Trafic quotidien via le port (à titre indicatif : données illimitées, dans le cadre d’une utilisation raisonnable)

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

À titre indicatif uniquement. Données illimitées sur votre port dédié, dans le cadre d’une utilisation raisonnable : l’opérateur peut ralentir ou suspendre les usages très intensifs.

Authentification : clé API dans l’en-tête `Authorization: Bearer API_KEY`.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Oui | — |
| `from` | query | string (date) | Non | Premier jour (UTC), inclus. Par défaut = 29 jours avant `to`. |
| `to` | query | string (date) | Non | Dernier jour (UTC), inclus. Par défaut = aujourd’hui. Plage maximale : 366 jours. |

**Réponse** `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());
```

## Opérateurs mobiles proposant des ports 4G/5G dans un pays

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

Public : aucune clé API requise.

**Paramètres**

| Nom | Dans | Type | Obligatoire | Description |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Oui | ISO 3166-1 alpha-2, en majuscules. |

**Réponse** `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 est un service de proxy résidentiel aux États-Unis pour vérifier les résultats de recherche locaux, les annonces et les prix ville par ville, avec paiement en crypto et sans envoi de pièce d’identité.
