Returns filtered information about the provided IP.
Returns filtered information about a specified IP address. When using URL path filters, only a single filter is allowed.
Text-only behavior: Single non-object fields return their value as plain text (e.g., 8.8.8.8 for the ip filter). JSON behavior: Object fields (like asn, privacy) or when using the ?include= parameter always return JSON.
Examples:
- /lookup/8.8.8.8/ip → returns 8.8.8.8 (text)
- /lookup/8.8.8.8/asn.asn → returns AS15169 (text)
- /lookup/8.8.8.8/asn → returns {"asn": {...}} (JSON object)
- /lookup/8.8.8.8?include=asn.asn → returns {"asn": {"asn": "AS15169"}} (JSON)
- /lookup/8.8.8.8?include=asn.asn,privacy.is_vpn → returns {"asn": {"asn": "AS15169"}, "privacy": {"is_vpn": false}} (JSON)
get/lookup/{ip}/{filter}
Request
- Base URL: https://iplocate.io/api
- URL: https://iplocate.io/api/lookup/{ip}/{filter}
- Auth: API key in query parameter apikey
Path parameters
ipstring required
A single IPv4 or IPv6 IP address.
filterstring required
A single filter to apply to the response.
Examples: ip, asn.asn, privacy.is_vpn, asn
Response
Filtered lookup response. Can be either JSON (partial object) or plain text (single field).
object required
Partial object containing only the requested fields. Structure depends on the filters applied.
Examples:
- {"ip": "8.8.8.8"} (single field)
- {"asn": {"asn": "AS15169"}} (nested field)
- {"asn": {"asn": "AS15169", "route": "8.8.8.0/24"}} (object field)
Changes
No recorded changes to this operation across all 1 revision of this API.