@extends('layouts.panel') @section('content')
DEVELOPER GUIDE

Connect your application

Send lookup requests from your backend server and keep your API key in secret storage.

Make a lookup

GET {{ rtrim(config('app.url'),'/') }}/v1/lookup?ip=8.8.8.8&fields=status,country,query
Authorization: Bearer YOUR_API_KEY

IPv6 and numeric fields

GET /v1/lookup?ip=2001%3A4860%3A4860%3A%3A8888&fields=11001

Both parameters are required. The API accepts approved field names or a supported decimal mask. Include status and message when your client needs to distinguish provider-level errors.

Example with curl

curl --get '{{ rtrim(config('app.url'),'/') }}/v1/lookup' \
  --header "Authorization: Bearer $HUB_API_KEY" \
  --data-urlencode 'ip=8.8.8.8' \
  --data-urlencode 'fields=status,country,query'

Response behavior

Accepted source response bytes are returned unchanged. Hub errors use an error object and the X-Hub-Error header. Unsafe source responses are quarantined.

24-hour caching

The same IP, fields selection, and dataset share a cached response for 24 hours from its fetch time. Hits do not extend expiry.

X-Hub-Cache
HIT, MISS, COALESCED, BYPASS
X-Hub-Request-Id
Trace your request in history

Plan rate limits

Account and per-key limits use a rolling 60-second window, including cached requests. Every key shares the account limit. HTTP 429 with error code customer_rate_limited means wait for Retry-After seconds before retrying. That rejected request consumes no monthly unit.

X-Hub-RateLimit-Limit
Account requests per minute
X-Hub-RateLimit-Remaining
Account capacity at admission
X-Hub-KeyRateLimit-Limit
Per-key requests per minute
X-Hub-KeyRateLimit-Remaining
Key capacity at admission

Concurrent requests and the monthly allowance have separate limits. Concurrent traffic can change remaining capacity after the response snapshot.

Access and billing

Your caller IP must match the API key's allowlist. Cache hits count as customer requests. A valid provider HTTP 200 JSON result counts once, including status=fail. Hub failures and non-200 source responses consume no customer units.

Manage access
@endsection