{
    "openapi": "3.1.0",
    "info": {
        "title": "ipcheckerpro API",
        "version": "1.0.0",
        "description": "Free, keyless IP geolocation, ASN and reputation data. 60 requests per minute per IP (30 for DNS). Geolocation by DB-IP (CC BY 4.0) — keep the attribution when displaying data.",
        "termsOfService": "https://ipcheckerpro.com/terms",
        "contact": {
            "url": "https://ipcheckerpro.com/contact"
        }
    },
    "servers": [
        {
            "url": "https://ipcheckerpro.com"
        }
    ],
    "paths": {
        "/api/v1/ip": {
            "get": {
                "summary": "Details of the calling IP address",
                "operationId": "myIp",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ip": {
                                            "type": "string"
                                        },
                                        "version": {
                                            "type": "integer",
                                            "enum": [
                                                4,
                                                6
                                            ]
                                        },
                                        "private": {
                                            "type": "boolean"
                                        },
                                        "hostname": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "location": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "country_code": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "country": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "region": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "city": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "latitude": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "longitude": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "continent": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "eu": {
                                                    "type": [
                                                        "boolean",
                                                        "null"
                                                    ]
                                                }
                                            }
                                        },
                                        "network": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "asn": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prefix": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "country_code": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "type": {
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        "classification": {
                                            "type": "string",
                                            "enum": [
                                                "residential",
                                                "mobile",
                                                "hosting",
                                                "vpn",
                                                "tor",
                                                "business",
                                                "education",
                                                "government",
                                                "private",
                                                "unknown"
                                            ]
                                        },
                                        "flags": {
                                            "type": "object"
                                        },
                                        "blacklists": {
                                            "type": [
                                                "object",
                                                "null"
                                            ]
                                        },
                                        "sources": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited"
                    }
                }
            }
        },
        "/api/v1/ip/{ip}": {
            "get": {
                "summary": "Details of any IPv4 or IPv6 address",
                "operationId": "ipLookup",
                "parameters": [
                    {
                        "name": "ip",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "whois",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        },
                        "description": "Include RDAP registration data"
                    },
                    {
                        "name": "blacklists",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        },
                        "description": "Query 8 DNS blocklists (slower)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ip": {
                                            "type": "string"
                                        },
                                        "version": {
                                            "type": "integer",
                                            "enum": [
                                                4,
                                                6
                                            ]
                                        },
                                        "private": {
                                            "type": "boolean"
                                        },
                                        "hostname": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "location": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "country_code": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "country": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "region": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "city": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "latitude": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "longitude": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "continent": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "eu": {
                                                    "type": [
                                                        "boolean",
                                                        "null"
                                                    ]
                                                }
                                            }
                                        },
                                        "network": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "asn": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prefix": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "country_code": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "type": {
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        "classification": {
                                            "type": "string",
                                            "enum": [
                                                "residential",
                                                "mobile",
                                                "hosting",
                                                "vpn",
                                                "tor",
                                                "business",
                                                "education",
                                                "government",
                                                "private",
                                                "unknown"
                                            ]
                                        },
                                        "flags": {
                                            "type": "object"
                                        },
                                        "blacklists": {
                                            "type": [
                                                "object",
                                                "null"
                                            ]
                                        },
                                        "sources": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid IP"
                    },
                    "429": {
                        "description": "Rate limited"
                    }
                }
            }
        },
        "/api/v1/asn/{asn}": {
            "get": {
                "summary": "Autonomous system details",
                "operationId": "asn",
                "parameters": [
                    {
                        "name": "asn",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "whois",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "404": {
                        "description": "Unknown ASN"
                    },
                    "429": {
                        "description": "Rate limited"
                    }
                }
            }
        },
        "/api/v1/dns": {
            "get": {
                "summary": "DNS records for a hostname",
                "operationId": "dns",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "A",
                                "AAAA",
                                "CNAME",
                                "MX",
                                "NS",
                                "TXT",
                                "SOA",
                                "SRV",
                                "CAA",
                                "PTR"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Invalid query"
                    },
                    "429": {
                        "description": "Rate limited"
                    }
                }
            }
        }
    }
}