IP Abuse Contact Lookup API Documentation
Abuse Lookup API
The Abuse Contact API provides essential contact information to report abusive activity associated with IP addresses. By querying an IP address (IPv4 or IPv6), users receive detailed abuse contact data, including the responsible organization, abuse handling role, contact emails, phone numbers, and registered address. This enables users to swiftly take action to report and mitigate threats such as spam, DDoS attacks, and phishing.
In addition to abuse-specific contacts, the API also includes registration metadata like the registered country and abuse handle. This empowers cybersecurity teams, hosting providers, and compliance entities to take appropriate legal or administrative action.
Note: For client-side calls to the endpoints mentioned below using the Request Origin (available on paid plans only), the apiKey parameter can be omitted.
Lookup Abuse Contact
Abuse contact details of an IP address (IPv4 or IPv6) can be obtained using the endpoint mentioned below:
The URL for this API is https://api.ipgeolocation.io/v2/abuse?apiKey=API_KEY&ip=1.0.0.0 and it's default JSON response below:
Response
1{
2 "ip": "1.0.0.0",
3 "abuse": {
4 "route": "1.0.0.0/24",
5 "country": "AU",
6 "handle": "IRT-APNICRANDNET-AU",
7 "name": "IRT-APNICRANDNET-AU",
8 "organization": "",
9 "role": "abuse",
10 "kind": "group",
11 "address": "PO Box 3646\nSouth Brisbane, QLD 4101\nAustralia",
12 "emails": [
13 "helpdesk@apnic.net"
14 ],
15 "phone_numbers": [
16 "+61 7 3858 3100"
17 ]
18 }
19}
Get Specific fields
You can customize the API response by using the fields parameter to include only the specific data you need. For example, to retrieve only the role and emails, specify these keys in the fields parameter as shown below.
Excluding Fields
You can exclude specific fields from the API response (except the ip field) by listing them in the excludes parameter as a comma-separated list. For example, you want to remove emails and handle from api response, you can put the keys in excludes parameter like this.
Response
Abuse Contact Details in /ipgeo
The Abuse Contact API is part of the Advanced Plan . By subscribing to the Advanced plan, you can include abuse contact details in the /ipgeo endpoint along with other features such as ASN details, security information, and more.
You can get basic Abuse Contact details in default response in abuse object as mentioned below.
Response
1{
2 "ip": "1.0.0.0",
3 "location": {
4 "continent_code": "OC",
5 "continent_name": "Oceania",
6 "country_code2": "AU",
7 "country_code3": "AUS",
8 "country_name": "Australia",
9 "country_name_official": "Commonwealth of Australia",
10 "country_capital": "Canberra",
11 "state_prov": "Queensland",
12 "state_code": "AU-QLD",
13 "district": "Brisbane",
14 "city": "South Brisbane",
15 "locality": "South Brisbane",
16 "accuracy_radius": "",
17 "zipcode": "4101",
18 "latitude": "-27.47306",
19 "longitude": "153.01421",
20 "is_eu": false,
21 "country_flag": "https://ipgeolocation.io/static/flags/au_64.png",
22 "geoname_id": "10113228",
23 "country_emoji": "🇦🇺"
24 },
25 "country_metadata": {
26 "calling_code": "+61",
27 "tld": ".au",
28 "languages": [
29 "en-AU"
30 ]
31 },
32 "network": {
33 "asn": {
34 "as_number": "AS13335",
35 "organization": "Cloudflare, Inc.",
36 "country": "US",
37 "asn_name": "CLOUDFLARENET",
38 "type": "BUSINESS",
39 "domain": "cloudflare.com",
40 "date_allocated": "",
41 "allocation_status": "assigned",
42 "num_of_ipv4_routes": "2356",
43 "num_of_ipv6_routes": "2838",
44 "rir": "ARIN"
45 },
46 "connection_type": "",
47 "company": {
48 "name": "APNIC Research and Development",
49 "type": "Business",
50 "domain": "apnic.com"
51 }
52 },
53 "currency": {
54 "code": "AUD",
55 "name": "Australian Dollar",
56 "symbol": "A$"
57 },
58 "abuse": {
59 "route": "1.0.0.0/24",
60 "country": "AU",
61 "handle": "IRT-APNICRANDNET-AU",
62 "name": "IRT-APNICRANDNET-AU",
63 "organization": "",
64 "role": "abuse",
65 "kind": "group",
66 "address": "PO Box 3646\nSouth Brisbane, QLD 4101\nAustralia",
67 "emails": [
68 "helpdesk@apnic.net"
69 ],
70 "phone_numbers": [
71 "+61 7 3858 3100"
72 ]
73 }
74}
75
Reference to Abuse Contact API Response
Field | Type | Description | Can be empty? |
---|---|---|---|
ip | string | The IP address for which abuse contact details are returned. | Yes |
abuse.route | string | The IP range or route associated with the IP address. | Yes |
abuse.country | string | Two-letter country code where the abuse contact is registered. | Yes |
abuse.handle | string | The abuse handle or reference ID for the responsible organization. | Yes |
abuse.name | string | The name/title of the abuse contact role or team. | Yes |
abuse.organization | string | The name of the organization managing provided IP Address. | Yes |
abuse.role | String | Role of the contact (typically "abuse"). | Yes |
abuse.kind | string | Type of contact (e.g., "group", "person"). | Yes |
abuse.address | string | Registered address of the organization owning the queried IP. | Yes |
abuse.emails | array | List of email addresses for contacting the abuse team. | Yes |
abuse.phone_numbers | array | List of phone numbers for abuse contact. | Yes |
Error Codes
IP Abuse API returns HTTP status code 200 for a successful API request along with the response.
While, in case of a bad or invalid request, IP Abuse Contact API returns 4xx HTTP status code along with a descriptive message explaining the reason for the error.
Below is a detailed explanation of the specific HTTP status codes and their corresponding error conditions:
HTTP Status | Description |
---|---|
400 Bad Request | It is returned for one of the following reasons:
|
401 Unauthorized | It is returned for one of the following reasons:
|
404 Not Found | It is returned for one of the following reasons:
|
405 Method Not Allowed |
|
429 Too Many Requests | It is returned for one of the following reasons:
|
499 Client Closed Request |
|
5XX Server Side Error |
|
API SDKs
To facilitate the developers, we have added some SDKs for various programming languages. The detailed documentation on how to use these SDKs is available in the respective SDK's documentation page linked below.
Our SDKs are also available on Github. Feel free to help us improve them. Following are the available SDKs: