# Dun & Bradstreet Company Scraper (`parseforge/dnb-scraper`) Actor

Extract company data from Dun & Bradstreet's directory of 500M+ businesses. Get company names, industries, locations, revenue, employee counts, DUNS numbers, and competitors — searchable by keyword, country, company size, and role.

- **URL**: https://apify.com/parseforge/dnb-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Lead generation, Other, Automation
- **Stats:** 37 total users, 6 monthly users, 93.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🏢 Dun & Bradstreet Company Scraper

> 🚀 **Pull company data from Dun & Bradstreet's 500M+ business directory in minutes.** Industries, locations, revenue, employee counts, DUNS numbers, competitors. No API key, no manual CSV wrangling.

<table><tr>
<td style="border-left:4px solid #0F766E;padding:12px 16px;font-weight:600">Pull structured records from Dun and Bradstreet Company — clean fields ready as CSV, JSON, JSONL, Excel, or XML for downstream pipelines.</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
parseforge/dnb-scraper on Apify. Call: ApifyClient("TOKEN").actor("parseforge/dnb-scraper").call(run_input={...}), then client.dataset(run["defaultDatasetId"]).list_items().items for results. Key inputs: searchQuery (string, default "Apple"), maxItems (integer, default 10), startUrls (array), countryCode (string), companyRole (string, default "all"), minEmployees (integer). Full actor spec: fetch build via GET https://api.apify.com/v2/acts/parseforge~dnb-scraper (Bearer TOKEN). Get token: https://console.apify.com/account/integrations
```

Pull live company records from the Dun & Bradstreet (D\&B) public business directory, the world's largest commercial database with over 500 million entities. The actor walks D\&B search results with your filter combination, paginates through pages, and returns one structured record per company ready for sales prospecting, supply-chain due diligence, B2B enrichment, or competitive market mapping.

Every run fetches data live so you get the current state of D\&B at run time. Records include the company name, trade style, DUNS number, industry classification, company type and role (parent / branch / subsidiary), revenue, employee count, year founded, key principal name and title, phone, full address, website, list of industries, list of competitors, and a back-reference URL.

| 👥 Built for | 🎯 Primary use cases |
|---|---|
| Sales and BDR teams | Build prospect lists by industry and country |
| RevOps and CRM enrichment | Add DUNS and revenue to existing accounts |
| Supply chain and procurement | Vendor diligence and competitor mapping |
| Investment research | Map private companies in target markets |
| Compliance and KYC | Validate counterparty data with DUNS-keyed records |
| Researchers | Study industry composition and concentration |

### 📋 What the D\&B Scraper does

- 🔍 **Keyword search.** Pass a company name or industry keyword (e.g. pharma, `Goldman Sachs`).
- 🌍 **Country filter.** Restrict results by ISO Alpha-2 country code (US, DE, GB, etc.).
- 🏗️ **Hierarchy role.** Filter by parent, branch, subsidiary, or all.
- 👥 **Employee size.** Filter by min and max employee count.
- 🆔 **DUNS number.** Every record includes the unique D\&B identifier.
- 🔗 **Direct profile lookup.** Pass D\&B profile URLs in startUrls for direct enrichment of known companies.

The scraper accepts a search query plus filters, builds the matching D\&B URL, walks the result pages, and pushes structured records to the dataset. Enable includeDetails to fetch each company's detail page for revenue, employees, year founded, industries list, and top competitors.

> 💡 **Why it matters:** D\&B is the canonical source for company DUNS records but the public directory is paginated, JS-rendered, and filter-locked. A live, structured pull beats manual sourcing for B2B prospecting, KYC, and supply-chain mapping at scale.

> ⚠️ **Good to Know:** when startUrls is set, every other filter is ignored. Use it for ad-hoc enrichment from specific D\&B URLs.

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the D\&B Company Scraper page on the Apify Store.
3. 🎯 **Set filters.** Set a search query and pick country, role, and employee filters, then set maxItems.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

### 🔗 Recommended Actors

- [**🏢 Crunchbase Scraper**](https://apify.com/parseforge/crunchbase-scraper) - Startup company data with funding rounds and investors
- [**📋 SEC EDGAR Full-Text Search Scraper**](https://apify.com/parseforge/sec-edgar-full-text-search-scraper) - U.S. SEC filings full-text search
- [**📈 PitchBook Companies Scraper**](https://apify.com/parseforge/pitchbook-companies-scraper) - Private company data with investors and funding
- [**🇺🇸 FINRA BrokerCheck Scraper**](https://apify.com/parseforge/finra-brokercheck-scraper) - U.S. broker and firm regulatory records
- [**📋 Brazil CNPJ Scraper**](https://apify.com/parseforge/brazil-cnpj-scraper) - Brazilian company registry records

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

> ⚠️ **Disclaimer.** This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Dun & Bradstreet or any of its subsidiaries. All trademarks mentioned are the property of their respective owners. The scraper accesses only publicly available pages and is intended for legitimate research, analytics, and lead-generation use. Users are responsible for compliance with the source site's Terms of Service and applicable law.

### 🆘 Need Help?

If you hit a bug, have questions about setup, or need a scraper we haven't built yet, open our [contact form](https://tally.so/r/BzdKgA) or write to parseforge@protonmail.com. We also take on paid custom data projects.

For faster answers, join our [Discord](https://parseforge.co/discord). It's the best place to get support and suggest new actors.

# Actor input Schema

## `searchQuery` (type: `string`):

Company name or keyword to search for (e.g. "Apple", "Goldman Sachs", "pharma").

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

How many companies to collect per run.

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

D\&B search URLs (overrides Search Query) or D\&B company profile URLs for direct lookup (e.g. https://www.dnb.com/business-directory/company-profiles.tesla\_inc.e337e93c824d992066152d1a14d8d8e8.html).

## `countryCode` (type: `string`):

Filter results by country (ISO Alpha-2 code, e.g. US, DE, GB, CA).

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

Filter by company hierarchy role.

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

Filter companies with at least this many employees.

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

Filter companies with at most this many employees.

## `includeDetails` (type: `boolean`):

Fetch additional data for each company: revenue, employees, website, year founded, industries list, competitors. Slower but richer output.

## `proxyConfiguration` (type: `object`):

Proxy settings for accessing the site.

## Actor input object example

```json
{
  "searchQuery": "Apple",
  "maxItems": 10,
  "companyRole": "all",
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Extracted company records.

# 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 = {
    "searchQuery": "Apple",
    "maxItems": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/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 = {
    "searchQuery": "Apple",
    "maxItems": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/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 '{
  "searchQuery": "Apple",
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call parseforge/dnb-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/wfMeyHliv78nHTCJO/builds/IuPMYjSDMg3F3QOzd/openapi.json
