basePath: /
definitions:
  structs.ASLevel:
    properties:
      as_name:
        description: ASN name
        type: string
      as_number:
        description: ASN number
        type: integer
      cidr:
        description: CIDR of the AS
        type: string
    type: object
  structs.ASOutput:
    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_state:
        description: State of the IP address
        type: string
      levels:
        description: List of matching AS levels
        items:
          $ref: '#/definitions/structs.ASLevel'
        type: array
      timestamp:
        description: Date when the IP was first seen
        type: string
    type: object
  structs.AsnDetailsQuery:
    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
    type: object
  structs.AsnDetailsResponse:
    properties:
      as_hierarchy:
        description: Hierarchy of AS levels
        items:
          $ref: '#/definitions/structs.ASLevel'
        type: array
      extra:
        description: Additional information about the AS, the IP or any other relevant
          data
        items:
          type: string
        type: array
    type: object
  structs.DNSData:
    properties:
      as_levels:
        description: Hierarchy of AS levels
        items:
          $ref: '#/definitions/structs.ASLevel'
        type: array
      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
    type: object
  structs.DnsSearchFriendlyResponse:
    properties:
      data:
        description: List of DNS data records
        items:
          $ref: '#/definitions/structs.DNSData'
        type: array
      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
    type: object
  structs.DomainDetailsQuery:
    properties:
      domain:
        description: Domain to query
        type: string
    type: object
  structs.DomainDetailsResponse:
    properties:
      domain:
        description: Domain name
        type: string
      results:
        description: List of results for the domain
        items:
          $ref: '#/definitions/structs.DomainResult'
        type: array
    type: object
  structs.DomainResult:
    properties:
      hosts:
        description: List of hosts associated with the domain
        items:
          type: string
        type: array
      ip:
        allOf:
        - $ref: '#/definitions/structs.ASOutput'
        description: AS details for the domain
      ports:
        description: List of ports associated with the domain
        items:
          $ref: '#/definitions/structs.PortsOutput'
        type: array
    type: object
  structs.HostData:
    properties:
      analytics_tags:
        description: Tags related to analytics for the host (e.g., Google Analytics,
          Matomo) mostly used for tracking and analytics purposes
        items:
          type: string
        type: array
      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
      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
        items:
          type: string
        type: array
      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
      open_ports_count:
        description: Count of open ports on the host, indicating how many ports are
          accessible
        type: integer
      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
      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)
        items:
          type: string
        type: array
      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
        items:
          type: string
        type: array
    type: object
  structs.HostsSearchFriendlyResponse:
    properties:
      data:
        description: List of host data records
        items:
          $ref: '#/definitions/structs.HostData'
        type: array
      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
    type: object
  structs.PortsOutput:
    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
    type: object
  structs.SubdomainsEnumQuery:
    properties:
      domain:
        description: Domain to query for subdomains
        type: string
    type: object
  structs.UserQuery:
    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
      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
    type: object
  structs.VhostData:
    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
    type: object
  structs.VhostsSearchFriendlyResponse:
    properties:
      data:
        description: List of vhost data records
        items:
          $ref: '#/definitions/structs.VhostData'
        type: array
      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
    type: object
  structs.WhoisData:
    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
        items:
          type: string
        type: array
      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
    type: object
  structs.WhoisSearchFriendlyResponse:
    properties:
      data:
        description: List of whois data records
        items:
          $ref: '#/definitions/structs.WhoisData'
        type: array
      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
    type: object
host: api.profundis.io
info:
  contact:
    name: The Profundis Team
    url: https://profundis.io/contact
  description: Profundis API provides access to various data services including Hosts,
    DNS, ASN, and subdomain enumeration.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://profundis.io/terms
  title: Profundis API
  version: "2.0"
paths:
  /api/v2/common/data/asn/details:
    post:
      consumes:
      - application/json
      description: Search for ASN details by number, name, CIDR, IP, or partial name/whois.
      parameters:
      - description: ASN details query
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.AsnDetailsQuery'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/structs.AsnDetailsResponse'
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Search for ASN details by number, name, CIDR, IP, or partial name/whois
      tags:
      - data
  /api/v2/common/data/dns:
    post:
      consumes:
      - application/json
      description: Allow users to search for DNS records using a human-friendly query
        language.
      parameters:
      - description: User query with search parameters
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.UserQuery'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/structs.DnsSearchFriendlyResponse'
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Dns Search
      tags:
      - data
  /api/v2/common/data/dns/export:
    post:
      consumes:
      - application/json
      description: Export all DNS records matching a query using results streaming
      parameters:
      - description: User query with search parameters
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.UserQuery'
      produces:
      - application/json
      responses:
        "200":
          description: Stream of DNS results, one per line as JSON
          schema:
            items:
              $ref: '#/definitions/structs.DNSData'
            type: array
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Export all DNS records matching a query
      tags:
      - data
  /api/v2/common/data/domains:
    post:
      consumes:
      - application/json
      description: Search for hosts details by domain or subdomain, including IP addresses,
        ASN data, and associated ports.
      parameters:
      - description: Domain or subdomain to search for
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.DomainDetailsQuery'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/structs.DomainDetailsResponse'
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Search for hosts details by domain or subdomain
      tags:
      - data
  /api/v2/common/data/hosts:
    post:
      consumes:
      - application/json
      description: Allow users to search for hosts using a human-friendly query language.
      parameters:
      - description: User query with search parameters
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.UserQuery'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/structs.HostsSearchFriendlyResponse'
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Hosts Search
      tags:
      - data
  /api/v2/common/data/hosts/export:
    post:
      consumes:
      - application/json
      description: Export all hosts matching a query using results streaming
      parameters:
      - description: User query with search parameters
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.UserQuery'
      produces:
      - application/json
      responses:
        "200":
          description: Stream of hosts results, one per line as JSON
          schema:
            items:
              $ref: '#/definitions/structs.HostData'
            type: array
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Export all hosts matching a query
      tags:
      - data
  /api/v2/common/data/subdomains:
    post:
      consumes:
      - application/json
      description: Enumerate subdomains for a given domain
      parameters:
      - description: Subdomains enumeration query
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.SubdomainsEnumQuery'
      produces:
      - application/json
      responses:
        "200":
          description: List of subdomains found for the given domain, one per line
          schema:
            items:
              type: string
            type: array
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Enumerate subdomains for a given domain
      tags:
      - data
  /api/v2/common/data/vhosts:
    post:
      consumes:
      - application/json
      description: Allow users to search for vhosts using a human-friendly query language.
      parameters:
      - description: User query with search parameters
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.UserQuery'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/structs.VhostsSearchFriendlyResponse'
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Vhosts Search
      tags:
      - data
  /api/v2/common/data/vhosts/export:
    post:
      consumes:
      - application/json
      description: Export all vhosts matching a query using results streaming
      parameters:
      - description: User query with search parameters
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.UserQuery'
      produces:
      - application/json
      responses:
        "200":
          description: Stream of vhosts results, one per line as JSON
          schema:
            items:
              $ref: '#/definitions/structs.VhostData'
            type: array
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Export all vhosts matching a query
      tags:
      - data
  /api/v2/common/data/whois:
    post:
      consumes:
      - application/json
      description: Allow users to search for Whois using a human-friendly query language.
      parameters:
      - description: User query with search parameters
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.UserQuery'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/structs.WhoisSearchFriendlyResponse'
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Whois Search
      tags:
      - data
  /api/v2/common/data/whois/export:
    post:
      consumes:
      - application/json
      description: Export all whois records matching a query using results streaming
      parameters:
      - description: User query with search parameters
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/structs.UserQuery'
      produces:
      - application/json
      responses:
        "200":
          description: Stream of whois results, one per line as JSON
          schema:
            items:
              $ref: '#/definitions/structs.WhoisData'
            type: array
        "400":
          description: Bad request, invalid query format or parameters
          schema:
            additionalProperties:
              type: string
            type: object
        "401":
          description: Unauthorized
          schema:
            additionalProperties:
              type: string
            type: object
        "403":
          description: Forbidden, user has exceeded their quota or made an invalid
            request
          schema:
            additionalProperties:
              type: string
            type: object
        "500":
          description: Internal server error
          schema:
            additionalProperties:
              type: string
            type: object
      summary: Export all whois records matching a query
      tags:
      - data
schemes:
- https
swagger: "2.0"
