{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk DNS Records Lookup - A, MX, TXT, SPF & DMARC",
    "description": "Look up DNS records for a list of domains: A, AAAA, MX, TXT, NS, CNAME, SOA and CAA, plus derived SPF and DMARC and the email provider inferred from the MX host. Node native resolver, no browser, no anti-bot. Fast, cents per domain.",
    "version": "0.1",
    "x-build-id": "0xxWNhBnGEs0WhSl9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~dns-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~dns-lookup/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~dns-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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, one per line - e.g. <code>example.com</code>. A full URL or an email address is accepted too; only the registrable host is used (<code>https://www.example.com/path</code> and <code>joe@example.com</code> both become <code>example.com</code>). <b>Leave empty and the run returns a small free sample.</b>",
            "items": {
              "type": "string"
            }
          },
          "domainsFromFile": {
            "title": "Import domains from a file",
            "type": "string",
            "description": "Bulk-load domains. Either <b>paste the whole list</b> (one per line or comma-separated), or give <b>a single link</b> to a public <code>.txt</code>/<code>.csv</code>, a Google Sheet/Drive link, or an Apify key-value-store record. Blank lines, <code>#</code> comments, quotes and extra CSV columns all parse. A file that cannot be read says so and charges nothing."
          },
          "recordTypes": {
            "title": "Record types (leave empty for all)",
            "type": "array",
            "description": "Which DNS record types to resolve. Leave empty to resolve them all. <code>SPF</code> is derived from <code>TXT</code>, so include <code>TXT</code> to get it.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "AAAA",
                "MX",
                "TXT",
                "NS",
                "CNAME",
                "SOA",
                "CAA",
                "DMARC"
              ],
              "enumTitles": [
                "A - IPv4 address (A)",
                "AAAA - IPv6 address (AAAA)",
                "MX - mail servers (MX)",
                "TXT - text records incl. SPF (TXT)",
                "NS - name servers (NS)",
                "CNAME - canonical name (CNAME)",
                "SOA - start of authority (SOA)",
                "CAA - cert authorities (CAA)",
                "DMARC - _dmarc policy (DMARC)"
              ]
            }
          },
          "outputFields": {
            "title": "Output fields (leave empty for all)",
            "type": "array",
            "description": "Pick the fields you want and every record is trimmed to exactly those - handy for lean CSV/Sheets exports. Open the dropdown and tick, or type to filter (<code>a</code>, <code>mx</code>, <code>spf</code>).",
            "items": {
              "type": "string",
              "enum": [
                "type",
                "domain",
                "resolved",
                "a",
                "aaaa",
                "mx",
                "txt",
                "ns",
                "cname",
                "soa",
                "caa",
                "spf",
                "dmarc",
                "mailProvider",
                "error",
                "checkedAt"
              ],
              "enumTitles": [
                "Record type (type)",
                "Domain (domain)",
                "Resolved (resolved)",
                "A / IPv4 (a)",
                "AAAA / IPv6 (aaaa)",
                "MX / mail servers (mx)",
                "TXT records (txt)",
                "NS / name servers (ns)",
                "CNAME (cname)",
                "SOA (soa)",
                "CAA (caa)",
                "SPF record (spf)",
                "DMARC record (dmarc)",
                "Mail provider (mailProvider)",
                "Error (error)",
                "Checked at (checkedAt)"
              ]
            }
          },
          "maxItems": {
            "title": "Max domains",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum domains to look up in one run (after de-duplication).",
            "default": 5000
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many domains to resolve in parallel. Higher is faster; the ceiling is 50.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}