Bez KYC — bez dokumentu tożsamości, selfie ani dokumentów. Płać kryptowalutą.
Język: Polski
Wybierz 1 GB

Dokumentacja API

Klucze API i lista dozwolonych IP

Twórz i unieważniaj klucze API z ograniczonymi uprawnieniami oraz zarządzaj listą dozwolonych IP: maksymalnie 10 źródłowych adresów IP może korzystać z proxy bez nazwy użytkownika i hasła.

4 min czytania

Punkty końcowe na tej stronie

  • GET /v1/api-keys: Wyświetl klucze API
  • POST /v1/api-keys: Utwórz klucz API
  • DELETE /v1/api-keys/{keyId}: Unieważnij klucz API
  • GET /v1/ip-whitelist: Wyświetl listę dozwolonych IP
  • POST /v1/ip-whitelist: Dodaj IP lub zakres do listy dozwolonych
  • DELETE /v1/ip-whitelist/{entryId}: Usuń wpis z listy dozwolonych

Podstawowy URL https://localserpproxy.com/api/v1. Informacje o uwierzytelnianiu, błędach i limitach znajdziesz w omówieniu API.

Wyświetl klucze API

GET/v1/api-keys

Uwierzytelnianie: klucz API w nagłówku Authorization: Bearer API_KEY.

Odpowiedź 200 OK

{
  "data": [
    {
      "id": "key_5n2v8q",
      "name": "Rotation script",
      "prefix": "pk_4f9a2c",
      "scopes": [
        "read",
        "proxies"
      ],
      "createdAt": "2026-10-05T14:03:11Z",
      "lastUsedAt": null
    }
  ],
  "limit": 20
}

Przykłady kodu

curl
curl -s "https://localserpproxy.com/api/v1/api-keys" \
  -H "Authorization: Bearer $API_KEY"
Python
import os
import requests

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

r = requests.get(f"{API}/api-keys", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
Node.js
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/api-keys`, {
  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());

Utwórz klucz API

POST/v1/api-keys

Pełna kwota secret zostanie zwrócona jednorazowo.

Uwierzytelnianie: klucz API w nagłówku Authorization: Bearer API_KEY.

Treść żądania

PoleTypWymaganeOpis
namestringTakmaks. 60 znaków
scopesarray of read · proxies · billingTak—
Przykład
{
  "name": "Rotation script",
  "scopes": [
    "read",
    "proxies"
  ]
}

Odpowiedź 201 Created

{
  "id": "key_5n2v8q",
  "name": "Rotation script",
  "prefix": "pk_4f9a2c",
  "scopes": [
    "read",
    "proxies"
  ],
  "createdAt": "2026-10-05T14:03:11Z",
  "lastUsedAt": null,
  "secret": "pk_4f9a2c8e1b7d3f6a9c2e5b8d1f4a7c0e"
}

Przykłady kodu

curl
curl -s -X POST "https://localserpproxy.com/api/v1/api-keys" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Rotation script","scopes":["read","proxies"]}'
Python
import os
import requests

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

r = requests.post(f"{API}/api-keys", headers=HEADERS, json={"name": "Rotation script", "scopes": ["read", "proxies"]}, timeout=30)
r.raise_for_status()
print(r.json())
Node.js
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/api-keys`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ name: 'Rotation script', scopes: ['read', 'proxies'] }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());

Unieważnij klucz API

DELETE/v1/api-keys/{keyId}

Uwierzytelnianie: klucz API w nagłówku Authorization: Bearer API_KEY.

Parametry

NazwaWTypWymaganeOpis
keyIdpathstringTak—

Odpowiedź 204 No Content

Brak treści: kod statusu jest odpowiedzią.

Przykłady kodu

curl
curl -s -X DELETE "https://localserpproxy.com/api/v1/api-keys/key_5n2v8q" \
  -H "Authorization: Bearer $API_KEY"
Python
import os
import requests

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

r = requests.delete(f"{API}/api-keys/key_5n2v8q", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.status_code)  # 204: done
Node.js
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/api-keys/key_5n2v8q`, {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(res.status); // 204: done

Wyświetl listę dozwolonych adresów IP

GET/v1/ip-whitelist

Uwierzytelnianie: klucz API w nagłówku Authorization: Bearer API_KEY.

Odpowiedź 200 OK

{
  "data": [
    {
      "id": "ipw_8c1k2m",
      "cidr": "203.0.113.24",
      "label": "Office server",
      "createdAt": "2026-10-05T14:03:11Z"
    }
  ],
  "limit": 10
}

Przykłady kodu

curl
curl -s "https://localserpproxy.com/api/v1/ip-whitelist" \
  -H "Authorization: Bearer $API_KEY"
Python
import os
import requests

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

r = requests.get(f"{API}/ip-whitelist", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
Node.js
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/ip-whitelist`, {
  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());

Dodaj adres IP lub zakres do listy dozwolonych

POST/v1/ip-whitelist

Akceptowane są adresy IPv4, zakresy IPv4 CIDR od /24 do /32, adresy IPv6 oraz zakresy IPv6 CIDR od /48 do /128. Prywatne, loopback i zarezerwowane zakresy są odrzucane (422). Zmiany są aktywne na bramie w ciągu 60 s.

Uwierzytelnianie: klucz API w nagłówku Authorization: Bearer API_KEY.

Treść żądania

PoleTypWymaganeOpis
cidrstringTak—
labelstringNiemaks. 60 znaków
Przykład
{
  "cidr": "203.0.113.24",
  "label": "Office server"
}

Odpowiedź 201 Created

{
  "id": "ipw_8c1k2m",
  "cidr": "203.0.113.24",
  "label": "Office server",
  "createdAt": "2026-10-05T14:03:11Z"
}

Przykłady kodu

curl
curl -s -X POST "https://localserpproxy.com/api/v1/ip-whitelist" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cidr":"203.0.113.24","label":"Office server"}'
Python
import os
import requests

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

r = requests.post(f"{API}/ip-whitelist", headers=HEADERS, json={"cidr": "203.0.113.24", "label": "Office server"}, timeout=30)
r.raise_for_status()
print(r.json())
Node.js
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/ip-whitelist`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ cidr: '203.0.113.24', label: 'Office server' }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());

Usuń wpis z listy dozwolonych

DELETE/v1/ip-whitelist/{entryId}

Uwierzytelnianie: klucz API w nagłówku Authorization: Bearer API_KEY.

Parametry

NazwaWTypWymaganeOpis
entryIdpathstringTak—

Odpowiedź 204 No Content

Brak treści: kod statusu jest odpowiedzią.

Przykłady kodu

curl
curl -s -X DELETE "https://localserpproxy.com/api/v1/ip-whitelist/ipw_8c1k2m" \
  -H "Authorization: Bearer $API_KEY"
Python
import os
import requests

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

r = requests.delete(f"{API}/ip-whitelist/ipw_8c1k2m", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.status_code)  # 204: done
Node.js
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/ip-whitelist/ipw_8c1k2m`, {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(res.status); // 204: done

1 GB 1,50 USD · bez KYC

Zobacz ceny