How to Scrape a Startup's Investor Count

How to Scrape a Startup's Investor Count
Scraping

This article explains how to extract the number of a startup's investors using the Piloterr API to assess its attractiveness and compare its market position, providing a Python code example.

Why extract a startup's investor count?

Traction assessment: A high number of investors can indicate strong confidence and interest in the startup, which can be a sign of traction and growth.

Benchmarking: Comparing a startup's number of investors to those of its competitors can offer insights into its relative position in the market.

Assessing financial stability: A high number of investors may suggest greater financial stability, making the startup more attractive to customers, suppliers and other stakeholders.

Market trends: Analyzing investment trends can help identify emerging sectors and promising technologies.

In short, scraping this information can provide valuable data for various strategic and decision-making analyses.

How to retrieve the number of investors?

Easy, I'll take you through it step by step. Let's take the following example: my objective is to recover the number of Openai investors.

Create your account

  • Register on piloterr.com.
  • Create your subscription.
  • Create and copy your API key.

Case study

For our case study, let's take the example given above. This section will be divided into several themes:

  • Basic code: Very simple code that you can reproduce by copying and pasting our example.
  • Result obtained: Presentation of the result obtained by executing the code.
  • Code explanation: A general explanation of how the code works.
  • Possible improvements: Suggestions for improvements you can make yourself.

Python basic code

Don't forget to replace PILOTERR_API_KEY with your real API key. The script assumes that the Piloterr API responses are in a format specific to our API, so it may need to be adjusted depending on the provider you choose.

  • Copy the code
  • Create a new file get_the_number_of_investors.py
  • Replace the API token with your own
  • Replace variable COMPANY by your need
  • Run the script with python get_the_number_of_investors.py
import requests
import pandas as pd
import json

PILOTERR_API_KEY = #'YOUR-API-KEY-HERE'
COMPANY = 'openai'

def get_number_investors_from_crunchbase(query: str):
    crunchbase_company_info_api_url = "https://piloterr.com/api/v2/crunchbase/company/info"
    headers = {
        "x-api-key": PILOTERR_API_KEY
    }
    data = {
        "query": query
    }
    response = requests.get(
        url=crunchbase_company_info_api_url,
        headers=headers,
        params=data
    )
    
    if response.status_code == 200:
        return response.json()
    else:
        response.raise_for_status()

# Usage
try:
    data = get_number_investors_from_crunchbase(COMPANY)

    if data:
        name = data.get("name", "N/A")
        founded = data.get("founded", "N/A")
        num_investors = data.get("company_financials_highlights", {}).get("num_investors", "N/A")
        
        df = pd.DataFrame({
            "Name": [name],
            "Founded": [founded],
            "Num_Investors": [num_investors]
        })

        print(df)
    else:
        print("No data returned from API.")

except requests.exceptions.RequestException as e:
    print(f"An error occurred: {e}")

Results

After execution, we obtain a table with the name of the company, the number of investors and the founding date such as :

     Name     Founded  Num_Investors
0  OpenAI  2015-12-11             34

Code explanation

There is only one technique used in the code:

To understand the code in more detail:

Define constants:

  • PILOTERR_API_KEY : API key to access the Piloterr API.
  • COMPANY : Targeted company name.

Function get_number_investors_from_crunchbase() :

  • Execute request on Crunchbase company info API to piloterr.
  • Returns the result if the query is successful.

After the “usage” comment :

  • Find targeted data in JSON.
  • Create a table with data.

Possible improvements

  • Use our Crunchbase Funding Rounds API to enrich the information in more detail, here is the documentation
  • Store the result in a Google Sheet.
  • Search several companies at once
  • Add additional data to the table, e.g. number of financing rounds, total value of financing