Finding similar customers

Finding similar customers

September 18, 2015

An effective way of sourcing new leads for your business is by looking for companies that are similar to your existing customers. Similar both in terms of size, but also market--essentially going after your customer's competitors.

Clearbit's Discovery API can help you find these leads programatically using our clustering algorithms to search for similar companies. Our most successful outbound campaign to date has been powered by a similar lead list.

For example, to display companies similar to Salesforce (i.e. alternate CRMs):

curl '' \
  -G --data-urlencode '' \
  -u {key}:

    "total": 7,
    "results": [
        "domain": ""
        "domain": ""
        "domain": ""
    "page": 0

Let's say you have a list of your existing customer's domains--perhaps extracted from their email addresses. Let's iterate over this list and search Clearbit for similar companies. Here we're using Ruby but we also support Python, Node or plain REST.

# similar_companies.rb

require 'clearbit'

# Read CSV list in
rows = CSV.parse(

rows.each do |row|
  domain = row[0]

  # Find similar companies by domain
  similar_companies =
    query: {similar: domain}

  # Output the results
  similar_companies.each do |company|
    puts CSV.generate_line([domain, company.domain])

Then to run simply pipe your list of domains through the script, directing the output to another CSV.

cat domains.csv | ruby similar_companies.rb > similar_domains.csv

That's all there is to it! You now have a look-alike list of companies similar to your customers who are all excellent sales targets. Our trial Discovery plan lets you pull 200 companies for free - you can sign up here.

Revving up your speed to lead

Salesby Janet Choi on November 23, 2022

Mastering speed to lead for B2B starts with a well-designed system. Learn why speed closes leads, what's getting in your way, and how to rev up the buying experience.

How to automate lead routing to improve speed to lead

Salesby Janet Choi on November 03, 2022

Automating your lead routing system can reduce your response time by cutting out manual research and matching leads to the right sales rep.

Join our newsletter

Engaging stories and exclusive data, designed for our best customers. One useful issue each month.