# Puertos móviles y rotación IP

> API AfricaProxies: puertos 4G/5G, rotación IP inmediata, programada o por enlace y tráfico diario. Parámetros, respuestas y código curl, Python y Node.js.

- URL: https://africaproxies.com/es/docs/api/mobile/
- Última actualización: 2026-10-15
- Editor: AfricaProxies (https://africaproxies.com)

Puertos 4G/5G dedicados: cambia la IP ahora o con un temporizador, usa el enlace de rotación y consulta el tráfico diario.

**Endpoints de esta página**

- `GET /v1/mobile`: Listar puertos móviles
- `GET /v1/mobile/{portId}`: Obtener un puerto móvil
- `PATCH /v1/mobile/{portId}`: Cambiar el nombre, activar/desactivar la renovación automática o configurar la rotación automática
- `POST /v1/mobile/{portId}/rotate`: Cambiar la IP ahora
- `GET /v1/mobile/{portId}/rotate`: Enlace de rotación (GET con clave API en la cadena de consulta)
- `POST /v1/mobile/{portId}/reset-password`: Generar una nueva contraseña de proxy para el puerto
- `GET /v1/mobile/{portId}/usage`: Tráfico diario del puerto (informativo: datos ilimitados, con uso razonable)
- `GET /v1/catalog/countries/{countryCode}/carriers`: Operadores móviles con puertos 4G/5G disponibles en un país

URL base `https://africaproxies.com/api/v1`. Autenticación, errores y límites: consulta la [descripción general de la API](/es/docs/api/).

## Listar puertos móviles

`GET /v1/mobile`

Autenticación: clave API en el encabezado `Authorization: Bearer API_KEY`.

**Respuesta** `200 OK`

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

*curl*

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

*Python*

```python
import os
import requests

API = "https://africaproxies.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://africaproxies.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());
```

## Obtener un puerto móvil

`GET /v1/mobile/{portId}`

Autenticación: clave API en el encabezado `Authorization: Bearer API_KEY`.

**Parámetros**

| Nombre | En | Tipo | Requerido | Descripción |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sí | — |

**Respuesta** `200 OK`

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

*curl*

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

*Python*

```python
import os
import requests

API = "https://africaproxies.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://africaproxies.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());
```

## Cambiar el nombre, activar/desactivar la renovación automática o configurar la rotación automática

`PATCH /v1/mobile/{portId}`

Cambia el nombre del puerto, activa o desactiva la renovación automática, o configura un temporizador de rotación automática, desde cada 2 minutos hasta cada 24 horas: `"rotation": { "mode": "interval", "intervalMinutes": 10 }` (2–1440 minutos); `"mode": "manual"` lo desactiva. De lo contrario, el puerto mantiene su IP hasta que la rotes, aunque el operador puede cambiarla por su cuenta de vez en cuando.

Autenticación: clave API en el encabezado `Authorization: Bearer API_KEY`.

**Parámetros**

| Nombre | En | Tipo | Requerido | Descripción |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sí | — |

**Cuerpo de la solicitud**

| Campo | Tipo | Requerido | Descripción |
| --- | --- | --- | --- |
| `label` | string | No | máx. 60 caracteres |
| `autoRenew` | boolean | No | — |
| `rotation` | object | No | Temporizador de rotación automática: `{ "mode": "interval", "intervalMinutes": 2–1440 }` (desde cada 2 minutos hasta cada 24 horas), o `{ "mode": "manual", "intervalMinutes": null }` para rotar solo cuando se solicite. |

*Ejemplo: Rotación automática*

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

*Ejemplo: Manual*

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

**Respuesta** `200 OK`

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

*curl*

```bash
curl -s -X PATCH "https://africaproxies.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://africaproxies.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://africaproxies.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());
```

## Cambiar la IP ahora

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

Cada rotación reconecta el puerto al operador para obtener una IP nueva y suele tardar 5–15 segundos; ocasionalmente el operador puede devolver la misma IP: basta con rotar de nuevo. Como máximo una vez cada 30 segundos por puerto (`minRotationIntervalSeconds`): una rotación solicitada demasiado pronto devuelve `429 rotation_too_soon` con `Retry-After` (segundos que esperar).

Autenticación: clave API en el encabezado `Authorization: Bearer API_KEY`.

**Parámetros**

| Nombre | En | Tipo | Requerido | Descripción |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sí | — |

**Respuesta** `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://africaproxies.com/api/v1/mobile/mob_2v8k1q/rotate" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://africaproxies.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://africaproxies.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());
```

## Enlace de rotación (GET con clave API en la cadena de consulta)

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

Igual que `POST`, para scripts y marcadores: `GET https://africaproxies.com/api/v1/mobile/{portId}/rotate?key=API_KEY`. La clave necesita el permiso `proxies`. `format=text` devuelve la nueva IP como `text/plain`.

Autenticación: clave API en el parámetro de consulta `key` (alcance `proxies`), por lo que el enlace funciona desde un marcador.

**Parámetros**

| Nombre | En | Tipo | Requerido | Descripción |
| --- | --- | --- | --- | --- |
| `key` | query | string | Sí | Tu clave API (permiso `proxies`). |
| `portId` | path | string | Sí | — |
| `format` | query | `json` · `text` | No | valor predeterminado `json` |

**Respuesta** `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://africaproxies.com/api/v1/mobile/mob_2v8k1q/rotate?key=$API_KEY&format=text"
```

*Python*

```python
import os
import requests

API = "https://africaproxies.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://africaproxies.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());
```

## Generar una nueva contraseña de proxy para el puerto

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

Autenticación: clave API en el encabezado `Authorization: Bearer API_KEY`.

**Parámetros**

| Nombre | En | Tipo | Requerido | Descripción |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sí | — |

**Respuesta** `200 OK`

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

*curl*

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

*Python*

```python
import os
import requests

API = "https://africaproxies.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://africaproxies.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());
```

## Tráfico diario del puerto (informativo: datos ilimitados, con uso razonable)

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

Solo informativo. Datos ilimitados en tu puerto dedicado, con uso razonable: el operador puede reducir la velocidad o pausar un uso muy intensivo.

Autenticación: clave API en el encabezado `Authorization: Bearer API_KEY`.

**Parámetros**

| Nombre | En | Tipo | Requerido | Descripción |
| --- | --- | --- | --- | --- |
| `portId` | path | string | Sí | — |
| `from` | query | string (date) | No | Primer día (UTC), incluido. Valor predeterminado = 29 días antes de `to`. |
| `to` | query | string (date) | No | Último día (UTC), incluido. Valor predeterminado = hoy. Intervalo máximo de 366 días. |

**Respuesta** `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": "AE",
      "bytes": 2350000000
    }
  ]
}
```

*curl*

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

*Python*

```python
import os
import requests

API = "https://africaproxies.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://africaproxies.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());
```

## Operadores móviles con puertos 4G/5G disponibles en un país

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

Público: no se necesita ninguna clave API.

**Parámetros**

| Nombre | En | Tipo | Requerido | Descripción |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Sí | ISO 3166-1 alpha-2, en mayúsculas. |

**Respuesta** `200 OK`

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

*curl*

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

*Python*

```python
import os
import requests

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

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

*Node.js*

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

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

---

AfricaProxies: AfricaProxies es un proveedor de proxies residenciales para África subsahariana, con pago en cripto y sin subir documentos de identidad.
