{
  "openapi": "3.0.1",
  "info": {
    "title": "DNS Lookup – Bulk DNS Records, MX, SPF & DMARC Checker",
    "description": "Bulk DNS lookup for thousands of domains: A, AAAA, MX, NS, TXT, CNAME, SOA, CAA records, SPF checker with 10-lookup limit, DMARC policy & rua, DKIM selectors, MTA-STS, BIMI, reverse DNS, change monitoring. Pick resolver: 1.1.1.1, 8.8.8.8 or custom. $1 per 1,000 domains.",
    "version": "0.1",
    "x-build-id": "KfRlfSRLpdXTOKWUJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~bulk-dns-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-bulk-dns-lookup",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/gazidev~bulk-dns-lookup/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-bulk-dns-lookup",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/gazidev~bulk-dns-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-bulk-dns-lookup",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Domains to look up, e.g. `example.com`. URLs (`https://www.example.com/page` → `www.example.com`) and email addresses (`jane@example.com` → `example.com`) are accepted. Duplicates are removed automatically.",
            "default": [
              "apify.com",
              "github.com",
              "bbc.co.uk"
            ],
            "items": {
              "type": "string"
            }
          },
          "bulkText": {
            "title": "Bulk list (paste text or CSV)",
            "type": "string",
            "description": "Paste a long list: one domain per line, comma/semicolon separated, or a whole CSV export (the first cell that looks like a domain, URL or email in each row is used)."
          },
          "sourceFileUrl": {
            "title": "Bulk list file URL (TXT/CSV)",
            "type": "string",
            "description": "Public URL of a .txt or .csv file with domains (e.g. a Google Sheets 'Publish to web' CSV link)."
          },
          "recordTypes": {
            "title": "Record types",
            "type": "array",
            "description": "DNS record types to query for each domain. PTR = reverse DNS of the A records (same as the 'Reverse DNS' switch).",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "AAAA",
                "MX",
                "NS",
                "TXT",
                "CNAME",
                "SOA",
                "CAA",
                "SRV",
                "DS",
                "DNSKEY",
                "HTTPS",
                "SVCB",
                "NAPTR",
                "TLSA",
                "PTR"
              ],
              "enumTitles": [
                "A (IPv4)",
                "AAAA (IPv6)",
                "MX (mail servers)",
                "NS (name servers)",
                "TXT",
                "CNAME (alias)",
                "SOA",
                "CAA (allowed certificate authorities)",
                "SRV",
                "DS (DNSSEC delegation)",
                "DNSKEY (DNSSEC keys)",
                "HTTPS",
                "SVCB",
                "NAPTR",
                "TLSA (DANE)",
                "PTR (reverse DNS of A records)"
              ]
            },
            "default": [
              "A",
              "AAAA",
              "MX",
              "NS",
              "TXT",
              "CNAME",
              "SOA",
              "CAA"
            ]
          },
          "resolver": {
            "title": "DNS resolver",
            "enum": [
              "cloudflare",
              "google",
              "quad9",
              "system",
              "custom"
            ],
            "type": "string",
            "description": "Which DNS server answers the queries. Cloudflare (1.1.1.1) is fast and does not filter. Use 'Custom' to check what a specific DNS server returns (e.g. your company resolver or an authoritative name server).",
            "default": "cloudflare"
          },
          "customResolvers": {
            "title": "Custom resolver IPs",
            "type": "array",
            "description": "Used only when DNS resolver = Custom. IPv4/IPv6 addresses, e.g. `208.67.222.222`.",
            "items": {
              "type": "string"
            }
          },
          "lookupTarget": {
            "title": "What to look up",
            "enum": [
              "asEntered",
              "rootDomain"
            ],
            "type": "string",
            "description": "'As entered' queries the exact host name (www.example.com stays www.example.com). 'Root domain' strips subdomains (www.example.com → example.com), useful for lists of URLs.",
            "default": "asEntered"
          },
          "emailSecurity": {
            "title": "Email security: SPF, DMARC, MTA-STS, TLS-RPT, BIMI",
            "type": "boolean",
            "description": "Parse SPF (mechanisms, includes, recursive DNS-lookup count with the RFC 7208 limit of 10), DMARC (policy, sp, pct, rua/ruf, alignment, org-domain fallback), MTA-STS, TLS-RPT and BIMI, plus the email provider detected from MX.",
            "default": true
          },
          "checkDkim": {
            "title": "Check common DKIM selectors",
            "type": "boolean",
            "description": "Probe ~29 common DKIM selectors (google, selector1/2, k1-k3, default, s1/s2, mandrill, amazonses...). DKIM keys cannot be listed, so 'none found' means 'not under common selectors'.",
            "default": true
          },
          "dkimSelectors": {
            "title": "Extra DKIM selectors",
            "type": "array",
            "description": "Your own selectors to check in addition to the common ones, e.g. `mailo`, `cm`, `scph0922`.",
            "items": {
              "type": "string"
            }
          },
          "reverseDns": {
            "title": "Reverse DNS (PTR) for A records",
            "type": "boolean",
            "description": "Look up the PTR record of each IPv4 address (max 5 per domain), e.g. to see the hosting provider.",
            "default": false
          },
          "onlyChanges": {
            "title": "Monitor mode: output only changed domains",
            "type": "boolean",
            "description": "Compares each domain with the previous run (stored in a named key-value store in your account) and outputs only domains whose records changed, with a list of added/removed values. Schedule the Actor daily to get DNS change alerts. TTLs and the SOA serial are ignored.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store that keeps the last known state. Use different names for different watch lists.",
            "default": "dns-lookup-monitor"
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Record key inside the store (lets one store hold several lists).",
            "default": "SNAPSHOT"
          },
          "includeNewDomains": {
            "title": "Output domains seen for the first time",
            "type": "boolean",
            "description": "In monitor mode, also output domains that have no previous state (the first run outputs your whole list as the baseline).",
            "default": true
          },
          "monitorIgnoreTypes": {
            "title": "Ignore these record types for change detection",
            "type": "array",
            "description": "E.g. `A` and `AAAA` for CDN sites whose IPs rotate on every query.",
            "items": {
              "type": "string"
            }
          },
          "maxDomains": {
            "title": "Max domains",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many unique domains (0 = no limit).",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel domains",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many domains are looked up at the same time.",
            "default": 50
          },
          "timeoutSecs": {
            "title": "DNS timeout (seconds)",
            "minimum": 2,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum time per DNS query (one retry on timeout).",
            "default": 8
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}