# Dun & Bradstreet Scraper - Companies, DUNS, Revenue & Employees (`memo23/dnb-scraper`) Actor

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.

- **URL**: https://apify.com/memo23/dnb-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Lead generation, AI, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 company results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Dun & Bradstreet Scraper — Companies, DUNS, Revenue & Real Employee Counts

Extract structured company data from the [Dun & Bradstreet](https://www.dnb.com/) business directory (dnb.com) — **company name, full address, industry, DUNS, revenue (formatted + numeric + per-year), REAL employee counts, key principal, named executives, stock ticker, website and more** — straight from D&B's own directory API. No D&B subscription, no manual copy-paste, no coding required. Export as JSON, CSV, Excel, or via API.

#### How it works

![How Dun & Bradstreet Scraper works](https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-dnb.png)

#### ✨ Why use this scraper?

- ✅ **D&B's own directory API, not fragile HTML** — the actor calls the same JSON endpoints the dnb.com site uses, so fields arrive structured and stable
- ✅ **Real employee counts** — where other D&B scrapers return `null` for gated fields, this one recovers the structured values D&B still ships (e.g. `12,909 (Actual, Consolidated)` for Take-Two)
- ✅ **Revenue three ways** — formatted (`$6.66 billion`), absolute numeric USD (`6656400000`), and per-fiscal-year history with accuracy flags; when D&B masks the display string the numeric value is recovered and the formatted figure rebuilt
- ✅ **Key principal + named executives** with titles, plus counts of principals and contacts on file
- ✅ **Three ways in** — keyword search (with employee-count + hierarchy-role filters), **industry browsing** (revenue-sorted directory listings scoped by country → region → city), and direct profile URLs
- ✅ **Server-side filters** — narrow keyword searches by min/max employees and company role (Parent/HQ, Branch, Subsidiary, Domestic/Global Ultimate) before a single row is billed
- ✅ **Country targeting** — search within US, GB, DE, FR, CA, AU and more (D&B is geo-aware)
- ✅ **Opt-in contact-email enrichment** — the actor can visit each company's own website (taken from its D&B profile) and extract a contact email
- ✅ Automatic pagination + de-duplication by DUNS; exports to **JSON, CSV, Excel, XML**, integrates with Google Sheets, Make, Zapier, Slack

#### 🎯 Use cases

- **B2B lead generation & sales prospecting** — build targeted prospect lists by industry keyword and country, prioritised by revenue and headcount
- **CRM & data enrichment** — append DUNS, industry, address, revenue, employees and website to your accounts
- **Market sizing / TAM analysis** — pull every company matching a sector keyword with real firmographics instead of guesswork
- **Corporate hierarchy mapping** — `locationType` distinguishes Parent vs Branch locations
- **Decision-maker identification** — key principal and named executives with titles on each profile
- **Risk, credit & supplier research** — DUNS-anchored firmographics for KYB and vendor onboarding
- **Competitive & industry intelligence** — industry taxonomy, similar companies, per-year revenue trends, ESG rank where published

#### 📥 Supported inputs

| Input | Example | What happens |
|---|---|---|
| Search terms (`queries`) | `software`, `logistics`, `Take-Two` | Searches the D&B business directory like the site's own search box, paginating automatically (~25 companies/page) |
| Search filters (`minEmployees`, `maxEmployees`, `companyRole`) | `101`–`500`, `parent` | Server-side filters on keyword searches — e.g. only Parent/HQ companies with 101–500 employees |
| Industry slugs (`industryPaths`) | `software_publishers`, `legal_services` | Browses D&B's industry directory — revenue-sorted, 50 companies/page, scoped by `country` → `region` → `city` |
| Region / city (`region`, `city`) | `california`, `san_francisco` | Narrows industry browsing geographically (D&B caps each industry+geo listing at ~1,000 companies — go city-level for deeper coverage) |
| Country (`country`) | `us`, `gb`, `de`, `fr`, `ca`, `au` | Scopes searches and browsing to one country; US has the richest coverage |
| dnb.com URLs (`startUrls`) | profile, industry-listing, or search URLs | Auto-classified: profile URLs fetch that company directly, `company-information.*` URLs are browsed, `company-search.html?term=` URLs run as extra queries |

Mix all of them in the same run; rows are de-duplicated by DUNS across every source.

#### ⚠️ Proxy requirement

Dun & Bradstreet blocks datacenter IPs. A **residential proxy is required** — the default input config already pins Apify `RESIDENTIAL` with `country: US`, which is the most reliable setup for full coverage.

#### 🔄 How it works

1. Each search term is sent to D&B's `companysearch` directory API, scoped to your country and any employee/role filters; each industry slug goes to the `companyinformation` listing API (revenue-sorted, 50/page), scoped by country/region/city.
2. Result pages are walked automatically and de-duplicated by DUNS across all sources.
3. With **deep profiles** enabled (default), each company's `companyprofile` API payload is fetched in parallel — adding revenue, employees, key principal, executives, ticker, industry taxonomy and website.
4. Subscription-gated fields that D&B masks are converted to clean `null`s — never placeholder garbage — while structured values that survive the masking (real employee counts, numeric revenue) are recovered.
5. Each merged company row is pushed to the dataset — one row per company.

No login, no captcha solving, no browser rendering.

#### ⚙️ Input parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `queries` | array | `["software"]` | Company names or keywords to search |
| `country` | string | `"us"` | ISO alpha-2 country code |
| `startUrls` | array | `[]` | Any dnb.com URLs — profile, industry-listing, or search (auto-classified) |
| `industryPaths` | array | `[]` | D&B industry slugs to browse (e.g. `software_publishers`) |
| `region` | string | — | State/region slug for industry browsing (e.g. `california`) |
| `city` | string | — | City slug for industry browsing (e.g. `san_francisco`) |
| `minEmployees` / `maxEmployees` | integer | — | Employee-count filter on keyword searches |
| `companyRole` | string | `"any"` | `parent` / `branch` / `subsidiary` / `domestic-ultimate` / `global-ultimate` |
| `scrapeCompanyProfiles` | boolean | `true` | Deep mode: fetch each company's full profile (one extra request per company) |
| `enrichEmails` | boolean | `false` | Opt-in: extract a contact email from each company's own website |
| `maxItemsPerQuery` | integer | `200` | Cap per search term |
| `maxItems` | integer | `1000` | Global cap across all queries + startUrls |
| `maxConcurrency` | integer | `10` | Parallel profile fetches |
| `proxy` | object | Apify `RESIDENTIAL`, `US` | Residential proxy required |

#### 📊 Output overview

One row per company. List mode (deep profiles off) carries the search-card fields: name, trade styles, DUNS, address/city/state/zip/country, industry, location type, profile URL. Deep mode (default) merges in the full profile: revenue (three representations), employee counts (consolidated + this site, with reliability flags), key principal, executives, website + domain, parent industry + full industry list + taxonomy path, stock exchange/ticker, Fortune-style ranking, company summary, corporate-linkage counts, similar companies, and legal-form flags.

#### 📦 Output sample

```json
{
    "type": "company",
    "source": "dnb",
    "duns": "2d66458a75c9d054a6e33addf02f1573",
    "companyName": "Take-Two Interactive Software, Inc.",
    "tradeStyleNames": "Take-Two",
    "profileUrl": "https://www.dnb.com/business-directory/company-profiles.take-two_interactive_software_inc.2d66458a75c9d054a6e33addf02f1573.html",
    "address": "110 W 44TH St",
    "city": "New York",
    "state": "New York",
    "zipCode": "10036-4011",
    "country": "United States",
    "countryRegion": "New York, NY, United States",
    "industry": "Computer Systems Design and Related Services",
    "parentIndustry": "Professional, Scientific, and Technical Services",
    "industries": [
        "Computer Systems Design and Related Services",
        "Software Publishers",
        "Electronics and Appliance Retailers",
        "Computer software development",
        "Home entertainment computer software"
    ],
    "locationType": "Parent",
    "website": "www.take2games.com",
    "companyDomain": "take2games.com",
    "keyPrincipal": "Strauss Zelnick",
    "formattedRevenue": "$6.66 billion",
    "revenueUsd": 6656400000,
    "employeesConsolidated": { "value": 12909, "reliability": "Actual", "scope": "Consolidated" },
    "employeesThisSite": { "value": 1152, "reliability": "Modelled", "scope": "Individual" },
    "stockTicker": "TTWO",
    "stockExchange": "NASDAQ:TTWO",
    "companySummary": "Take-Two Interactive Software, Inc. is a global developer, publisher, and marketer of interactive entertainment…",
    "executives": [
        { "name": "Strauss Zelnick", "position": "Executive Chairman of the Board and Chief Executive Officer" }
    ],
    "totalContactsOnFile": 671,
    "totalPrincipals": 4,
    "revenueReliability": "Actual",
    "annualRevenues": [
        { "year": "2026", "revenueUsd": 6656400000, "accuracy": "Actual" }
    ],
    "industryPath": [
        { "name": "Professional, Scientific, and Technical Services", "url": "https://www.dnb.com/business-directory/industry-analysis.professional_scientific_and_technical_services.html" }
    ],
    "ranking": { "value": 618, "description": "Fortune 1000 Revenue Rank" },
    "isPrivate": false,
    "scrapedAt": "2026-07-10T22:31:23.313Z"
}
````

#### 🗂 Key output fields

| Group | Fields |
|---|---|
| **Identifiers** | `type`, `source`, `duns` (D\&B's public encrypted DUNS hash), `companyName`, `tradeStyleNames`, `profileUrl`, `scrapedAt` |
| **Location** | `address`, `city`, `state`, `zipCode`, `country`, `countryRegion` |
| **Classification** | `industry`, `parentIndustry`, `industries[]`, `industryPath[]`, `locationType` (`Parent` / `Branch` / …) |
| **Financials** | `formattedRevenue`, `revenueUsd` (absolute USD), `revenueReliability` (`Actual` / `Modelled`), `annualRevenues[]` (per fiscal year with accuracy) |
| **People** | `keyPrincipal`, `executives[]` (name + title), `totalPrincipals`, `totalContactsOnFile` |
| **Size** | `employeesConsolidated.{value,reliability,scope}`, `employeesThisSite.{value,reliability,scope}` |
| **Market** | `stockExchange`, `stockTicker`, `ranking` (e.g. Fortune 1000 rank), `similarCompanies[]`, `esgRank` |
| **Web** | `website`, `companyDomain` |
| **Legal form** | `isPrivate`, `isPartnership`, `isProprietorship` |
| **Email enrichment** *(when `enrichEmails: true`)* | `contactEmail`, `contactWebsite`, `emailEnrichment` (detailed provenance object) |

#### ❓ FAQ

**Why does the actor need a residential proxy?**
dnb.com blocks datacenter and cloud IP ranges. A residential proxy (Apify `RESIDENTIAL` group, `country: US` recommended) is the reliable path — the default input config already pins this.

**Where does the data come from?**
From D\&B's own public directory API — the same `companysearch` and `companyprofile` JSON endpoints the dnb.com Business Directory site itself calls. No HTML scraping, no browser, no login.

**Why are some fields `null`?**
D\&B gates certain values behind its paid products (exact phone, incorporation year, some financial line items) and masks them in the public payload. The scraper converts masked values to clean `null`s instead of shipping placeholder garbage. Note that several commonly-gated fields — **employee counts and numeric revenue — are recovered** from structured parts of the payload that survive the masking, which most alternative scrapers miss.

**Is `duns` the raw 9-digit DUNS number?**
No — D\&B does not expose raw DUNS numbers publicly. The `duns` field is D\&B's public encrypted DUNS hash (32 hex chars), which is stable per company and works as a join key and in profile URLs.

**How many companies can one keyword return?**
Broad keywords match large sets (e.g. `software` in the US matches ~48,000 companies; `plumbing` ~163,000). Use `maxItemsPerQuery` / `maxItems` to cap billing, narrow with the employee/role filters, or use more specific terms.

**Where do I find industry slugs for `industryPaths`?**
In any dnb.com industry URL: `https://www.dnb.com/business-directory/company-information.software_publishers.us.html` → the slug is `software_publishers`. Industry listings are revenue-sorted (biggest companies first) and D\&B caps each industry+geo listing at ~1,000 companies — add `region` and `city` to reach deeper into a sector.

**Do the employee/role filters apply to industry browsing?**
No — they're `companysearch` API parameters, so they apply to keyword `queries` only. Industry listings come pre-sorted by revenue instead.

**How does email enrichment work and what does it cost?**
When `enrichEmails: true`, the actor takes each company's own website from its D\&B profile, visits its contact/about pages, and extracts a contact email. Best-effort: you're only billed per email actually found, never for misses.

**Can I scrape logged-in or subscriber data?**
No. The scraper accesses only the public business directory — no D\&B Hoovers content, no credit reports, no authenticated endpoints.

#### 💬 Support

- For issues or feature requests, please use the **Issues** tab on the actor's Apify Console page.
- Author's website: <https://muhamed-didovic.github.io/>
- Email: <muhamed.didovic@gmail.com>

#### 🛠 Additional services

- Custom output shape, additional fields, or one-off datasets: <muhamed.didovic@gmail.com>
- Need a similar scraper for other business directories (Crunchbase, GoodFirms, Clutch, IndiaMART, etc.)? Drop an email.
- For API access (no Apify fee, just a usage fee for the API): <muhamed.didovic@gmail.com>

#### 🔎 Explore more scrapers

If this Dun & Bradstreet Scraper was useful, see other scrapers and actors at [memo23's Apify profile](https://apify.com/memo23) — covering business directories, job boards, real estate, social media, and more.

***

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Dun & Bradstreet, Inc. or any of its subsidiaries or affiliates. "Dun & Bradstreet", "D\&B" and "D-U-N-S" are trademarks of Dun & Bradstreet, Inc. All trademarks mentioned are the property of their respective owners.

The scraper accesses only the publicly available dnb.com Business Directory and its public JSON endpoints — no D\&B Hoovers subscriber content, credit reports, authenticated endpoints, or content behind a D\&B login. Users are responsible for ensuring their use complies with dnb.com's Terms of Service, applicable data-protection law (GDPR, CCPA, etc.), and any contractual obligations of their own organisation.

***

### SEO Keywords

dun and bradstreet scraper, dnb scraper, dnb.com scraper, scrape dun & bradstreet, duns number lookup, dnb business directory scraper, company firmographics scraper, b2b lead generation scraper, company revenue data scraper, employee count data, key principal data, business directory api, company data extraction, dnb api, firmographic data, kyb data scraper, company intelligence scraper, sales prospecting data, tam analysis data, crm enrichment scraper, corporate hierarchy data, dnb company profiles, dun bradstreet company search, business credit data alternative

# Actor input Schema

## `queries` (type: `array`):

One or more company names or keywords to search the Dun & Bradstreet business directory (e.g. `software`, `logistics`, `Take-Two`). Each query paginates independently.

## `country` (type: `string`):

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.

## `startUrls` (type: `array`):

Paste any dnb.com business-directory URL: company-profile URLs (`…/company-profiles.{slug}.{hash}.html`) fetch that company's full profile directly; industry-listing URLs (`…/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.

## `industryPaths` (type: `array`):

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.

## `region` (type: `string`):

State or region slug to narrow industry browsing (e.g. `california`, `texas`, `new_york`). Leave empty for the whole country.

## `city` (type: `string`):

City slug to narrow industry browsing further (e.g. `san_francisco`, `los_angeles`). Use together with Region.

## `minEmployees` (type: `integer`):

Only companies with at least this many employees.

## `maxEmployees` (type: `integer`):

Only companies with at most this many employees.

## `companyRole` (type: `string`):

Only companies playing this role in their corporate family tree.

## `scrapeCompanyProfiles` (type: `boolean`):

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).

## `enrichEmails` (type: `boolean`):

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'.

## `qualifyByPayment` (type: `boolean`):

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.

## `maxItemsPerQuery` (type: `integer`):

Maximum number of companies to collect for each search term. Results are paginated automatically (~25 per page).

## `maxItems` (type: `integer`):

Hard cap on the total number of companies collected across all queries and start URLs. Use this cap to limit billing.

## `maxConcurrency` (type: `integer`):

Maximum number of profile API calls processed in parallel.

## `minConcurrency` (type: `integer`):

Minimum number of API calls processed in parallel.

## `maxRequestRetries` (type: `integer`):

Number of retries before a failed request is given up.

## `proxy` (type: `object`):

Dun & Bradstreet blocks datacenter IPs — a residential proxy is required. US residential is recommended for the most complete coverage.

## Actor input object example

```json
{
  "queries": [
    "software"
  ],
  "country": "us",
  "startUrls": [],
  "industryPaths": [],
  "companyRole": "any",
  "scrapeCompanyProfiles": true,
  "enrichEmails": false,
  "qualifyByPayment": false,
  "maxItemsPerQuery": 200,
  "maxItems": 1000,
  "maxConcurrency": 10,
  "minConcurrency": 1,
  "maxRequestRetries": 5,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "software"
    ],
    "startUrls": [],
    "industryPaths": [],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/dnb-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "queries": ["software"],
    "startUrls": [],
    "industryPaths": [],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/dnb-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "software"
  ],
  "startUrls": [],
  "industryPaths": [],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call memo23/dnb-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=memo23/dnb-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Dun & Bradstreet Scraper - Companies, DUNS, Revenue & Employees",
        "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": "pehNf6JhFOaGfQodh"
    },
    "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}.html`) fetch that company's full profile directly; industry-listing URLs (`…/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
                    },
                    "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": "Dun & Bradstreet blocks datacenter IPs — a residential proxy is required. US residential is recommended for the most complete coverage.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
