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

# Company Name to Domain API

> Company websites power every B2B outreach campaign you run. Without verified domains, your lead lists sit there—useless. That's where Company URL Finder's Name to Domain API comes in.

export const ReadMore = ({link, children, className = ""}) => {
  return <Button href={link} target="_blank" variant="outline" size="md" color="primary" className={`${className}`}>
      <Icon icon="code" size={24} className="!mint-bg-emerald-600 mr-2" />
      {children}
    </Button>;
};

export const Button = ({variant = "fill", size = "md", color = "primary", href, target, children, className = "", style = {}}) => {
  const isLink = !!href;
  const variantClassname = {
    fill: "border-none mint-bg-[var(--color)] !mint-text-white hover:mint-bg-[var(--color-dark)]",
    outline: "border !mint-border-b border-solid mint-border-[var(--color)] !mint-text-[var(--color)] mint-bg-[var(--color-lightest)] hover:mint-bg-[var(--color-lighter)]",
    text: "border-none bg-transparent !mint-text-[var(--color)] hover:mint-bg-[var(--color-lighter)]"
  };
  const sizeClassname = {
    sm: "px-3 py-1 rounded-md text-sm",
    md: "px-6 py-2 rounded-lg text-base",
    lg: "px-8 py-2.5 rounded-xl text-lg"
  };
  const colors = {
    primary: "rgb(22 163 74)",
    info: "rgb(43 127 255)",
    warning: "rgb(254 154 0)",
    error: "rgb(251 44 54)"
  };
  const Comp = isLink ? "a" : "button";
  return <Comp href={isLink ? href : undefined} target={isLink ? target : undefined} className={`inline-block duration-150 transition-all font-medium ${variantClassname[variant]} ${sizeClassname[size]} ${className}`} style={{
    "--color": colors[color],
    "--color-lightest": `color-mix(in srgb, ${colors[color]}, white 90%)`,
    "--color-lighter": `color-mix(in srgb, ${colors[color]}, white 80%)`,
    "--color-light": `color-mix(in srgb, ${colors[color]}, white 10%)`,
    "--color-dark": `color-mix(in srgb, ${colors[color]}, black 10%)`,
    ...style
  }}>
      {children}
    </Comp>;
};

export const StatusCodes = ({showTitle = true, showDesc = false, className = ""}) => {
  const codes = [{
    type: "success",
    code: "200",
    desc: "indicates a successful response."
  }, {
    type: "error",
    code: "400",
    desc: "indicates a not enough credits."
  }, {
    type: "error",
    code: "401",
    desc: "indicates an invalid API key."
  }, {
    type: "error",
    code: "422",
    desc: "indicates an error in sending data."
  }, {
    type: "warning",
    code: "500",
    desc: "indicates a server error — you won't be seeing these"
  }];
  return <div className={`${className}`}>
      {showTitle && <h3>Status Codes</h3>}
      {showDesc && <p>
          Here is a list of the different categories of status codes returned by
          the Company URL Finder API. Use these to understand if a request was
          successful.
        </p>}
      <ul className="mt-6 grid gap-4 grid-cols-2 md:grid-cols-3">
        {codes.map(code => <li key={code} className={`align-middle rounded-xl font-medium p-3 ${code.type === "success" ? "bg-emerald-100 text-emerald-500" : code.type === "warning" ? "bg-amber-100 text-amber-500" : "bg-rose-100 text-rose-500"} `}>
            <Icon icon={code.type === "success" ? "circle-check" : code.type === "warning" ? "alert-circle" : "circle-x"} size={32} className={`${code.type === "success" ? "!mint-bg-emerald-600" : code.type === "warning" ? "!mint-bg-amber-600" : "!mint-bg-rose-600"}`} />
            <div>
              <p className="text-lg">{code.code}</p>
            </div>
            <div className="mt-4">
              <p className="text-sm text-zinc-700 capitalize">{code.desc}</p>
            </div>
          </li>)}
      </ul>
    </div>;
};

export const SDKsList = ({className = ""}) => {
  const sdks = [{
    href: "https://github.com/CUFinder/cufinder-ts",
    title: "Typescript",
    description: "The Official TypeScript SDK for CUFinder APIs",
    imgSrc: "/images/logos/typescript.svg"
  }, {
    href: "https://github.com/CUFinder/cufinder-py",
    title: "Python",
    description: "The Official Python SDK for CUFinder APIs",
    imgSrc: "/images/logos/python.svg"
  }, {
    href: "https://github.com/CUFinder/cufinder-go",
    title: "Go",
    description: "The Official Go SDK for CUFinder APIs",
    imgSrc: "/images/logos/go.svg"
  }, {
    href: "https://github.com/CUFinder/cufinder-rust",
    title: "Rust",
    description: "The Official Rust SDK for CUFinder APIs",
    imgSrc: "/images/logos/rust.svg",
    darkRevert: true
  }, {
    href: "https://github.com/CUFinder/cufinder-ruby",
    title: "Ruby",
    description: "The Official Ruby SDK for CUFinder APIs",
    imgSrc: "/images/logos/ruby.svg"
  }];
  return <div className={`divide-y divide-slate-200 divide-solid ${className}`}>
      <h2>CUFinder Official SDKs</h2>
      <ul className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-y-4">
        {sdks.map(sdk => <li key={sdk.title}>
            <a href={sdk.href} target="_blank" className="flex items-center gap-4">
              <img src={sdk.imgSrc} alt={sdk.title} noZoom width={100} height={100} className={`w-12 !my-0 ${sdk.darkRevert ? "dark:invert-100" : ""}`} />
              <div>
                <div>
                  <p className="text-sm text-gray-800 dark:text-gray-200">
                    {sdk.title}
                  </p>
                </div>
                <div>
                  <p className="text-xs text-gray-500 leading-[1.2rem]">
                    {sdk.description}
                  </p>
                </div>
              </div>
            </a>
          </li>)}
      </ul>
    </div>;
};

**Company URL Finder** consistently delivers 95%+ accuracy across our database of 85M+ verified company records.
This API transforms incomplete CRM records into actionable intelligence that your sales team actually uses. It integrates into any workflow—**CRM** automation, lead qualification pipelines, real-time lookup systems, webhook triggers.

<div className="mt-12">
  <div className="border rounded-xl p-2 border-gray-200 overflow-hidden">
    <div className="flex justify-between flex-wrap gap-4 items-center">
      <div className="flex items-center gap-2">
        <Badge color="blue" shape="rounded" size="lg" className="uppercase">post</Badge>
        <p className="!my-0 ml-2 text-base text-gray-800 dark:text-white font-medium break-all">[https://api.companyurlfinder.com/v2/services/name\_to\_domain](https://api.companyurlfinder.com/v2/services/name_to_domain)</p>
      </div>
    </div>
  </div>

  <Badge color="blue" size="lg" icon="star" className="mt-3">
    Credit usage is 1 per record found.
  </Badge>

  <div className="grid gap-4 grid-cols-12">
    <div className="col-span-12 lg:col-span-5">
      <div>
        ## Attributes

        <ParamField header="x-api-key" type="string" required>
          Your API key.
        </ParamField>

        <ParamField body="company_name" type="string" required>
          Company name
        </ParamField>

        <ParamField body="country_code" type="string" required>
          Country code

          <Note>
            Please note that when you set the country code, the results are limited to that country. For example, for the company name 'Nestlé' and the country 'Switzerland', we returned nestle.ch as a result.
          </Note>
        </ParamField>
      </div>
    </div>

    <div className="col-span-12 lg:col-span-7 pt-6">
      <CodeGroup dropdown>
        ```bash Request theme={null}
        curl --location 'https://api.companyurlfinder.com/v2/services/name_to_domain' \
        --header 'Content-Type: application/x-www-form-urlencoded' \
        --header 'x-api-key: your_api_key' \
        --data-urlencode 'company_name=cufinder' \
        --data-urlencode 'country_code=US'
        ```

        ```javascript Request theme={null}
        const myHeaders = new Headers();
        myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
        myHeaders.append("x-api-key", "your_api_key");

        const urlencoded = new URLSearchParams();
        urlencoded.append("company_name", "cufinder");
        urlencoded.append("country_code", "US");

        const requestOptions = {
            method: "POST",
            headers: myHeaders,
            body: urlencoded,
            redirect: "follow"
        };

        fetch("https://api.companyurlfinder.com/v2/services/name_to_domain", requestOptions)
            .then((response) => response.text())
            .then((result) => console.log(result))
            .catch((error) => console.error(error));
        ```

        ```python Request theme={null}
        import requests

        url = "https://api.companyurlfinder.com/v2/services/name_to_domain"

        payload = 'company_name=cufinder&country_code=US'
        headers = {
            'Content-Type': 'application/x-www-form-urlencoded',
            'x-api-key': 'your_api_key'
        }

        response = requests.request("POST", url, headers=headers, data=payload)

        print(response.text)
        ```

        ```php Request theme={null}
        $client = new Client();
        $headers = [
            'Content-Type' => 'application/x-www-form-urlencoded',
            'x-api-key' => 'your_api_key'
        ];
        $options = [
        'form_params' => [
            'company_name' => 'cufinder',
            'country_code' => 'US'
        ]];
        $request = new Request('POST', 'https://api.companyurlfinder.com/v2/services/name_to_domain', $headers);
        $res = $client->sendAsync($request, $options)->wait();
        echo $res->getBody();
        ```
      </CodeGroup>

      <CodeGroup>
        ```json Response theme={null}
        {
            "status": 1,
                "code": 1000,
                "errors": {},
                "data": {
                    "exists": true,
                    "domain": "cufinder.io",
                    "remaining_credits": 9999
                }
        }
        ```
      </CodeGroup>
    </div>
  </div>
</div>

<StatusCodes className="mt-20" />

<div className="mt-20">
  ## Company Name to Domain API in Javascript

  <CodeGroup>
    ```javascript Request theme={null}
    const myHeaders = new Headers();
    myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
    myHeaders.append("x-api-key", "your_api_key");

    const urlencoded = new URLSearchParams();
    urlencoded.append("company_name", "cufinder");
    urlencoded.append("country_code", "US");

    const requestOptions = {
        method: "POST",
        headers: myHeaders,
        body: urlencoded,
        redirect: "follow"
    };

    fetch("https://api.companyurlfinder.com/v2/services/name_to_domain", requestOptions)
        .then((response) => response.text())
        .then((result) => console.log(result))
        .catch((error) => console.error(error));
    ```
  </CodeGroup>
</div>

<div className="mt-12">
  ## Company Name to Domain API in Python

  <CodeGroup>
    ```python Request theme={null}
    import requests

    url = "https://api.companyurlfinder.com/v2/services/name_to_domain"

    payload = 'company_name=cufinder&country_code=US'
    headers = {
        'Content-Type': 'application/x-www-form-urlencoded',
        'x-api-key': 'your_api_key'
    }

    response = requests.request("POST", url, headers=headers, data=payload)

    print(response.text)
    ```
  </CodeGroup>
</div>

<div className="mt-12">
  ## Company Name to Domain API in PHP

  <CodeGroup>
    ```php Request theme={null}
    $client = new Client();
    $headers = [
        'Content-Type' => 'application/x-www-form-urlencoded',
        'x-api-key' => 'your_api_key'
    ];
    $options = [
    'form_params' => [
        'company_name' => 'cufinder',
        'country_code' => 'US'
    ]];
    $request = new Request('POST', 'https://api.companyurlfinder.com/v2/services/name_to_domain', $headers);
    $res = $client->sendAsync($request, $options)->wait();
    echo $res->getBody();
    ```
  </CodeGroup>
</div>

<div className="mt-12">
  ## Company Name to Domain API in Go

  <CodeGroup>
    ```go Request theme={null}
    package main

    import (
        "fmt"
        "strings"
        "net/http"
        "io"
    )

    func main() {

        url := "https://api.companyurlfinder.com/v2/services/name_to_domain"
        method := "POST"

        payload := strings.NewReader("company_name=cufinder&country_code=US")

        client := &http.Client {
        }
        req, err := http.NewRequest(method, url, payload)

        if err != nil {
        fmt.Println(err)
        return
        }
        req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
        req.Header.Add("x-api-key", "your_api_key")

        res, err := client.Do(req)
        if err != nil {
        fmt.Println(err)
        return
        }
        defer res.Body.Close()

        body, err := io.ReadAll(res.Body)
        if err != nil {
        fmt.Println(err)
        return
        }
        fmt.Println(string(body))
    }
    ```
  </CodeGroup>
</div>

<div className="mt-12">
  ## Company Name to Domain API in Ruby

  <CodeGroup>
    ```ruby Request theme={null}
    require "uri"
    require "net/http"

    url = URI("https://api.companyurlfinder.com/v2/services/name_to_domain")

    https = Net::HTTP.new(url.host, url.port)
    https.use_ssl = true

    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = "application/x-www-form-urlencoded"
    request["x-api-key"] = "your_api_key"
    request.body = "company_name=cufinder&country_code=US"

    response = https.request(request)
    puts response.read_body
    ```
  </CodeGroup>
</div>

<div className="mt-12">
  ## Company Name to Domain API in Kotlin

  <CodeGroup>
    ```kotlin Request theme={null}
    val client = OkHttpClient()
    val mediaType = "application/x-www-form-urlencoded".toMediaType()
    val body = "company_name=cufinder&country_code=US".toRequestBody(mediaType)
    val request = Request.Builder()
        .url("https://api.companyurlfinder.com/v2/services/name_to_domain")
        .post(body)
        .addHeader("Content-Type", "application/x-www-form-urlencoded")
        .addHeader("x-api-key", "your_api_key")
        .build()
    val response = client.newCall(request).execute()
    ```
  </CodeGroup>
</div>

<div className="mt-12">
  ## Company Name to Domain API in Java

  <CodeGroup>
    ```java Request theme={null}
    OkHttpClient client = new OkHttpClient().newBuilder().build();
    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
    RequestBody body = RequestBody.create(mediaType, "company_name=cufinder&country_code=US");
    Request request = new Request.Builder()
        .url("https://api.companyurlfinder.com/v2/services/name_to_domain")
        .method("POST", body)
        .addHeader("Content-Type", "application/x-www-form-urlencoded")
        .addHeader("x-api-key", "your_api_key")
        .build();
    Response response = client.newCall(request).execute();
    ```
  </CodeGroup>
</div>
