Proxy API docs at connection methods
Nakolekta ang mga paraan upang ikonekta ang IPKite residential proxy sa code at tool, kasama ang developer API para sa pag-check ng balance, purchase history, at proxy list, na may mga halimbawa.
Mabilisang pagsisimula sa residential proxy
Kapag bumili ng residential proxy, makikita ang proxy username at password sa member page. Iisa ang connection address, at ang bansa, lungsod, at session ay tinutukoy sa username parameters. Pwedeng i-test ang connection gamit ang command na ito:
- Pagbili: sa member page, pumili ng GB para bumili ng residential proxy.
- Kumpirmasyon: Tingnan ang proxy username (USERNAME) at password (PASSWORD) sa member page.
- Koneksyon: Magpadala ng request sa address na gw.ipkite.com gamit ang HTTP port 7000 o SOCKS5 port 7100.
curl -x http://USERNAME:PASSWORD@gw.ipkite.com:7000 https://example.com/Format ng Impormasyon sa Koneksyon ng Proxy
Lahat ng residential proxy connections ay gumagamit ng parehong address. HTTP at HTTPS requests ay sa port 7000, SOCKS5 connections ay sa port 7100. Idagdag ang parameters sa username gamit ang hyphen (-), at piliin lang ang gusto mong gamitin.
| Item | Halaga | Paliwanag |
|---|---|---|
| Address | gw.ipkite.com | Connection address para sa lahat ng residential proxy |
| HTTP/HTTPS port | 7000 | Kumonekta sa HTTP at HTTPS sites gamit ang HTTP proxy |
| SOCKS5 Port | 7100 | Kumonekta gamit ang mga tool at app na sumusuporta sa SOCKS5 |
| cc | Dalawang letrang country code (maliit na titik) | Halimbawa: cc-us, cc-gb, cc-de |
| city | Pangalan ng lungsod (maliit na titik, walang espasyo) | Halimbawa: city-newyork, city-london |
| sess | Session name sa Ingles at numero | Parehong IP habang ginagamit ang parehong value |
| ttl | 1~1,440(minuto) | Oras para sa Sticky Session |
USERNAME-cc-us-city-newyork-sess-a1b2c3-ttl-30:PASSWORD@gw.ipkite.com:7000Halimbawa ng rotating proxy at sticky session
Kung hindi ka nagdagdag ng sess value sa username, ito ay magiging rotating proxy kung saan bawat kahilingan ay makakakuha ng bagong IP. Kung nagdagdag ka ng sess at ttl, ito ay magiging sticky session kung saan ang parehong IP ay mananatili sa loob ng oras na tinukoy ng ttl (1-1,440 minuto). Kapag kailangan mo ng bagong IP, baguhin lamang ang sess value.
curl -x http://USERNAME:PASSWORD@gw.ipkite.com:7000 https://example.com/
curl -x http://USERNAME:PASSWORD@gw.ipkite.com:7000 https://example.com/Halimbawa ng Pag-target sa Bansa at Lungsod
Pumili ng isa sa 174 bansa/rehiyon gamit ang cc parameter, at paliitin ang pagpipilian sa mga pangunahing lungsod gamit ang city parameter. Ang country/city targeting ay maaaring gamitin para sa parehong rotating at sticky session.
curl -x http://USERNAME-cc-de:PASSWORD@gw.ipkite.com:7000 https://example.com/Halimbawa ng Proxy sa Python requests
Sa Python requests, ilagay ang parehong proxy address sa proxies value para sa HTTP at HTTPS. Para kumonekta gamit ang SOCKS5, i-install ang requests[socks] at baguhin ang address sa socks5h://.
import requests
proxy = "http://USERNAME-cc-us-sess-a1b2c3-ttl-30:PASSWORD@gw.ipkite.com:7000"
proxies = {"http": proxy, "https": proxy}
r = requests.get("https://example.com/", proxies=proxies, timeout=30)
print(r.status_code)Halimbawa ng Proxy sa Node.js
Sa Node.js, maaari kang gumamit ng ProxyAgent ng undici o https-proxy-agent package para kumonekta. Parehong sapat ang isang linya ng proxy address para sa parehong paraan.
import { ProxyAgent, fetch } from "undici";
const agent = new ProxyAgent("http://USERNAME-cc-de:PASSWORD@gw.ipkite.com:7000");
const res = await fetch("https://example.com/", { dispatcher: agent });
console.log(res.status);Developer API authentication at base URL
Ang Developer API ay REST-based at lahat ng responses ay JSON. Sa account page, makakakuha ka ng API key na nagsisimula sa ipk_live_ (ipapakita lang ito once), kaya i-save mo agad sa secure na lugar. Ilagay ang Bearer at API key sa Authorization header ng lahat ng requests.
- Base URL: https://ipkite.com/api/v1
- Auth header: Authorization: Bearer <API key>
- Limit sa tawag: 120 beses bawat minuto
- Format ng tugon: JSON, kung successful ay "ok": true
curl https://ipkite.com/api/v1/balance \
-H "Authorization: Bearer ipk_live_YOUR_API_KEY"Developer API endpoint
| Paraan | Ruta | Nilalaman | Key Response Values |
|---|---|---|---|
| GET | /balance | Kasalukuyang Balanse | balance, currency |
| GET | /orders | Listahan ng mga detalye ng pagbili | code, product, summary, amount, status, created_at |
| GET | /proxies | Listahan ng biniling proxy | Residential: username, password, host, http_port, socks_port, traffic_gb_left / Static IP: ip, port, username, password, country, expires_at |
{"ok":true,"balance":"25.00","currency":"USD"}Mga error response at limitasyon ng API call
Kung walang API key o hindi ito tama, makakatanggap ka ng HTTP 401 kasama ang response sa ibaba. Siguraduhing tama ang header name, ang espasyo pagkatapos ng Bearer, at ang buong key. Ang limitasyon ng call ay 120 beses bawat minuto, at para sa regular na pagsuri ng balanse o natitirang trapiko, isang beses bawat minuto ay sapat na para manatili sa loob ng limitasyon.
{"ok":false,"error":"unauthorized"}