Building a batch verification client against the IPASK API
A practical walkthrough: authentication, batching, concurrency, retries and quota accounting with real code.
The basics
POST /api/v1/verify
Authorization: Bearer <key>
content-type: application/json
{ "ips": ["45.32.11.8", "73.162.0.1"] }
Response: { count, results[], quota: { used, limit, remaining } }. Each result has ip, location, network, security.
Batch size is capped by plan (10 free, 50 Pro, 100 Studio). Duplicates are removed server-side, so dedupe locally only for vanity.
A minimal Node client
const KEY = process.env.IPASK_KEY;
const BATCH = 50;
async function verify(ips) {
const out = [];
for (let i = 0; i < ips.length; i += BATCH) {
const slice = ips.slice(i, i + BATCH);
const res = await fetch('https://ipask.net/api/v1/verify', {
method: 'POST',
headers: { 'content-type': 'application/json', authorization: 'Bearer ' + KEY },
body: JSON.stringify({ ips: slice }),
});
if (res.status === 429) break; // quota exhausted — stop, do not retry
if (!res.ok) throw new Error('HTTP ' + res.status);
const body = await res.json();
out.push(...body.results);
}
return out;
}
Rules that save you pain
- Do not parallelise hard. Two or three concurrent batches are plenty; the server counts every address against the same daily quota anyway.
- Treat 429 as terminal for the day, not as a retry signal.
- Check
/api/v1/quotabefore a large run, so you can stop halfway cleanly. - Store
first_seenfrom each result — it is your own signal that an address changed hands. - Send a spread sample first: 20 addresses tell you whether a pool is worth verifying in full.
When to use a report instead
If the output is for a human — a supplier, a boss — create a report:POST /api/report/create returns a read-only link with a summary and a printable table. Cheaper for them to read than your JSON.
Check a batch before you buy?
Check a batch →