{
    "schemes": [
        "https"
    ],
    "swagger": "2.0",
    "info": {
        "description": "Profundis API provides access to various data services including Hosts, Certificates, DNS, ASN, and subdomain enumeration.",
        "title": "Profundis API",
        "termsOfService": "https://profundis.io/terms",
        "contact": {
            "name": "The Profundis Team",
            "url": "https://profundis.io/contact"
        },
        "license": {
            "name": "MIT",
            "url": "https://opensource.org/licenses/MIT"
        },
        "version": "2.0"
    },
    "host": "api.profundis.io",
    "basePath": "/",
    "paths": {
        "/api/v2/common/data/asn/details": {
            "post": {
                "description": "Search for ASN details by number, name, CIDR, IP, or partial name/whois.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Search for ASN details by number, name, CIDR, IP, or partial name/whois",
                "parameters": [
                    {
                        "description": "ASN details query",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/structs.AsnDetailsQuery"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/structs.AsnDetailsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request, invalid query format or parameters",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden, user has exceeded their quota or made an invalid request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/data/dns": {
            "post": {
                "description": "Allow users to search for DNS records using a human-friendly query language.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Dns Search",
                "parameters": [
                    {
                        "description": "User query with search parameters",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/structs.UserQuery"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/structs.DnsSearchFriendlyResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request, invalid query format or parameters",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden, user has exceeded their quota or made an invalid request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/data/domains": {
            "post": {
                "description": "Search for hosts details by domain or subdomain, including IP addresses, ASN data, and associated ports.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Search for hosts details by domain or subdomain",
                "parameters": [
                    {
                        "description": "Domain or subdomain to search for",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/structs.DomainDetailsQuery"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/structs.DomainDetailsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request, invalid query format or parameters",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden, user has exceeded their quota or made an invalid request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/data/hosts": {
            "post": {
                "description": "Allow users to search for hosts using a human-friendly query language.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Hosts Search",
                "parameters": [
                    {
                        "description": "User query with search parameters",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/structs.UserQuery"
                        }
                    },
                    {
                        "type": "boolean",
                        "description": "Enable enrichment of resolved IPs for CNAME resolutions. When true, hosts with CNAME resolutions will include the resolved IP addresses in the resolved_ips field.",
                        "name": "enrich_resolved_ips",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/structs.HostsSearchFriendlyResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request, invalid query format or parameters",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden, user has exceeded their quota or made an invalid request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/data/ip/intelligence": {
            "post": {
                "description": "Aggregates DNS, Hosts, Certificates, ASN, and Whois data for an IP/CIDR.\nReturns cross-dataset results in a single response.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Get comprehensive intelligence for an IP or CIDR",
                "parameters": [
                    {
                        "description": "IP Intelligence query",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/structs.IpIntelligenceQuery"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/structs.IpIntelligenceResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request, invalid IP/CIDR format",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden, user has exceeded their quota",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/data/pipeline": {
            "post": {
                "description": "Execute a multi-step cross-search pipeline to correlate data across datasets",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Pipeline Cross-Search",
                "parameters": [
                    {
                        "description": "Pipeline configuration",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/structs.PipelineRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/structs.PipelineResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/data/subdomains": {
            "post": {
                "description": "Enumerate subdomains for a given domain",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Enumerate subdomains for a given domain",
                "parameters": [
                    {
                        "description": "Subdomains enumeration query",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/structs.SubdomainsEnumQuery"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of subdomains found for the given domain, one per line",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request, invalid query format or parameters",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden, user has exceeded their quota or made an invalid request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/data/vhosts": {
            "post": {
                "description": "Allow users to search for vhosts using a human-friendly query language.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Vhosts Search",
                "parameters": [
                    {
                        "description": "User query with search parameters",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/structs.UserQuery"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/structs.VhostsSearchFriendlyResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request, invalid query format or parameters",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden, user has exceeded their quota or made an invalid request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/data/whois": {
            "post": {
                "description": "Allow users to search for Whois using a human-friendly query language.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Whois Search",
                "parameters": [
                    {
                        "description": "User query with search parameters",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/structs.UserQuery"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/structs.WhoisSearchFriendlyResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request, invalid query format or parameters",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden, user has exceeded their quota or made an invalid request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/exports": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns all exports for the authenticated user, ordered by creation date (newest first).",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "exports"
                ],
                "summary": "List all exports",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handler.ExportListResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Cancels all pending/processing exports and deletes all completed/failed/cancelled exports. Also removes all associated files from storage.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "exports"
                ],
                "summary": "Delete all exports",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handler.DeleteAllExportsResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/exports/{id}": {
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Cancels pending/processing exports or deletes completed/failed/cancelled exports. Also removes associated files from storage.",
                "tags": [
                    "exports"
                ],
                "summary": "Delete or cancel an export",
                "parameters": [
                    {
                        "maxLength": 32,
                        "minLength": 32,
                        "type": "string",
                        "description": "Export ID (32-character hex)",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Export deleted or cancelled"
                    },
                    "400": {
                        "description": "Invalid export ID format",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "404": {
                        "description": "Export not found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/exports/{id}/download": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Downloads the export file. Only available for completed exports. Supports gzip compression: if Accept-Encoding includes gzip, streams compressed; otherwise decompresses on-the-fly.",
                "produces": [
                    "application/json",
                    "text/csv",
                    "text/plain"
                ],
                "tags": [
                    "exports"
                ],
                "summary": "Download completed export",
                "parameters": [
                    {
                        "maxLength": 32,
                        "minLength": 32,
                        "type": "string",
                        "description": "Export ID (32-character hex)",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Export file content",
                        "schema": {
                            "type": "file"
                        }
                    },
                    "400": {
                        "description": "Invalid export ID or export not ready",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "404": {
                        "description": "Export not found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "503": {
                        "description": "Storage service unavailable",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/exports/{id}/poll": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns the current status and details of an export job. Poll this endpoint to track progress.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "exports"
                ],
                "summary": "Get export status",
                "parameters": [
                    {
                        "maxLength": 32,
                        "minLength": 32,
                        "type": "string",
                        "description": "Export ID (32-character hex)",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handler.ExportPollResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid export ID format",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "404": {
                        "description": "Export not found",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/exports/{searchType}": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Creates a new export job that will be processed asynchronously. Requires Premium+ subscription. Results are deducted from monthly quota.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "exports"
                ],
                "summary": "Create a new async export job",
                "parameters": [
                    {
                        "enum": [
                            "dns",
                            "hosts",
                            "whois",
                            "vhosts"
                        ],
                        "type": "string",
                        "description": "Search type",
                        "name": "searchType",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Export request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handler.ExportAsyncRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/handler.ExportAsyncResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request, query, or format",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Subscription insufficient or quota exhausted",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/common/exports/{searchType}/estimate": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns the estimated result count, current quota usage, and projected quota after export. Use this to preview the impact of an export before creating it.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "exports"
                ],
                "summary": "Estimate export size and quota impact",
                "parameters": [
                    {
                        "enum": [
                            "dns",
                            "hosts",
                            "whois",
                            "vhosts"
                        ],
                        "type": "string",
                        "description": "Search type",
                        "name": "searchType",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Estimate request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handler.ExportEstimateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handler.ExportEstimateResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request or query",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/data/auth/portfolio/analyze": {
            "post": {
                "description": "Analyze multiple domains to extract technologies, naming patterns, and infrastructure insights",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tools"
                ],
                "summary": "Domain Portfolio Analyzer",
                "parameters": [
                    {
                        "description": "List of domains to analyze (max 10)",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handler.DomainPortfolioRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handler.DomainPortfolioResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/data/auth/portfolio/analyze/stream": {
            "post": {
                "description": "Analyze multiple domains with real-time progress updates via SSE",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "text/event-stream"
                ],
                "tags": [
                    "tools"
                ],
                "summary": "Domain Portfolio Analyzer with Streaming Progress",
                "parameters": [
                    {
                        "description": "List of domains to analyze (max 10)",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handler.DomainPortfolioRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handler.DomainPortfolioResponse"
                        }
                    }
                }
            }
        },
        "/api/v2/data/hosts/favicons": {
            "post": {
                "description": "Extract all unique favicon hashes from a hosts search query, grouped by hash with occurrence count.\nThe query is automatically prefixed with \"favicon_hash:* AND\" to only return results with favicons.\nResults are limited to 500 hosts maximum.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data"
                ],
                "summary": "Extract Favicons from Hosts Search",
                "parameters": [
                    {
                        "description": "User query with search parameters (only raw_query is used)",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/structs.UserQuery"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/structs.FaviconExtractResponse"
                        }
                    },
                    "400": {
                        "description": "Bad request, invalid query format",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden, user has exceeded their quota",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "/api/v2/my-ip": {
            "get": {
                "description": "Returns the IP address of the requesting client",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "common"
                ],
                "summary": "Get client IP address",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/handler.MyIpResponse"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "handler.ASNInfo": {
            "type": "object",
            "properties": {
                "asn": {
                    "type": "string"
                },
                "count": {
                    "type": "integer"
                },
                "domains": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "handler.CountryInfo": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string"
                },
                "count": {
                    "type": "integer"
                },
                "domains": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "handler.CoverageMetrics": {
            "type": "object",
            "properties": {
                "analytics_percentage": {
                    "type": "number"
                },
                "health_percentage": {
                    "type": "number"
                },
                "healthy_endpoints": {
                    "type": "integer"
                },
                "https_percentage": {
                    "type": "number"
                },
                "sample_percentage": {
                    "description": "What % of available data was analyzed",
                    "type": "number"
                },
                "total_available": {
                    "description": "Total hosts available in ES",
                    "type": "integer"
                },
                "total_endpoints": {
                    "type": "integer"
                },
                "total_technologies": {
                    "type": "integer"
                },
                "unique_asns": {
                    "type": "integer"
                },
                "unique_countries": {
                    "type": "integer"
                },
                "unique_ips": {
                    "type": "integer"
                }
            }
        },
        "handler.DeleteAllExportsResponse": {
            "description": "Response containing the number of deleted exports",
            "type": "object",
            "properties": {
                "deleted_count": {
                    "description": "Number of exports deleted",
                    "type": "integer",
                    "example": 5
                }
            }
        },
        "handler.DomainDetailSummary": {
            "type": "object",
            "properties": {
                "active_ports": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "analytics_tags": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "asns": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "cloud_provider": {
                    "type": "string"
                },
                "created_date": {
                    "type": "string"
                },
                "domain": {
                    "type": "string"
                },
                "expiration_date": {
                    "type": "string"
                },
                "has_analytics": {
                    "type": "boolean"
                },
                "healthy_endpoints": {
                    "type": "integer"
                },
                "https_percentage": {
                    "type": "number"
                },
                "main_country": {
                    "type": "string"
                },
                "main_server": {
                    "type": "string"
                },
                "primary_ips": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "registrar": {
                    "type": "string"
                },
                "ssl_provider": {
                    "type": "string"
                },
                "subdomain_count": {
                    "type": "integer"
                },
                "technologies": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "total_endpoints": {
                    "type": "integer"
                }
            }
        },
        "handler.DomainPortfolioRequest": {
            "type": "object",
            "properties": {
                "domains": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "handler.DomainPortfolioResponse": {
            "type": "object",
            "properties": {
                "analyzed_at": {
                    "type": "string"
                },
                "coverage": {
                    "$ref": "#/definitions/handler.CoverageMetrics"
                },
                "domains": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "domains_details": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.DomainDetailSummary"
                    }
                },
                "infrastructure": {
                    "$ref": "#/definitions/handler.InfraAnalysis"
                },
                "insights": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.Insight"
                    }
                },
                "naming_patterns": {
                    "$ref": "#/definitions/handler.NamingAnalysis"
                },
                "registration": {
                    "$ref": "#/definitions/handler.RegistrationAnalysis"
                },
                "tech_stack": {
                    "$ref": "#/definitions/handler.TechStackAnalysis"
                },
                "took_ms": {
                    "type": "integer"
                }
            }
        },
        "handler.ExportAsyncRequest": {
            "description": "Request body for creating an async export job",
            "type": "object",
            "properties": {
                "format": {
                    "description": "Output format: json, csv, or txt",
                    "type": "string",
                    "enum": [
                        "json",
                        "csv",
                        "txt"
                    ],
                    "example": "json"
                },
                "raw_query": {
                    "description": "Search query string",
                    "type": "string",
                    "example": "host:*.example.com"
                },
                "time_frame": {
                    "description": "Time frame filter (all_time, last_7_days, last_30_days, last_90_days)",
                    "type": "string",
                    "example": "all_time"
                }
            }
        },
        "handler.ExportAsyncResponse": {
            "description": "Response containing the created export job ID",
            "type": "object",
            "properties": {
                "export_id": {
                    "description": "Unique 32-character hex identifier for the export",
                    "type": "string",
                    "example": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
                }
            }
        },
        "handler.ExportEstimateRequest": {
            "description": "Request body for estimating export size and quota impact",
            "type": "object",
            "properties": {
                "raw_query": {
                    "description": "Search query string",
                    "type": "string",
                    "example": "host:*.example.com"
                },
                "time_frame": {
                    "description": "Time frame filter",
                    "type": "string",
                    "example": "all_time"
                }
            }
        },
        "handler.ExportEstimateResponse": {
            "description": "Estimation of export size and quota impact",
            "type": "object",
            "properties": {
                "estimated_count": {
                    "description": "Total estimated results matching the query",
                    "type": "integer",
                    "example": 5000
                },
                "estimated_file_size_bytes": {
                    "description": "Estimated file size in bytes (~200 bytes per result)",
                    "type": "integer",
                    "example": 1000000
                },
                "partial_limit": {
                    "description": "Maximum results if partial (only set when will_be_partial is true)",
                    "type": "integer",
                    "example": 1000
                },
                "quota_after_export": {
                    "description": "Projected quota usage after export",
                    "allOf": [
                        {
                            "$ref": "#/definitions/handler.QuotaInfo"
                        }
                    ]
                },
                "quota_current": {
                    "description": "Current quota usage before export",
                    "allOf": [
                        {
                            "$ref": "#/definitions/handler.QuotaInfo"
                        }
                    ]
                },
                "will_be_partial": {
                    "description": "Whether export will be partial due to quota limits",
                    "type": "boolean",
                    "example": false
                }
            }
        },
        "handler.ExportListResponse": {
            "description": "List of all exports for the authenticated user",
            "type": "object",
            "properties": {
                "exports": {
                    "description": "Array of export objects",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.ExportPollResponse"
                    }
                }
            }
        },
        "handler.ExportPollResponse": {
            "description": "Detailed status of an export job",
            "type": "object",
            "properties": {
                "created_at": {
                    "description": "ISO 8601 timestamp when export was created",
                    "type": "string",
                    "example": "2024-01-15T10:30:00Z"
                },
                "error_message": {
                    "description": "Error message if status is failed",
                    "type": "string"
                },
                "estimated_count": {
                    "description": "Initial estimated result count",
                    "type": "integer",
                    "example": 2000
                },
                "expires_at": {
                    "description": "ISO 8601 timestamp when export will expire",
                    "type": "string",
                    "example": "2024-01-22T10:30:00Z"
                },
                "file_size_bytes": {
                    "description": "Compressed file size in bytes on storage",
                    "type": "integer",
                    "example": 102400
                },
                "format": {
                    "description": "Output format",
                    "type": "string",
                    "example": "json"
                },
                "id": {
                    "description": "Unique 32-character hex identifier",
                    "type": "string",
                    "example": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
                },
                "original_size_bytes": {
                    "description": "Uncompressed file size (actual download size)",
                    "type": "integer",
                    "example": 512000
                },
                "raw_query": {
                    "description": "Original search query",
                    "type": "string",
                    "example": "host:*.example.com"
                },
                "results_count": {
                    "description": "Actual number of results exported (only when completed)",
                    "type": "integer",
                    "example": 1500
                },
                "search_type": {
                    "description": "Type of search: dns, hosts, whois, vhosts",
                    "type": "string",
                    "example": "hosts"
                },
                "status": {
                    "description": "Current status: pending, processing, completed, failed, cancelled",
                    "type": "string",
                    "enum": [
                        "pending",
                        "processing",
                        "completed",
                        "failed",
                        "cancelled"
                    ],
                    "example": "completed"
                },
                "truncation_reason": {
                    "description": "Reason for truncation if applicable (quota_exhausted, timeout)",
                    "type": "string",
                    "example": "quota_exhausted"
                },
                "was_truncated": {
                    "description": "Whether results were truncated due to quota or timeout",
                    "type": "boolean",
                    "example": false
                }
            }
        },
        "handler.IPRangeInfo": {
            "type": "object",
            "properties": {
                "count": {
                    "type": "integer"
                },
                "domains": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "range": {
                    "type": "string"
                }
            }
        },
        "handler.InfraAnalysis": {
            "type": "object",
            "properties": {
                "asns": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.ASNInfo"
                    }
                },
                "cloud_providers": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.ProviderInfo"
                    }
                },
                "countries": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.CountryInfo"
                    }
                },
                "ip_ranges": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.IPRangeInfo"
                    }
                },
                "servers": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.TechWithCount"
                    }
                },
                "ssl_providers": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.ProviderInfo"
                    }
                },
                "ssl_stats": {
                    "$ref": "#/definitions/handler.SSLAnalysis"
                }
            }
        },
        "handler.Insight": {
            "type": "object",
            "properties": {
                "description": {
                    "type": "string"
                },
                "severity": {
                    "description": "low, medium, high",
                    "type": "string"
                },
                "title": {
                    "type": "string"
                },
                "type": {
                    "description": "warning, info, recommendation",
                    "type": "string"
                }
            }
        },
        "handler.MyIpResponse": {
            "type": "object",
            "properties": {
                "ip": {
                    "type": "string"
                }
            }
        },
        "handler.NamingAnalysis": {
            "type": "object",
            "properties": {
                "environments": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "prefixes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.PatternWithExamples"
                    }
                },
                "regions": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "structure": {
                    "type": "string"
                },
                "subdomain_count": {
                    "type": "integer"
                },
                "suffixes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.PatternWithExamples"
                    }
                },
                "unique_hostnames": {
                    "type": "integer"
                }
            }
        },
        "handler.PatternWithExamples": {
            "type": "object",
            "properties": {
                "count": {
                    "type": "integer"
                },
                "examples": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "pattern": {
                    "type": "string"
                }
            }
        },
        "handler.ProviderInfo": {
            "type": "object",
            "properties": {
                "count": {
                    "type": "integer"
                },
                "domains": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "handler.QuotaInfo": {
            "description": "Monthly quota usage details",
            "type": "object",
            "properties": {
                "results_max": {
                    "description": "Maximum results allowed per month",
                    "type": "integer",
                    "example": 100000
                },
                "results_used": {
                    "description": "Number of results already consumed this month",
                    "type": "integer",
                    "example": 15000
                }
            }
        },
        "handler.RegistrationAnalysis": {
            "type": "object",
            "properties": {
                "creation_years": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "integer"
                    }
                },
                "nameservers": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.ProviderInfo"
                    }
                },
                "newest_domain": {
                    "type": "string"
                },
                "oldest_domain": {
                    "type": "string"
                },
                "privacy_protected": {
                    "type": "integer"
                },
                "registrars": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.ProviderInfo"
                    }
                }
            }
        },
        "handler.SSLAnalysis": {
            "type": "object",
            "properties": {
                "expired_certs": {
                    "type": "integer"
                },
                "expired_pct": {
                    "type": "number"
                },
                "total_certs": {
                    "type": "integer"
                },
                "trusted_certs": {
                    "type": "integer"
                },
                "trusted_pct": {
                    "type": "number"
                },
                "untrusted_certs": {
                    "type": "integer"
                },
                "untrusted_pct": {
                    "type": "number"
                }
            }
        },
        "handler.TechStackAnalysis": {
            "type": "object",
            "properties": {
                "analytics": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.TechWithCount"
                    }
                },
                "backend": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.TechWithCount"
                    }
                },
                "cdn": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.TechWithCount"
                    }
                },
                "cms": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.TechWithCount"
                    }
                },
                "frontend": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.TechWithCount"
                    }
                },
                "other": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.TechWithCount"
                    }
                },
                "security": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/handler.TechWithCount"
                    }
                }
            }
        },
        "handler.TechWithCount": {
            "type": "object",
            "properties": {
                "category": {
                    "type": "string"
                },
                "count": {
                    "description": "Number of domains using this tech",
                    "type": "integer"
                },
                "domains": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "frequency": {
                    "description": "percentage across portfolio",
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "occurrences": {
                    "description": "Number of endpoints/hosts using this tech",
                    "type": "integer"
                }
            }
        },
        "structs.ASLevel": {
            "type": "object",
            "properties": {
                "as_name": {
                    "description": "ASN name",
                    "type": "string"
                },
                "as_number": {
                    "description": "ASN number",
                    "type": "integer"
                },
                "cidr": {
                    "description": "CIDR of the AS",
                    "type": "string"
                }
            }
        },
        "structs.ASOutput": {
            "type": "object",
            "properties": {
                "ip": {
                    "description": "An IP address",
                    "type": "string"
                },
                "ip_city": {
                    "description": "City of the IP address",
                    "type": "string"
                },
                "ip_country": {
                    "description": "Country of the IP address",
                    "type": "string"
                },
                "ip_country_code": {
                    "description": "Country code of the IP address",
                    "type": "string"
                },
                "ip_latitude": {
                    "description": "Latitude of the IP address",
                    "type": "number"
                },
                "ip_longitude": {
                    "description": "Longitude of the IP address",
                    "type": "number"
                },
                "ip_state": {
                    "description": "State of the IP address",
                    "type": "string"
                },
                "levels": {
                    "description": "List of matching AS levels",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.ASLevel"
                    }
                },
                "timestamp": {
                    "description": "Date when the IP was first seen",
                    "type": "string"
                }
            }
        },
        "structs.AggregationBucket": {
            "type": "object",
            "properties": {
                "doc_count": {
                    "type": "integer"
                },
                "key": {
                    "type": "string"
                }
            }
        },
        "structs.AsnDetailsQuery": {
            "type": "object",
            "properties": {
                "cidr": {
                    "description": "CIDR to query",
                    "type": "string"
                },
                "ip": {
                    "description": "IP address to query",
                    "type": "string"
                },
                "name": {
                    "description": "ASN name to query",
                    "type": "string"
                },
                "number": {
                    "description": "ASN number to query",
                    "type": "integer"
                },
                "partial_name": {
                    "description": "Partial ASN name to query",
                    "type": "string"
                },
                "question": {
                    "description": "Type of question to ask, e.g., \"ip\", \"cidr\", \"name\", \"number\", \"partial_name\"",
                    "type": "string"
                }
            }
        },
        "structs.AsnDetailsResponse": {
            "type": "object",
            "properties": {
                "as_hierarchy": {
                    "description": "Hierarchy of AS levels",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.ASLevel"
                    }
                },
                "extra": {
                    "description": "Additional information about the AS, the IP or any other relevant data",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "structs.DNSData": {
            "type": "object",
            "properties": {
                "as_levels": {
                    "description": "Hierarchy of AS levels",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.ASLevel"
                    }
                },
                "host": {
                    "description": "Hostname or domain name associated with the DNS record",
                    "type": "string"
                },
                "id": {
                    "description": "Unique identifier for the DNS record",
                    "type": "string"
                },
                "timestamp": {
                    "description": "Timestamp of the DNS record in ISO 8601 format",
                    "type": "string"
                },
                "type": {
                    "description": "Type of DNS record (e.g., A, AAAA, CNAME, etc.)",
                    "type": "string"
                },
                "value": {
                    "description": "Value of the DNS record (e.g., IP address for A records, canonical name for CNAME records)",
                    "type": "string"
                }
            }
        },
        "structs.DnsSearchFriendlyResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "description": "List of DNS data records",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.DNSData"
                    }
                },
                "relation": {
                    "description": "Relation of the total count (e.g., \"eq\", \"gte\")",
                    "type": "string"
                },
                "took": {
                    "description": "Time taken to execute the search in milliseconds",
                    "type": "integer"
                },
                "total": {
                    "description": "Total number of DNS records found",
                    "type": "integer"
                }
            }
        },
        "structs.DomainDetailsQuery": {
            "type": "object",
            "properties": {
                "domain": {
                    "description": "Domain to query",
                    "type": "string"
                }
            }
        },
        "structs.DomainDetailsResponse": {
            "type": "object",
            "properties": {
                "domain": {
                    "description": "Domain name",
                    "type": "string"
                },
                "results": {
                    "description": "List of results for the domain",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.DomainResult"
                    }
                }
            }
        },
        "structs.DomainResult": {
            "type": "object",
            "properties": {
                "hosts": {
                    "description": "List of hosts associated with the domain",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "ip": {
                    "description": "AS details for the domain",
                    "allOf": [
                        {
                            "$ref": "#/definitions/structs.ASOutput"
                        }
                    ]
                },
                "ports": {
                    "description": "List of ports associated with the domain",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.PortsOutput"
                    }
                }
            }
        },
        "structs.FaviconExtractResponse": {
            "type": "object",
            "properties": {
                "capped": {
                    "description": "True si les résultats ont été limités à 500",
                    "type": "boolean"
                },
                "data": {
                    "description": "Liste des favicons groupés par hash",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.FaviconGroupedItem"
                    }
                },
                "relation": {
                    "description": "Relation du count (eq, gte)",
                    "type": "string"
                },
                "took": {
                    "description": "Temps d'exécution en millisecondes",
                    "type": "integer"
                },
                "total": {
                    "description": "Nombre total de résultats dans la recherche",
                    "type": "integer"
                }
            }
        },
        "structs.FaviconGroupedItem": {
            "type": "object",
            "properties": {
                "count": {
                    "description": "Nombre de hosts utilisant ce favicon",
                    "type": "integer"
                },
                "favicon_hash": {
                    "description": "Hash MMH3 du favicon",
                    "type": "string"
                }
            }
        },
        "structs.HostData": {
            "type": "object",
            "properties": {
                "analytics_tags": {
                    "description": "Tags related to analytics for the host (e.g., Google Analytics, Matomo) mostly used for tracking and analytics purposes",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "as_name": {
                    "description": "Name of the Autonomous System (AS) associated with the host",
                    "type": "string"
                },
                "as_number": {
                    "description": "ASN number of the Autonomous System associated with the host",
                    "type": "integer"
                },
                "cert_expired": {
                    "description": "Indicates whether the SSL/TLS certificate associated with the host has expired",
                    "type": "boolean"
                },
                "cert_issuer_cn": {
                    "description": "Common Name (CN) of the issuer of the SSL/TLS certificate, indicating the entity that issued the certificate",
                    "type": "string"
                },
                "cert_subj": {
                    "description": "Subject of the SSL/TLS certificate associated with the host, typically containing information about the entity to which the certificate was issued",
                    "type": "string"
                },
                "cert_subj_org": {
                    "description": "Organization name from the SSL/TLS certificate subject, indicating the entity that owns the certificate",
                    "type": "string"
                },
                "cert_trusted": {
                    "description": "Indicates whether the SSL/TLS certificate associated with the host is trusted",
                    "type": "boolean"
                },
                "content_length": {
                    "description": "Length of the content returned by the host, typically in bytes",
                    "type": "integer"
                },
                "cpes": {
                    "description": "Common Platform Enumeration identifiers for the host's software and hardware",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "date_checked": {
                    "description": "Date when the host was last checked",
                    "type": "string"
                },
                "favicon_hash": {
                    "description": "Hash of the favicon associated with the host, used for identifying the host visually",
                    "type": "string"
                },
                "header_server_name": {
                    "description": "Server name from the HTTP header, often used for virtual hosting",
                    "type": "string"
                },
                "headers": {
                    "description": "List of HTTP/protocol headers associated with the host:port",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "host": {
                    "description": "Hostname or domain name of the host",
                    "type": "string"
                },
                "id": {
                    "description": "Unique identifier for the host",
                    "type": "string"
                },
                "ip_city": {
                    "description": "City associated with the IP address of the host",
                    "type": "string"
                },
                "ip_country_code": {
                    "description": "Country code of the IP address associated with the host, typically in ISO 3166-1 alpha-2 format",
                    "type": "string"
                },
                "ip_state": {
                    "description": "State associated with the IP address of the host",
                    "type": "string"
                },
                "is_waf_or_cdn": {
                    "description": "Indicates whether the host is protected by a WAF or CDN",
                    "type": "boolean"
                },
                "port": {
                    "description": "Port number on which the host is accessible",
                    "type": "integer"
                },
                "protocol": {
                    "description": "Protocol used by the host (e.g., HTTP, HTTPS)",
                    "type": "string"
                },
                "resolution": {
                    "description": "Resolution of the host, often indicating the IP address or DNS resolution",
                    "type": "string"
                },
                "resolved_ips": {
                    "description": "IPs resolved from CNAME when resolution is not an IP address",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "status_code": {
                    "description": "HTTP status code returned by the host, indicating the result of the HTTP request (e.g., 200 for OK, 404 for Not Found)",
                    "type": "integer"
                },
                "status_code_message": {
                    "description": "HTTP status code message associated with the host, providing a human-readable description of the status code",
                    "type": "string"
                },
                "status_code_range": {
                    "description": "Range of the HTTP status code, indicating the category of the response (e.g., 2xx for success, 4xx for client errors)",
                    "type": "integer"
                },
                "technologies": {
                    "description": "List of technologies used by the host (e.g., web server, CMS)",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "timestamp": {
                    "description": "Timestamp of the host data",
                    "type": "string"
                },
                "title": {
                    "description": "Title of the host, often derived from the HTTP response",
                    "type": "string"
                },
                "transport_proto": {
                    "description": "Transport protocol used by the host (e.g., TCP, UDP)",
                    "type": "string"
                },
                "waf_or_cdn_type": {
                    "description": "Type of WAF or CDN protecting the host",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "structs.HostsSearchFriendlyResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "description": "List of host data records",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.HostData"
                    }
                },
                "relation": {
                    "description": "Relation of the total count (e.g., \"eq\", \"gte\")",
                    "type": "string"
                },
                "took": {
                    "description": "Time taken to execute the search in milliseconds",
                    "type": "integer"
                },
                "total": {
                    "description": "Total number of hosts found",
                    "type": "integer"
                }
            }
        },
        "structs.IpIntelSection": {
            "type": "object",
            "properties": {
                "data": {
                    "description": "[]DNSData, []HostData, []VhostData, or []WhoisData"
                },
                "relation": {
                    "description": "\"eq\" (exact) or \"gte\" (at least)",
                    "type": "string"
                },
                "total": {
                    "description": "Total number of results",
                    "type": "integer"
                },
                "total_pages": {
                    "description": "Total pages based on results_per_page",
                    "type": "integer"
                }
            }
        },
        "structs.IpIntelligenceQuery": {
            "type": "object",
            "properties": {
                "page": {
                    "description": "Page number for pagination",
                    "type": "integer"
                },
                "query": {
                    "description": "IP address or CIDR notation",
                    "type": "string"
                },
                "results_per_page": {
                    "description": "Results per section (default 30)",
                    "type": "integer"
                },
                "time_frame": {
                    "description": "Time frame filter (all_time, last_7d, etc.)",
                    "type": "string"
                }
            }
        },
        "structs.IpIntelligenceResponse": {
            "type": "object",
            "properties": {
                "asn": {
                    "description": "ASN \u0026 Geolocation data",
                    "allOf": [
                        {
                            "$ref": "#/definitions/structs.ASOutput"
                        }
                    ]
                },
                "certificates": {
                    "description": "SSL Certificates found on this IP",
                    "allOf": [
                        {
                            "$ref": "#/definitions/structs.IpIntelSection"
                        }
                    ]
                },
                "dns": {
                    "description": "DNS Records pointing to this IP",
                    "allOf": [
                        {
                            "$ref": "#/definitions/structs.IpIntelSection"
                        }
                    ]
                },
                "from_cache": {
                    "description": "Whether this response was served from Redis cache",
                    "type": "boolean"
                },
                "hosts": {
                    "description": "Hosts resolving to this IP",
                    "allOf": [
                        {
                            "$ref": "#/definitions/structs.IpIntelSection"
                        }
                    ]
                },
                "query": {
                    "description": "Original query (IP or CIDR)",
                    "type": "string"
                },
                "query_type": {
                    "description": "\"ip\" or \"cidr\"",
                    "type": "string"
                },
                "took": {
                    "description": "Metadata",
                    "type": "integer"
                },
                "took_details": {
                    "description": "Time per source (asn, dns, hosts, certificates, whois)",
                    "type": "object",
                    "additionalProperties": {
                        "type": "integer"
                    }
                },
                "whois": {
                    "description": "Whois data for discovered domains",
                    "allOf": [
                        {
                            "$ref": "#/definitions/structs.IpIntelSection"
                        }
                    ]
                }
            }
        },
        "structs.PipelineAggregate": {
            "type": "object",
            "properties": {
                "field": {
                    "description": "Field to aggregate on",
                    "type": "string"
                },
                "min_count": {
                    "description": "Minimum doc count for buckets",
                    "type": "integer"
                },
                "size": {
                    "description": "Max buckets for terms aggregation",
                    "type": "integer"
                },
                "type": {
                    "description": "Aggregation type: terms, cardinality, unique_values",
                    "type": "string"
                },
                "use_as_next": {
                    "description": "Use aggregated values as input for next step",
                    "type": "boolean"
                }
            }
        },
        "structs.PipelineRequest": {
            "type": "object",
            "properties": {
                "cursor": {
                    "description": "Pagination - for \"Load More\" functionality",
                    "type": "string"
                },
                "limit": {
                    "description": "Max results per step, default 50",
                    "type": "integer"
                },
                "mode": {
                    "description": "Advanced options",
                    "type": "string"
                },
                "page": {
                    "description": "Page number for pagination, default 1",
                    "type": "integer"
                },
                "steps": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.PipelineStep"
                    }
                },
                "stream_mode": {
                    "description": "Enable streaming pagination for this request",
                    "type": "boolean"
                }
            }
        },
        "structs.PipelineResponse": {
            "type": "object",
            "properties": {
                "steps": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.PipelineStepResult"
                    }
                },
                "took_ms": {
                    "type": "integer"
                },
                "total_steps": {
                    "type": "integer"
                }
            }
        },
        "structs.PipelineStep": {
            "type": "object",
            "properties": {
                "aggregate": {
                    "description": "Advanced options",
                    "allOf": [
                        {
                            "$ref": "#/definitions/structs.PipelineAggregate"
                        }
                    ]
                },
                "dedupe": {
                    "description": "Deduplicate results by extracted key",
                    "type": "boolean"
                },
                "exclude": {
                    "description": "Values to exclude from results (e.g., parent domain)",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "exclude_pattern": {
                    "description": "Regex pattern to exclude from results",
                    "type": "string"
                },
                "extract_key": {
                    "description": "Field to extract for next step (e.g., \"domain\", \"host\", \"resolution\")",
                    "type": "string"
                },
                "max_extract": {
                    "description": "Max values to extract (0 = use config default)",
                    "type": "integer"
                },
                "query": {
                    "description": "Query with {$input} placeholder for chained values",
                    "type": "string"
                },
                "source": {
                    "description": "Source dataset: hosts, dns, whois, vhosts",
                    "type": "string"
                }
            }
        },
        "structs.PipelineStepResult": {
            "type": "object",
            "properties": {
                "aggregations": {
                    "description": "Aggregation results",
                    "type": "object",
                    "additionalProperties": true
                },
                "buckets": {
                    "description": "Simplified bucket results",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.AggregationBucket"
                    }
                },
                "count": {
                    "description": "Results returned in this response",
                    "type": "integer"
                },
                "data": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "extracted_keys": {
                    "description": "Keys extracted for next step",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "has_more": {
                    "description": "Whether more results are available",
                    "type": "boolean"
                },
                "next_cursor": {
                    "description": "Pagination info (for \"Load More\" functionality)",
                    "type": "string"
                },
                "page": {
                    "description": "Current page",
                    "type": "integer"
                },
                "query": {
                    "type": "string"
                },
                "source": {
                    "type": "string"
                },
                "total": {
                    "description": "Total results available",
                    "type": "integer"
                },
                "total_pages": {
                    "description": "Total pages available",
                    "type": "integer"
                }
            }
        },
        "structs.PortsOutput": {
            "type": "object",
            "properties": {
                "port": {
                    "description": "Port number",
                    "type": "integer"
                },
                "protocol": {
                    "description": "Protocol used (e.g., TCP, UDP)",
                    "type": "string"
                },
                "timestamp": {
                    "description": "Timestamp of the port information",
                    "type": "string"
                },
                "transport_proto": {
                    "description": "Transport protocol used (e.g., TCP, UDP)",
                    "type": "string"
                }
            }
        },
        "structs.SubdomainsEnumQuery": {
            "type": "object",
            "properties": {
                "domain": {
                    "description": "Domain to query for subdomains",
                    "type": "string"
                }
            }
        },
        "structs.UserQuery": {
            "type": "object",
            "properties": {
                "aggregate": {
                    "description": "Whether to aggregate results",
                    "type": "boolean"
                },
                "direction": {
                    "description": "Sort direction",
                    "type": "string"
                },
                "include": {
                    "description": "Fields to include in the results",
                    "type": "string"
                },
                "max_favicons": {
                    "description": "Max unique favicons to return (for favicon extract endpoint)",
                    "type": "integer"
                },
                "order_by": {
                    "description": "Field to order by",
                    "type": "string"
                },
                "page": {
                    "description": "Page number, default is 1, must be greater than 0 and less than or equal to 100",
                    "type": "integer"
                },
                "raw_query": {
                    "description": "Raw query string",
                    "type": "string"
                },
                "results_per_page": {
                    "description": "safe object to unmarshal the query",
                    "type": "integer"
                },
                "time_frame": {
                    "description": "Time frame for the query",
                    "type": "string"
                }
            }
        },
        "structs.VhostData": {
            "type": "object",
            "properties": {
                "cert_common_name": {
                    "description": "Common Name (CN) of the SSL/TLS certificate associated with the vhost, indicating the primary hostname for which the certificate is valid",
                    "type": "string"
                },
                "cert_issuer_cn": {
                    "description": "Common Name (CN) of the issuer of the SSL/TLS certificate, indicating the entity that issued the certificate",
                    "type": "string"
                },
                "cert_org": {
                    "description": "Organization name from the SSL/TLS certificate subject, indicating the entity that owns the certificate",
                    "type": "string"
                },
                "cert_subj": {
                    "description": "Subject of the SSL/TLS certificate associated with the vhost, typically containing information about the entity to which the certificate was issued",
                    "type": "string"
                },
                "id": {
                    "description": "Unique identifier for the vhost",
                    "type": "string"
                },
                "not_after": {
                    "description": "Expiration date of the SSL/TLS certificate associated with the vhost",
                    "type": "string"
                },
                "not_before": {
                    "description": "Start date of validity for the SSL/TLS certificate associated with the vhost",
                    "type": "string"
                },
                "port": {
                    "description": "Port number on which the vhost is accessible",
                    "type": "integer"
                },
                "resolution": {
                    "description": "Resolution of the vhost, often indicating the IP address or DNS resolution",
                    "type": "string"
                },
                "san": {
                    "description": "Subject Alternative Name (SAN) of the vhost, often used in SSL/TLS certificates to specify additional hostnames for which the certificate is valid",
                    "type": "string"
                },
                "timestamp": {
                    "description": "Timestamp of the vhost data",
                    "type": "string"
                }
            }
        },
        "structs.VhostsSearchFriendlyResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "description": "List of vhost data records",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.VhostData"
                    }
                },
                "relation": {
                    "description": "Relation of the total count (e.g., \"eq\", \"gte\")",
                    "type": "string"
                },
                "took": {
                    "description": "Time taken to execute the search",
                    "type": "integer"
                },
                "total": {
                    "description": "Total number of vhosts found",
                    "type": "integer"
                }
            }
        },
        "structs.WhoisData": {
            "type": "object",
            "properties": {
                "domain": {
                    "description": "Domain name associated with the whois record",
                    "type": "string"
                },
                "expiration_date": {
                    "description": "Expiration date of the domain registration",
                    "type": "string"
                },
                "id": {
                    "description": "Unique identifier for the whois record",
                    "type": "string"
                },
                "nameservers": {
                    "description": "List of nameservers associated with the domain",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "registrant_administrative_email": {
                    "description": "Email address of the administrative contact for the registrant",
                    "type": "string"
                },
                "registrant_administrative_name": {
                    "description": "Name of the administrative contact for the registrant",
                    "type": "string"
                },
                "registrant_email": {
                    "description": "Email address of the registrant",
                    "type": "string"
                },
                "registrant_name": {
                    "description": "Name of the registrant (owner) of the domain",
                    "type": "string"
                },
                "registrant_organization": {
                    "description": "Organization name of the registrant",
                    "type": "string"
                },
                "registrant_technical_email": {
                    "description": "Email address of the technical contact for the registrant",
                    "type": "string"
                },
                "registrant_technical_name": {
                    "description": "Name of the technical contact for the registrant",
                    "type": "string"
                },
                "registrar_abuse_email": {
                    "description": "Email address for reporting abuse to the registrar",
                    "type": "string"
                },
                "registrar_name": {
                    "description": "Name of the registrar for the domain",
                    "type": "string"
                }
            }
        },
        "structs.WhoisSearchFriendlyResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "description": "List of whois data records",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/structs.WhoisData"
                    }
                },
                "relation": {
                    "description": "Relation of the total count (e.g., \"eq\", \"gte\")",
                    "type": "string"
                },
                "took": {
                    "description": "Time taken to execute the search",
                    "type": "integer"
                },
                "total": {
                    "description": "Total number of whois records",
                    "type": "integer"
                }
            }
        }
    },
    "securityDefinitions": {
        "ApiKeyAuth": {
            "description": "API key for programmatic access",
            "type": "apiKey",
            "name": "X-API-Key",
            "in": "header"
        }
    }
}