> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leadx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Dun & Bradstreet details

> Fetch Dun & Bradstreet (D&B) company and contact details.

You can search by any combination of the following fields, but at least one field is required:
- `url`
- `company_name`
- `address`
- `dnb_link`
- `encrypted_duns`
- `duns_number`
- `industry` / `industries`
- `city`, `state`, `zip_code`, `country`
- contact fields
- revenue, employee, and record-count filters

The response includes a `records` array of matching D&B records. The `total_records` field specifies the number of matches returned.



## OpenAPI

````yaml post /v1/dnb
openapi: 3.1.0
info:
  title: LeadX API
  version: 0.1.0
servers: []
security: []
tags:
  - name: All Attributes
    description: Aggregate and correlate data about companies and their associated records.
  - name: Better Business Bureau
    description: >-
      Retrieve Better Business Bureau (BBB) ratings and accreditation status for
      businesses.
  - name: Companies
    description: Enrich company data by URL, name, address, or phone.
  - name: Contacts
    description: Enrich data about contacts.
  - name: email
    description: Validate company email addresses.
  - name: Google Reviews
    description: Retrieve Google Reviews and ratings for businesses.
  - name: Mobile Number
    description: Enrich mobile phone numbers.
  - name: UCC
    description: Search across to the U.S. Uniform Commercial Code (UCC) lien filings.
paths:
  /v1/dnb:
    post:
      tags:
        - Dun & Bradstreet
      summary: Fetch Dun & Bradstreet details
      description: >-
        Fetch Dun & Bradstreet (D&B) company and contact details.


        You can search by any combination of the following fields, but at least
        one field is required:

        - `url`

        - `company_name`

        - `address`

        - `dnb_link`

        - `encrypted_duns`

        - `duns_number`

        - `industry` / `industries`

        - `city`, `state`, `zip_code`, `country`

        - contact fields

        - revenue, employee, and record-count filters


        The response includes a `records` array of matching D&B records. The
        `total_records` field specifies the number of matches returned.
      operationId: fetch_dnb_v1_dnb_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DnbRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                success: true
                records:
                  - record_id: abc123
                    company_name: Acme Inc
                    dnb_link: dnb.com/business-directory/company-profiles.acme_inc.html
                    duns_number: '123456789'
                    encrypted_duns: encrypted-id
                    base_url: example.com
                    website_url: example.com
                    industry: Manufacturing
                    industries:
                      - Manufacturing
                    address: 123 Main St
                    city: Springfield
                    state: IL
                    zip_code: '62701'
                    country: United States
                    annual_revenue: 2500000
                    contact_name: Jane Smith
                    contact_title: President
                total_records: 1
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    DnbRequest:
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Company URL (may include or omit the http/https prefix)
          example: https://www.example.com
        company_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Name
          description: Company name
          example: Acme Inc
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
          description: Company address
          example: 123 Main St, Springfield, IL 62701
        dnb_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Dnb Link
          description: Direct D&B profile link
          example: >-
            https://www.dnb.com/business-directory/company-profiles.acme_inc.html
        encrypted_duns:
          anyOf:
            - type: string
            - type: 'null'
          title: Encrypted Duns
          description: Encrypted D-U-N-S identifier
          example: abc123
        duns_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Duns Number
          description: D-U-N-S number
          example: '123456789'
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
          description: Primary industry
          example: Manufacturing
        industries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Industries
          description: List of industries to match
          example:
            - Manufacturing
            - Industrial Equipment
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: City
          example: Springfield
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: State or province
          example: IL
        zip_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip Code
          description: ZIP or postal code
          example: '62701'
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Country
          example: United States
        contact_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Name
          description: Contact name
          example: Jane Smith
        contact_first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact First Name
          description: Contact first name
          example: Jane
        contact_last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Last Name
          description: Contact last name
          example: Smith
        contact_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Title
          description: Contact title
          example: President
        contact_suffix:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Suffix
          description: Contact suffix
          example: Jr
        location_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Location Type
          description: Location type
          example: Headquarters
        private_company:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Private Company
          description: If true, only return private companies
          example: true
        address_unverified:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Address Unverified
          description: If true, only return records with unverified addresses
          example: false
        annual_revenue:
          anyOf:
            - type: string
            - type: 'null'
          title: Annual Revenue
          description: >-
            Annual revenue filter. Supports exact values or >, >=, <, <=
            comparisons.
          example: '>1000000'
        annual_revenue_year:
          anyOf:
            - type: string
            - type: 'null'
          title: Annual Revenue Year
          description: >-
            Annual revenue year filter. Supports exact values or >, >=, <, <=
            comparisons.
          example: '>=2024'
        number_of_employees_this_site:
          anyOf:
            - type: string
            - type: 'null'
          title: Number Of Employees This Site
          description: >-
            This-site employee count filter. Supports exact values or >, >=, <,
            <= comparisons.
          example: '>50'
        number_of_employees_consolidated:
          anyOf:
            - type: string
            - type: 'null'
          title: Number Of Employees Consolidated
          description: >-
            Consolidated employee count filter. Supports exact values or >, >=,
            <, <= comparisons.
          example: '>250'
        total_contacts:
          anyOf:
            - type: string
            - type: 'null'
          title: Total Contacts
          description: >-
            Total contacts filter. Supports exact values or >, >=, <, <=
            comparisons.
          example: '>0'
        total_principals:
          anyOf:
            - type: string
            - type: 'null'
          title: Total Principals
          description: >-
            Total principals filter. Supports exact values or >, >=, <, <=
            comparisons.
          example: '>0'
      type: object
      title: DnbRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer

````