Finding similar customers

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.