{
  "openapi": "3.0.1",
  "info": {
    "title": "Dun & Bradstreet [$5💰] Companies, DUNS, Revenue & Staff",
    "description": "Scrape companies from the Dun & Bradstreet directory via D&B's own API - address, industry, DUNS, revenue (numeric + per-year), real employee counts, key principal, executives & website. Search with filters, browse industries by region/city, or paste profile URLs. JSON/CSV out.",
    "version": "0.0",
    "x-build-id": "IGzrLUj2SD9dMNzgS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~dnb-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-dnb-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/memo23~dnb-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-dnb-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/memo23~dnb-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-dnb-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",
        "properties": {
          "queries": {
            "title": "Company search terms",
            "type": "array",
            "description": "One or more company names or keywords to search the Dun & Bradstreet business directory (e.g. `software`, `logistics`, `Take-Two`). Each query paginates independently.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country (ISO alpha-2)",
            "type": "string",
            "description": "Two-letter country code to search within, e.g. `us`, `gb`, `de`, `fr`, `ca`, `au`. D&B is geo-aware; US has the richest coverage.",
            "default": "us"
          },
          "startUrls": {
            "title": "dnb.com URLs (optional, auto-classified)",
            "type": "array",
            "description": "Paste any dnb.com business-directory URL: company-profile URLs (`…/company-profiles/{slug}.{hash}`, or the older `…/company-profiles.{slug}.{hash}.html`) fetch that company's full profile directly; industry-listing URLs (`…/business-directory/{country}/{region}/{industry}/companies`, or the older `…/company-information.{industry}.{country}.{region}.html`) are browsed page by page; search URLs (`…/company-search.html?term=X`) run as an extra query. Works alongside or instead of search terms.",
            "items": {
              "type": "string"
            }
          },
          "industryPaths": {
            "title": "Industry slugs",
            "type": "array",
            "description": "D&B industry slugs to browse (e.g. `software_publishers`, `commercial_banking`, `legal_services`). Each is scoped by the Country field above and the optional Region/City below.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region / state (optional)",
            "type": "string",
            "description": "State or region slug to narrow industry browsing (e.g. `california`, `texas`, `new_york`). Leave empty for the whole country."
          },
          "city": {
            "title": "City (optional)",
            "type": "string",
            "description": "City slug to narrow industry browsing further (e.g. `san_francisco`, `los_angeles`). Use together with Region."
          },
          "minEmployees": {
            "title": "Min employees",
            "minimum": 0,
            "type": "integer",
            "description": "Only companies with at least this many employees."
          },
          "maxEmployees": {
            "title": "Max employees",
            "minimum": 1,
            "type": "integer",
            "description": "Only companies with at most this many employees."
          },
          "companyRole": {
            "title": "Company hierarchy role",
            "enum": [
              "any",
              "parent",
              "branch",
              "subsidiary",
              "domestic-ultimate",
              "global-ultimate"
            ],
            "type": "string",
            "description": "Only companies playing this role in their corporate family tree.",
            "default": "any"
          },
          "scrapeCompanyProfiles": {
            "title": "Scrape full company profiles (richer, one extra request per company)",
            "type": "boolean",
            "description": "Visit each company's profile to add revenue (formatted + numeric + per-year), REAL employee counts, key principal, named executives with titles, stock ticker, industry taxonomy, website, corporate-linkage counts and similar companies. Disable for a faster, list-only run (name, address, industry, DUNS, location type).",
            "default": true
          },
          "enrichEmails": {
            "title": "Enrich with contact emails (experimental, billed per email)",
            "type": "boolean",
            "description": "If enabled, tries to find a contact email for each company by visiting its website (taken straight from the D&B profile) and reading its contact/about pages. Adds contactEmail + contactWebsite columns plus a detailed emailEnrichment object. Best-effort, billed per contact email found; only charged when an email is returned, never for misses. Works best together with 'Scrape full company profiles'.",
            "default": false
          },
          "qualifyByPayment": {
            "title": "💳 Qualify by payment (flag businesses that take money online)",
            "type": "boolean",
            "description": "Requires \"Enrich with contact emails\". Scans each business's website — reusing the pages already fetched for email discovery, so no extra cost or time — for payment processors and e-commerce platforms (Stripe, Shopify, PayPal, Paddle, Lemon Squeezy, WooCommerce, Square, Chargebee and more). Adds takesPayments (is this a real paying business?), paymentProcessors (which stack), stripeLiveKey (the public key if exposed) and paymentConfidence. Turn raw contacts into monetization-qualified leads. No extra charge — included with each enriched company.",
            "default": false
          },
          "maxItemsPerQuery": {
            "title": "Max companies per query",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of companies to collect for each search term. Results are paginated automatically (~25 per page).",
            "default": 200
          },
          "maxItems": {
            "title": "Maximum items total",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on the total number of companies collected across all queries and start URLs. Use this cap to limit billing.",
            "default": 1000
          },
          "cacheMaxAgeHours": {
            "title": "Reuse recent results (hours)",
            "minimum": 0,
            "maximum": 720,
            "type": "integer",
            "description": "When one of your earlier runs already fetched a D&B page — a search page, an industry listing page or a company profile — reuse it if it is younger than this many hours instead of fetching it again. Much faster and gentler on the source; set 0 to always fetch fresh. Company firmographics (revenue, employee counts, key principal, executives) change slowly, so the default of 24 hours is safe for most jobs. Only your own account's pages are reused.",
            "default": 24
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of profile API calls processed in parallel.",
            "default": 10
          },
          "minConcurrency": {
            "title": "Min concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Minimum number of API calls processed in parallel.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "type": "integer",
            "description": "Number of retries before a failed request is given up.",
            "default": 5
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Used for the first, direct request to D&B and for email enrichment. D&B currently answers direct requests with a Cloudflare challenge, so the actor then fetches through its built-in unblocker at no extra cost to you. Leave empty to use the actor's own residential pool."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}