Back to Blog

[.green-span]How to automate D-U-N-S number lookups through an API[.green-span]

BY
September 20, 2026
Automating D-U-N-S number lookups through an API removes a manual bottleneck in underwriting and verification. This guide compares a direct Dun & Bradstreet integration with an orchestration layer like Lendflow Connect, and walks through setup step by step.
Strategy
Technology
Marketing

The best way to automate D-U-N-S number lookups depends on your scale and use case. If you need raw business data, a direct Dun & Bradstreet Direct+ or Direct 2.0 API integration returns organization details when you pass a DUNS number. If you are automating underwriting or verification across many providers, an orchestration layer like Lendflow Connect unifies DUNS lookups with KYB, credit, and other business data behind a single API. Lendflow reports $1.5B+ funded in offers on its platform and an average of 42% faster speed to funding. This guide explains what a DUNS lookup is, why manual lookups break at scale, the main API options, and how to set up an automated integration step by step.

What a D-U-N-S number lookup is and why manual lookups fail at scale

A D-U-N-S number is a nine-digit business identifier issued and maintained by Dun & Bradstreet. It anchors D&B's business decisioning data and analytics, which makes it a reliable key for matching and enriching business records. Lenders and banks use DUNS lookups to streamline underwriting, KYC/KYB, and risk assessment.

Manual lookups do not scale. Copying a business name into a portal, resolving the right match by hand, and pasting results into a CRM works for a handful of records. It falls apart across thousands of applications, where speed to funding and consistent data quality decide outcomes. Automating the lookup through an API removes that bottleneck and feeds clean, structured data straight into your decisioning workflow.

The main API options

You have three practical paths to automate DUNS lookups.

D&B Direct+ API. Direct+ integrates the Dun & Bradstreet Data Cloud into your stack for credit-to-cash processes. Its Search surface finds businesses, principals, and entities by name, address, or registration number, and its Match/Lookup surface returns organization details when a DUNS is passed. As the D&B documentation notes, if a D-U-N-S Number is passed on the request, the feature performs a direct match and returns details about the organization.

D&B Direct 2.0 (Data Exchange). Direct 2.0 is a REST, GET, JSON service that requires a valid DUNS number and supports optional page and page_size pagination. This is the option to choose when you want raw D&B records and are willing to manage authentication, entitlement, and response handling yourself.

Business verification / KYB APIs. KYB providers access official business registration data for compliance, and some verify registry data, confirm ultimate beneficial owners, screen officers, and run entity-level AML checks. These complement DUNS data rather than replace it.

Orchestration / aggregation platforms. An orchestration layer abstracts multiple business-data connections behind one API. Lendflow Connect links brands to a network of 75+ lenders and integration partners through a single integration, so you can embed DUNS and other business-data lookups into a workflow without maintaining a raw D&B integration. Connect is SOC 2 Type II compliant.

Where Lendflow fits

Lendflow fits when the lookup is one step in a larger automated pipeline, not the whole job. Lendflow Connect supplies the unified data entry point. Lendflow Intelligence turns that business and credit data into decisions, sitting between Connect for data and Automate for execution. Lendflow Automate then runs the work: its Industry Map Agent handles automatic NAICS/SIC classification, and its Doc Analyzer extracts structured data, which pairs naturally with DUNS enrichment. Lendflow reports that its embedded finance customers operate with 80% smaller teams while converting similar funding volumes.

Steps to set up an automated DUNS lookup via API

Use this practical walkthrough to stand up a reliable integration.

  1. Choose the API or approach. Pick a direct D&B integration for raw records, a KYB API for compliance data, or an orchestration layer when the lookup feeds a broader underwriting workflow.
  2. Get credentials and entitlement. Request API access and confirm your entitlement. Entitlement matters because some data layers are only available for US-domiciled businesses, and entitlement differs for US and Canada versus UK, Ireland, Belgium, Netherlands, and Luxembourg markets.
  3. Authenticate every request. D&B Direct 2.0 requires an Authorization token, an Accept: application/json header, and an ApplicationTransactionID header set to your customer ID.
  4. Build the request. Direct 2.0 uses REST GET with a required DUNS parameter, a string of up to 15 characters, plus optional page and page_size for pagination. GET https://direct.dnb.com/dataexchange/iridium/dnb/triggers/by-duns/804735132?page=1&page_size=50 Authorization: <token> Accept: application/json ApplicationTransactionID: <your-customer-id>
  5. Handle the JSON response and response codes. The DUNS is returned as a nine-digit zero-padded numeric value. Check the response code before you trust the payload. CM000 signals success, while CM004 and SC001 through SC009 indicate errors; an HTTP 404 means no matches were found and a 500 means the request was unsuccessful.
  6. Add retry and throttling logic. Requests are metered, and a concurrency limit measured in queries per second is monitored; exceeding it triggers throttling that returns an error. Queue requests, respect your QPS ceiling, and retry 500 responses with backoff rather than hammering the endpoint.
  7. Integrate into your workflow. Map the response into your underwriting or enrichment pipeline. This is where an orchestration layer earns its keep: Lendflow Connect gives you one endpoint and one integration instead of separate connections to maintain, and downstream agents can classify and enrich the record automatically.

Best practices and common pitfalls

Avoid duplicate billing. D&B Direct 2.0 has a built-in feature that prevents duplicate billing when multiple successful requests with the same DUNS are submitted on the same calendar day in EST. Still, dedupe identical same-day requests in your own code so you never rely on the vendor safeguard alone.

Mind geographic and entitlement limits. Confirm coverage before you launch, because some data layers are only available for US-domiciled businesses. Fail gracefully for markets outside your entitlement.

Plan around sandbox limitations. Some operations are currently unavailable in the D&B Direct sandbox environment. Test what you can in sandbox, then validate the remaining paths carefully in production with a small, controlled batch.

Cache and enrich. Store resolved DUNS records so repeat lookups pull from your cache instead of billing another API call. Enrich once, reuse often.

Combine DUNS with other signals. A DUNS record identifies and matches a business, but it is stronger paired with KYB, fraud, and credit data. An orchestration approach lets you run those signals together, and Lendflow Intelligence turns the combined data into consistent decisions.

Conclusion

The best way to automate DUNS lookups comes down to scale and use case. A direct D&B Direct+ or Direct 2.0 integration is the right call when you need raw records and can manage authentication, entitlement, metering, and response handling yourself. An orchestration layer like Lendflow Connect is the better fit when the lookup is one step in an automated underwriting or verification workflow, because it unifies DUNS, KYB, and credit data behind a single API. Either way, the fundamentals hold: authenticate every request, handle response codes, respect metering and QPS limits, and cache results. Do that, and you turn a manual bottleneck into clean data that moves decisions from days to minutes.

Frequently asked questions

What parameters are required for a D&B Direct 2.0 DUNS lookup?
A valid DUNS number is required as a string of up to 15 characters, with optional page and page_size parameters for pagination.

Which headers do I need to authenticate?
D&B Direct 2.0 requires an Authorization token, an Accept: application/json header, and an ApplicationTransactionID header set to your customer ID.

How do I know if a lookup succeeded or failed?
CM000 indicates success, while CM004 and SC001 through SC009 indicate errors; an HTTP 404 means no matches were found and a 500 means the request was unsuccessful.

How does billing and metering work?
Requests are metered and a queries-per-second concurrency limit is monitored, with throttling returning an error; a built-in feature prevents duplicate billing for multiple successful same-DUNS requests on the same calendar day in EST.

Is coverage global, and is everything testable in sandbox?
No. Some data layers are only available for US-domiciled businesses, entitlement differs across US/Canada and UK/Ireland/Belgium/Netherlands/Luxembourg markets, and some operations are currently unavailable in the D&B Direct sandbox.

Learn More