POST /v1/core/ip-tools
IP tools
Validate an address, work out a subnet's range, or check whether an address falls inside it.
Work with IP addresses and ranges now No key, no code — 1 credit either way.
curl -X POST "$DOATHING_API/v1/core/ip-tools" \
-H "x-api-key: $DOATHING_KEY" \
-H "content-type: application/json" \
-d '{"query": "10.0.0.0/30", "contains": "10.0.0.2"}'
Validate an address, work out a subnet's range, or check whether an address falls inside it.
Validate and classify IPv4/IPv6 addresses, expand CIDR ranges and test membership.
Response
The result carries your remaining balance alongside it, so you can track spend without a second call.
{
"network": "10.0.0.0",
"hosts": 4,
"first": "10.0.0.0",
"last": "10.0.0.3",
"contains": true,
"request_id": "37f01edb-0163-42a1-ac51-0acaef979800",
"credits_remaining": 96
}
Cost
1 credit per call, whether it is run from the site or from the API — the credential differs, the price does not. A new account starts with 20 credits.
A rejected request still costs a credit: the authorizer decrements before the tool validates. A call rejected for a missing or invalid key is free.
Parameters
Generated from the endpoint’s own validation, so this is exactly what it accepts. A body field goes at the top level; an option goes inside options.
| Name | In | Type | Default | Notes |
|---|---|---|---|---|
| query * | body | string | — | An address or a CIDR range, such as 10.0.0.0/24. |
| contains | body | string | — | |
| enumerate | options | boolean | false | List every address, for ranges of 1024 addresses or fewer. |