{
  "openapi": "3.0.1",
  "info": {
    "title": "Dun & Bradstreet Scraper - Companies, Revenue & Contacts",
    "description": "Scrape Dun & Bradstreet (dnb.com) business directory by company name, country, size, role or industry. Extract company profiles, revenue, employee counts, key executives, principals, contact details and stock information. Ideal for B2B lead generation, company research and market intelligence.",
    "version": "0.1",
    "x-build-id": "uL55ys61Yx49HV10o"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~dnb-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-dnb-com-scraper",
        "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/abotapi~dnb-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-dnb-com-scraper",
        "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/abotapi~dnb-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-dnb-com-scraper",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "urls"
            ],
            "type": "string",
            "description": "Search looks companies up by name with optional filters. Links mode walks any page the directory publishes: industry browse pages (with region or city), and company profile pages.",
            "default": "search"
          },
          "queries": {
            "title": "Company name keywords",
            "type": "array",
            "description": "One or more company name keywords. Each keyword runs its own search; the record limit is shared between them.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code the search is scoped to, for example us, gb, de, in, cn. Leave as us for the United States.",
            "default": "us"
          },
          "employeesMin": {
            "title": "Minimum employees",
            "type": "integer",
            "description": "Optional lower bound on employee count, applied by the directory before results return."
          },
          "employeesMax": {
            "title": "Maximum employees",
            "type": "integer",
            "description": "Optional upper bound on employee count, applied by the directory before results return."
          },
          "companyRole": {
            "title": "Company role",
            "enum": [
              "any",
              "branch",
              "parent",
              "subsidiary"
            ],
            "type": "string",
            "description": "Optional role in the corporate family tree. The directory only narrows its role counts, so this is applied to the collected results.",
            "default": "any"
          },
          "urls": {
            "title": "Directory links",
            "type": "array",
            "description": "Links mode: paste industry browse pages, region or city browse pages, company profile pages, or legacy listing links. Multi-URL, filter fields ignored, pagination walks forward.",
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Enrich company details",
            "type": "boolean",
            "description": "Read each company's profile page to add revenue, employee counts, principals, contacts, stock listing, corporate family and similar companies. Turning this off ships search rows only and costs less.",
            "default": true
          },
          "maxPages": {
            "title": "Max pages per scope",
            "type": "integer",
            "description": "How many result pages to walk per search or browse scope at most. Leave empty or 0 for no page limit: the record limit below is what stops a run. The directory serves the first 1,000 matches per scope."
          },
          "maxItems": {
            "title": "Max records",
            "type": "integer",
            "description": "Maximum company records to collect per run across all searches and links. 0 means unlimited.",
            "default": 20
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Which Apify proxy the run connects through; it needs a paid Apify plan with proxy access. The default (automatic) was measured to serve the directory; pick residential exits only if you need a specific country. If the chosen connection cannot serve, the run falls back once to a backup connection and says so in the log. Proxy URLs you enter are used exactly as given.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resumeFromRunId": {
            "title": "Resume from run ID",
            "type": "string",
            "description": "ID of an unfinished run to pick up from: records already collected by that run are skipped and the walk continues where it stopped."
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Compare every scanned record against the saved baseline: unchanged companies are skipped (no cost), changed ones ship with changeType and changedFields, and records that disappeared can be reported as EXPIRED.",
            "default": false
          },
          "stateKey": {
            "title": "Baseline state key",
            "type": "string",
            "description": "Optional name for the saved baseline. Use one key per recurring scope so scheduled runs compare like with like."
          },
          "emitUnchanged": {
            "title": "Also push unchanged records",
            "type": "boolean",
            "description": "Incremental mode: also push records whose data did not change (they keep changeType UNCHANGED and are charged as dataset rows).",
            "default": false
          },
          "emitExpired": {
            "title": "Report disappeared records",
            "type": "boolean",
            "description": "Incremental mode: push an EXPIRED row for every baseline record missing from a complete scan. Skipped automatically when a run stopped early.",
            "default": false
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Field names change detection should disregard (yours are added to the built-in noise list, which already covers result position and run bookkeeping).",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "MCP connectors",
            "type": "array",
            "description": "Connector IDs to send collected records to after the run, through the Apify MCP proxy.",
            "items": {
              "type": "string"
            }
          },
          "notionParentPageUrl": {
            "title": "Notion parent page URL",
            "type": "string",
            "description": "Optional Notion page URL: each collected record becomes a child page under it."
          },
          "maxNotifyListings": {
            "title": "Max records per notification",
            "type": "integer",
            "description": "Cap on how many records a connector export carries.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}