How to use API to quickly turn a list of websites into a list of leads?

Fabian Maume
3 min readFeb 18, 2022

I while ago I wrote a tutorial about how to enrich lead with Phantombuster. The process was to scrape the list of employees from Linkedin and then filter the list based on job titles, to have only leads, matching your ideal customer profile (ICP). This process works well but takes time as LinkedIn is limiting the speed at which you can scrape data.

I recently found a way to get similar results quickly by leveraging API. Apollo has a partial copy of LinkedIn data. So Apollo API allows you to find people matching your ICP within a few minutes.

However, Apollo will return you fewer results than scraping LinkedIn. Therefore I recommend you to follow the Phantombuster approach for all the companies where Apollo did not find data.

In this article, I will walk you through the setup to turn a list of websites into a list of leads.

Setup anaconda

I’m made a python script to easily query Apollo API. You will need to set up a Python environment in order to use this script. I personally recommend Anaconda & Spyder, so I will walk you through the setup for it.

Download and install Anaconda from here.

Then open Anaconda prompt as administrator:

Type the command “conda install -c conda-forge pandas” and click enter. Type yes and click enter. That will start installing the pandas package that I’m using in my script.

Download a copy of my script and open it with Spyder.

Enrich leads with Apollo

You will need to create an Apollo account. The basic plan offers enough API credit to run this workflow:

  • the basic plan allows you to make 300 API calls per day.
  • the pro plan allows you to make 1000 API calls per day.

You can choose the plan depending on how big is your database and how quickly you want to process it.

In your account go to this link in order to find your Apollo API key. Edit line 14 of the script with your API key.

Line 15 to 19 are the other parameter of the script:

  • Target_jobs is to list the job titles matching your ICP. You can list as many as you wish.
  • Lead_list is the access path of the excel file with the list of websites you wish to turn into leads.
  • Website_collum is the name of the column in which you have the websites’ URLs (pay attention that this is case sensitive).
  • out_path path where you want to save your list of leads.
  • out_path_not_found path where you wish to save the website without data to send to Phantombuster.

Once all parameters are set, place your curser line 9 and click on the button to run the current cell

Wait a few minutes and the list of leads should appear on the access path you set as a parameter.

Enrich remaining leads with Phantombuster

Now you can check the list of websites for which Apollo did not find leads. Place your cursor on line 204 and click on the button to run the current cell.

You should almost instantly get a new excel file with the least of leads you need to push to Phantombuster.

Check out my former article to know how to work with those leads.

PS: If you need some help with your lead generation do not hesitate to get in touch with my agency Tetriz.

If you like what I’m writing you can buy me a coffee: