API reference/ip

Download a bulk IP job's results

GET/api/v1/ip/bulk/{jobId}/results

authentication
Secret API key as a bearer token
billing
Free.

The result file as CSV: one row per input address, in input order, with every field of the single-address response as a column plus the credits it cost. Fields containing spaces are quoted. Add ?variant=low|medium|high to download only the rows of one risk level; the default full returns everything. Available once the job is completed, cancelled with at least one processed row, or failed after partial progress; a job still running answers 409 RESULTS_NOT_READY, a cancelled job with nothing processed 409 JOB_CANCELLED.

Parameters

name in type description
jobIdrequiredpathinteger
variantquerystringRestrict the file to one risk level. Defaults to full. One of: full, low, medium, high.

Example request

curl https://spaw.co/api/v1/ip/bulk/{jobId}/results \
  -H "Authorization: Bearer sk_live_…"
const response = await fetch('https://spaw.co/api/v1/ip/bulk/{jobId}/results', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer sk_live_…',
  },
});
const result = await response.json();
import requests

response = requests.get(
    'https://spaw.co/api/v1/ip/bulk/{jobId}/results',
    headers={'Authorization': 'Bearer sk_live_…'},
)
result = response.json()
$ch = curl_init('https://spaw.co/api/v1/ip/bulk/{jobId}/results');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer sk_live_…'],
]);
$result = json_decode(curl_exec($ch), true);

Responses

200The CSV file.

ip,version,reason,network,continent,country,country_name,is_eu,is_eea,privacy_regime,region,city,latitude,longitude,location_source,location_confidence,timezone,currency,calling_code,asn,org,asn_type,registry,registry_country,allocated_at,is_datacenter,hosting_provider,is_crawler,crawler,crawler_kind,is_blocklisted,blocklist,is_tor,is_vpn,is_relay,privacy_service,is_anonymous,risk_score,risk_level,credits_used
8.8.8.8,4,,8.8.8.0/24,NA,US,United States,false,false,ccpa,California,Mountain View,37.4056,-122.0775,database,medium,America/Los_Angeles,USD,1,15169,Google LLC,hosting,arin,US,2023-12-28,true,,false,,,false,,false,false,false,,false,40,medium,1

401The key is missing, malformed, or revoked.

{
    "success": false,
    "error": {
        "code": "UNAUTHENTICATED",
        "message": "Provide a valid API key as a bearer token.",
        "request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
    }
}

404No such record on this account.

{
    "message": "Not Found"
}

409The job is still running (`RESULTS_NOT_READY`) or was cancelled before any row was processed (`JOB_CANCELLED`).

{
    "success": false,
    "error": {
        "code": "RESULTS_NOT_READY",
        "message": "The results are not ready yet.",
        "request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
    }
}

429Over 5 requests per second for the key. Retry after the limit resets.

{
    "success": false,
    "error": {
        "code": "RATE_LIMITED",
        "message": "Too many requests. Retry after the limit resets.",
        "request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
    }
}

Error codes

Failures answer { success: false, error: { code, message, request_id } }. Each code has its own page.

markdown version·openapi.json