openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/whoisfreaks/whois-api
info:
  title: "WHOIS & DNS API: Real-Time Domain & IP Lookup"
  description: Identify domain owners, validate SSL certificates, and check IP WHOIS data.
  version: 1.0.1
paths:
  /v1.0/whois:
    get:
      summary: Retrieve WHOIS information
      description: >-
        Retrieves Live, Historical or Reverse WHOIS information based on the
        specified parameters.

        #ExamplePrompt Give me ownership details of ipgeolocation.io using
        whoisfreaks
      operationId: get Live, Historical or reverse whois
      security: []
      parameters:
        - name: whois
          in: query
          required: true
          description: Type of WHOIS data to retrieve (e.g., live, historical, reverse)
          example: live
          schema:
            type: string
            enum:
              - live
              - historical
              - reverse
        - name: domainName
          in: query
          required: false
          description: The domain name for retrieving live or historical WHOIS
            information. Note that reverse lookup does not support domain-based
            searches.
          example: whoisfreaks.com
          schema:
            type: string
        - name: keyword
          in: query
          required: false
          description: Keyword for reverse WHOIS lookup
          example: whois
          schema:
            type: string
        - name: email
          in: query
          required: false
          description: Email address for reverse WHOIS lookup
          example: abc@xyz.com
          schema:
            type: string
        - name: owner
          in: query
          required: false
          description: Owner name for reverse WHOIS lookup
          example: ejaz
          schema:
            type: string
        - name: company
          in: query
          required: false
          description: Company name for reverse WHOIS lookup
          example: jfreaks
          schema:
            type: string
        - name: mode
          in: query
          required: false
          description: Mode for reverse WHOIS lookup (e.g., mini)
          example: mini
          schema:
            type: string
            enum:
              - mini
        - name: page
          in: query
          required: false
          description: Page number for paginated results
          example: "1"
          schema:
            type: integer
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                status: true
                domain_name: whoisfreaks.com
                query_time: 2024-07-11 13:03:30
                whois_server: whois.verisign-grs.com
                domain_registered: yes
                create_date: 2019-03-19
                update_date: 2024-02-18
                expiry_date: 2025-03-19
                domain_registrar:
                  iana_id: "1068"
                  registrar_name: NAMECHEAP INC
                  whois_server: whois.namecheap.com
                  website_url: http://www.namecheap.com
                  email_address: abuse@namecheap.com
                  phone_number: "+1.9854014545"
                name_servers:
                  - dns3.cloudns.net
                  - dns4.cloudns.net
                  - dns7.cloudns.net
                  - dns8.cloudns.net
                domain_status:
                  - clientTransferProhibited
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:38:43.883Z
                status: 400
                error: Invalid Param Exception
                message: "Please pass domain param correct value[For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:45:15.718+00:00
                path: /v1.0/whois
                status: 401
                error: Api Access Exception
                message: "Provided API key is invalid. [For Technical Support:
                  support@whoisfreaks.com]"
        "408":
          description: Request Timeout
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 408
                error: Fetching Whois Data Failed
                message: "Unable to fetch whois data.Please try again [For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 429
                error: Fetching Whois Data Failed
                message: Please slow down. Your maximum request limit per minute reached.
                path: /v1.0/whois
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 500
                error: Fetching Whois Data Failed
                message: "Internal Server error occurred. [For Technical Support email at:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
    parameters:
      - &a1
        description: API.market API Key
        in: header
        name: x-api-market-key
        value: Please Login/Signup to get an API Key
        required: true
        schema:
          type: string
  /v2.0/dns/{data_type}:
    get:
      summary: Retrieve Live, historical and reverse DNS records
      description: >-
        Retrieves live and historical records or dns data for a specified domain
        OR reverse DNS records for the specified data like IPV4 in case of A
        record and similarly for other supported records too.

        #ExamplePrompt Give me reverse DNS data for mx.zoho.com
      operationId: getDNSRecords
      parameters:
        - name: data_type
          in: path
          required: true
          description: Type of DNS operation (live, historical, reverse)
          example: live
          schema:
            type: string
            enum:
              - live
              - historical
              - reverse
        - name: domainName
          in: query
          description: Domain name to retrieve DNS records for
          example: whoisfreaks.com
          schema:
            type: string
        - name: value
          in: query
          description: Value to perform reverse DNS lookup on (e.g., IP address, domain
            name, etc.)
          example: 8.8.8.8
          schema:
            type: string
        - name: type
          in: query
          required: true
          description: Type of DNS records to retrieve. Possible values are [A, AAAA, NS,
            MX, CNAME, TXT, SPF, SOA, all]. When data_type is 'reverse', 'all'
            is not allowed.
          example: a
          schema:
            type: string
            enum:
              - A
              - AAAA
              - MX
              - NS
              - CNAME
              - SOA
              - SPF
              - TXT
              - ALL
        - name: page
          in: query
          description: Page number for paginated results
          example: "1"
          schema:
            type: integer
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                status: true
                queryTime: 2024-07-15 12:49:43
                domainName: whoisfreaks.com
                domainRegistered: true
                dnsTypes:
                  A: 1
                  MX: 15
                  NS: 2
                  SOA: 6
                  SPF: 99
                  TXT: 16
                dnsRecords:
                  - name: whoisfreaks.com
                    type: 1
                    dnsType: A
                    ttl: 3600
                    rRsetType: 1
                    address: 172.233.38.245
                  - name: whoisfreaks.com
                    type: 15
                    dnsType: MX
                    ttl: 3600
                    rRsetType: 15
                    target: mx.zoho.com.
                    priority: 10
                  - name: whoisfreaks.com
                    type: 2
                    dnsType: NS
                    ttl: 3600
                    rRsetType: 2
                    singleName: dns8.cloudns.net.
                  - name: whoisfreaks.com
                    type: 6
                    dnsType: SOA
                    ttl: 3600
                    rRsetType: 6
                    admin: support.cloudns.net.
                    host: dns3.cloudns.net.
                    expire: 1209600
                    minimum: 3600
                    refresh: 7200
                    retry: 1800
                    serial: 2024070901
                  - name: whoisfreaks.com
                    type: 99
                    dnsType: SPF
                    ttl: 3600
                    rRsetType: 99
                    strings:
                      - v=spf1 mx include:spf.mtasv.net -all.
                  - name: whoisfreaks.com
                    type: 16
                    dnsType: TXT
                    ttl: 3600
                    rRsetType: 16
                    strings:
                      - paddle-verification=ba8cd073
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:38:43.883Z
                status: 400
                error: Invalid Param Exception
                message: "Please pass domain param correct value[For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:45:15.718+00:00
                path: /v1.0/whois
                status: 401
                error: Api Access Exception
                message: "Provided API key is invalid. [For Technical Support:
                  support@whoisfreaks.com]"
        "408":
          description: Request Timeout
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 408
                error: Fetching Whois Data Failed
                message: "Unable to fetch whois data.Please try again [For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 429
                error: Fetching Whois Data Failed
                message: Please slow down. Your maximum request limit per minute reached.
                path: /v1.0/whois
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 500
                error: Fetching Whois Data Failed
                message: "Internal Server error occurred. [For Technical Support email at:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
    parameters:
      - *a1
  /v1.0/ssl/live:
    get:
      summary: Retrieve live SSL certificate information
      description: >-
        Retrieves live SSL certificate information for the specified domain.

        #ExamplePrompt When does whoisfreaks.com' SSL certificate will be
        expired?
      operationId: getLiveSSLCertificate
      security: []
      parameters:
        - name: domainName
          in: query
          required: true
          description: Domain name to retrieve SSL certificate information for
          example: whoisfreaks.com
          schema:
            type: string
        - name: chain
          in: query
          description: Whether to include the certificate chain
          example: "false"
          schema:
            type: boolean
        - name: sslRaw
          in: query
          description: Whether to include the raw SSL data
          example: "false"
          schema:
            type: boolean
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                domainName: whoisfreaks.com
                queryTime: 2024-07-25 13:03:18
                sslCertificates:
                  - chainOrder: end-user
                    authenticationType: domain
                    validityStartDate: 2024-07-6 23:04:42 UTC
                    validityEndDate: 2024-10-4 23:04:41 UTC
                    serialNumber: 03:83:6b:cb:36:00:83:ad:41:f5:6e:cf:89:d9:6f:da:19:f1
                    signatureAlgorithm: ECDSA-SHA2384
                    subject:
                      commonName: whoisfreaks.com
                    issuer:
                      commonName: E6
                      organization: Let's Encrypt
                      country: US
                    publicKey:
                      keySize: 256 bit
                      keyAlgorithm: ECDSA
                    extensions:
                      authorityKeyIdentifier: 93:27:46:98:03:A9:51:68:8E:98:D6:C4:42:48:DB:23:BF:58:94:D2
                      subjectKeyIdentifier: 16:57:AD:8E:F8:C6:4B:6A:ED:D0:FB:7D:06:2D:FA:D1:14:E4:03:35
                      keyUsages:
                        - Digital Signature
                      extendedKeyUsages:
                        - TLS Web Server Authentication
                        - TLS Web Client Authentication
                      authorityInfoAccess:
                        issuers:
                          - http://e6.i.lencr.org/
                        ocsp:
                          - http://e6.o.lencr.org
                      subjectAlternativeNames:
                        dnsNames:
                          - www.whoisfreaks.com
                          - whoisfreaks.com
                      certificatePolicies:
                        - policyId: 2.23.140.1.2.1
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:38:43.883Z
                status: 400
                error: Invalid Param Exception
                message: "Please pass domain param correct value[For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:45:15.718+00:00
                path: /v1.0/whois
                status: 401
                error: Api Access Exception
                message: "Provided API key is invalid. [For Technical Support:
                  support@whoisfreaks.com]"
        "408":
          description: Request Timeout
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 408
                error: Fetching Whois Data Failed
                message: "Unable to fetch whois data.Please try again [For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 429
                error: Fetching Whois Data Failed
                message: Please slow down. Your maximum request limit per minute reached.
                path: /v1.0/whois
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 500
                error: Fetching Whois Data Failed
                message: "Internal Server error occurred. [For Technical Support email at:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
    parameters:
      - *a1
  /v1.0/ip-whois:
    get:
      summary: Retrieve IP WHOIS information
      description: |-
        Retrieves WHOIS information for the specified IP address.
        #ExamplePrompt give me WHOIS details of 8.8.8.8
      operationId: getIpWhois
      security: []
      parameters:
        - name: ip
          in: query
          required: true
          description: IP address to retrieve WHOIS information for
          example: 8.8.8.8
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                status: true
                ip_address: 8.8.8.8
                query_time: 2024-07-25 13:05:56
                whois_server: whois.arin.net
                inet_nums:
                  - start_ip: 8.8.8.0
                    end_ip: 8.8.8.255
                    cidr:
                      - 8.8.8.0/24
                    net_name: GOGL
                    net_handle: NET-8-8-8-0-2
                    status: Direct Allocation
                    organization: Google LLC (GOGL)
                    date_created: 2023-12-28
                    date_updated: 2023-12-28
                    source: https://rdap.arin.net/registry/ip/8.8.8.0
                    parents:
                      - NET8 (NET-8-0-0-0-0)
                organization:
                  handle: GOGL
                  name: Google LLC
                  address:
                    - 1600 Amphitheatre Parkway
                    - Mountain View
                    - CA
                    - "94043"
                    - US
                  street: Amphitheatre Parkway
                  city: Mountain View
                  state: CA
                  zip_code: "94043"
                  country:
                    - US
                  date_created: 2000-03-30
                  date_updated: 2019-10-31
                  source: https://rdap.arin.net/registry/entity/GOGL
                technical_contacts:
                  - handle: ZG39-ARIN
                    name: Google LLC
                    email:
                      - arin-contact@google.com
                    phone:
                      - +1-650-253-0000
                    source: https://rdap.arin.net/registry/entity/ZG39-ARIN
                abuse_contacts:
                  - handle: ABUSE5250-ARIN
                    name: Abuse
                    email:
                      - network-abuse@google.com
                    phone:
                      - +1-650-253-0000
                    source: https://rdap.arin.net/registry/entity/ABUSE5250-ARIN
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:38:43.883Z
                status: 400
                error: Invalid Param Exception
                message: "Please pass domain param correct value[For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:45:15.718+00:00
                path: /v1.0/whois
                status: 401
                error: Api Access Exception
                message: "Provided API key is invalid. [For Technical Support:
                  support@whoisfreaks.com]"
        "408":
          description: Request Timeout
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 408
                error: Fetching Whois Data Failed
                message: "Unable to fetch whois data.Please try again [For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 429
                error: Fetching Whois Data Failed
                message: Please slow down. Your maximum request limit per minute reached.
                path: /v1.0/whois
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 500
                error: Fetching Whois Data Failed
                message: "Internal Server error occurred. [For Technical Support email at:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
    parameters:
      - *a1
  /v1.0/asn-whois:
    get:
      summary: Retrieve ASN WHOIS information
      description: |-
        Retrieves WHOIS information for the specified ASN.
        #ExamplePrompt 'AS13335' AS number belongs to which organization?
      operationId: getAsnWhois
      security: []
      parameters:
        - name: asn
          in: query
          required: true
          description: ASN to retrieve WHOIS information for
          example: AS56554
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                status: true
                as_number: AS56554
                query_time: 2024-07-25 13:06:47
                whois_server: whois.ripe.net
                as_blocks:
                  - as_block: AS56444 - AS56867
                    description:
                      - RIPE NCC ASN block
                    remarks:
                      - These AS Numbers are assigned to network operators in
                        the RIPE NCC service region.
                    mnt_by:
                      - RIPE-NCC-HM-MNT
                    date_created: 2024-07-08
                    date_updated: 2024-07-08
                    source: RIPE
                aut_nums:
                  - aut_num: AS56554
                    as_name: IETF-MEETING
                    description:
                      - IETF Meeting Network
                    status: ASSIGNED
                    import:
                      - from AS-ANY accept ANY
                    export:
                      - to AS-ANY announce ANY
                    organization: ORG-IS136-RIPE
                    sponsoring_organization: ORG-NIE1-RIPE
                    admin_contacts:
                      - IED11-RIPE
                    tech_contacts:
                      - IETF-RIPE
                    mnt_by:
                      - RIPE-NCC-END-MNT
                      - IETF-MNT
                      - netnod-mnt
                    date_created: 2011-03-16
                    date_updated: 2019-03-26
                    source: RIPE
                organization:
                  handle: ORG-IS136-RIPE
                  name: Internet Society
                  type: OTHER
                  address:
                    - Galerie Jean-Malbuisson 15, CH-1204 Geneva, Switzerland
                  street: Galerie Jean-malbuisson
                  city: Geneva
                  zip_code: CH-1204
                  country:
                    - CH
                  abuse_contacts:
                    - AR28097-RIPE
                  mnt_ref:
                    - netnod-mnt
                  mnt_by:
                    - ietf-mnt
                  date_created: 2010-11-09
                  date_updated: 2022-12-01
                  source: RIPE
                administrative_contacts:
                  - handle: IED11-RIPE
                    name: IETF Executive Director
                    address:
                      - c/o Association Management Solutions, LLC (AMS)
                      - 5177 Brandin Court
                      - Fremont, California 94538
                      - USA
                    street: Brandin Court
                    city: Fremont
                    state: CALIFORNIA
                    zip_code: "94538"
                    country: USA
                    mnt_by:
                      - IETF-MNT
                    date_created: 2019-03-26
                    date_updated: 2019-03-26
                    source: RIPE
                technical_contacts:
                  - handle: IETF-RIPE
                    name: IETF NOC
                    address:
                      - c/o Association Management Solutions, LLC (AMS)
                      - 5177 Brandin Court
                      - Fremont, California 94538
                      - USA
                    street: Brandin Court
                    city: Fremont
                    state: CALIFORNIA
                    zip_code: "94538"
                    country: USA
                    tech_contacts:
                      - JM13150-RIPE
                      - SC21890-RIPE
                      - WK1766-RIPE
                      - CS218
                    mnt_by:
                      - IETF-MNT
                    date_created: 2019-03-26
                    date_updated: 2019-05-28
                    source: RIPE
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:38:43.883Z
                status: 400
                error: Invalid Param Exception
                message: "Please pass domain param correct value[For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:45:15.718+00:00
                path: /v1.0/whois
                status: 401
                error: Api Access Exception
                message: "Provided API key is invalid. [For Technical Support:
                  support@whoisfreaks.com]"
        "408":
          description: Request Timeout
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 408
                error: Fetching Whois Data Failed
                message: "Unable to fetch whois data.Please try again [For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 429
                error: Fetching Whois Data Failed
                message: Please slow down. Your maximum request limit per minute reached.
                path: /v1.0/whois
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 500
                error: Fetching Whois Data Failed
                message: "Internal Server error occurred. [For Technical Support email at:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
    parameters:
      - *a1
  /v1.0/domain/availability:
    get:
      summary: Check domain availability
      description: >-
        Checks the availability of the specified domain and provides suggestions
        if requested.

        #ExamplePrompt Is 'whoisfreaks.pk' a registered domain or not?
      operationId: checkSingleDomainAvailability
      security: []
      parameters:
        - name: domain
          in: query
          required: true
          description: Domain to check availability for
          example: whoisfreaks.pk
          schema:
            type: string
        - name: sug
          in: query
          required: false
          description: Whether to provide domain suggestions
          example: "false"
          schema:
            type: boolean
        - name: count
          in: query
          required: false
          description: Number of suggestions to provide
          example: "6"
          schema:
            type: integer
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                domain: whoisfreaks.pk
                domainAvailability: true
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:38:43.883Z
                status: 400
                error: Invalid Param Exception
                message: "Please pass domain param correct value[For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:45:15.718+00:00
                path: /v1.0/whois
                status: 401
                error: Api Access Exception
                message: "Provided API key is invalid. [For Technical Support:
                  support@whoisfreaks.com]"
        "408":
          description: Request Timeout
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 408
                error: Fetching Whois Data Failed
                message: "Unable to fetch whois data.Please try again [For Technical Support:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 429
                error: Fetching Whois Data Failed
                message: Please slow down. Your maximum request limit per minute reached.
                path: /v1.0/whois
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
              example:
                timestamp: 2024-07-10T13:47:02.486Z
                status: 500
                error: Fetching Whois Data Failed
                message: "Internal Server error occurred. [For Technical Support email at:
                  support@whoisfreaks.com]"
                path: /v1.0/whois
    parameters:
      - *a1
security: {}
tags:
  - name: domain-ip-intel
    description: Operations related to domain-ip-intel
  - name: account-verification
    description: Operations related to account-verification
  - name: content-moderation
    description: Operations related to content-moderation
