Print

Import Crunchbase Data to Google Sheets

In this guide, we’ll walk through how to pull company data from the Crunchbase API directly into Google Sheets, using the API Connector add-on for Sheets.

Note that to access the Crunchbase API, you must have a Crunchbase Enterprise License (pricing). This article assumes that you already have your license and have been granted an API key.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Create a Crunchbase API Request URL with Swagger

The Crunchbase API has a rather complex method of querying data through cards and fields. Therefore, let's first approach the Crunchbase API through their Swagger page, as it assists with constructing request URLs.

  1. First, authorize yourself by entering your API key:
    crunchbase-img4
  2. Next, click Try it out next to any API request you're interested in. Let's try the Crunchbase Entity Lookup API.
    crunchbase-img5
  3. For our first request, let's get information about Uber's founders. Enter "uber" into the entity_id field, and "founders" into the card_ids field. Click Execute.
    crunchbase-img6
  4. Underneath you'll see the raw API response in JSON format, as well as the Curl representation of your API request. Curl is a command-line tool for interacting with APIs.
    crunchbase-img7
  5. Pay attention to these values, as we'll copy them directly into API Connector. We now have our first request URL:
https://api.crunchbase.com/api/v4/entities/organizations/uber?card_ids=founders

Part 2: Pull Data from the Crunchbase Entity Lookup API

Let's now look at how to enter those values into API Connector. Where it says your_api_key in the Headers section, enter your own API key.

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • ApplicationCustom
    • MethodGET
    • Request URLhttps://api.crunchbase.com/api/v4/entities/organizations/uber?card_ids=founders
    • Headers:
      • X-cb-user-keyyour_api_key
      • accept: application/json
  3. Create a new tab and click Set current to use that tab as your data destination.
  4. Name your request and click Run. A moment later you’ll see details about Uber's founders populate your sheet.
    crunchbase-response-entities

For our next request, let's use the Crunchbase Search API. The Search API requires constructing a request body containing all the filters and conditions of your request. Let's start with one of their examples. Again you'll need to enter your own API key in the header section where it says your_api_key.

  1. As before, click Try it out. We'll try their request to search for companies in Europe with funding total between 25m and 100m USD.
    crunchbase-img8
  2. Click Execute
    crunchbase-img9
  3. You'll now see a Curl representation of your request, which we will use to build our request in API Connector:
    crunchbase-img10
  4. Now paste this request body into an unescape tool to remove all the backslashes, and enter the request into API Connector as follows:
    • Application: Custom
    • Method: POST
    • Request URL: https://api.crunchbase.com/api/v4/searches/organizations
    • Headers:
      • X-cb-user-key: your_api_key
      • Accept: application/json
      • Content-type: application/json
    • Request body: {"field_ids":["identifier","categories","location_identifiers","short_description","rank_org"],"order":[{"field_id":"rank_org","sort":"asc"}],"query":[{"type":"predicate","field_id":"funding_total","operator_id":"between","values":[{"value":25000000,"currency":"usd"},{"value":100000000,"currency":"usd"}]},{"type":"predicate","field_id":"location_identifiers","operator_id":"includes","values":["6106f5dc-823e-5da8-40d7-51612c0b2c4e"]},{"type":"predicate","field_id":"facet_ids","operator_id":"includes","values":["company"]}],"limit":50}
  5. Click Run to see the API response in your spreadsheet.
    crunchbase-response-search

This article gives additional examples of how to use the Crunchbase Search API: https://data.crunchbase.com/docs/examples-search-api

Part 4: Handle Pagination

Note Crunchbase's limits on the number of records returned on a response. By default, there is a maximum of 1000 records returned, unless you include the after_id key in your request body as described in their documentation.
crunchbase-img12

In API Connector you can loop through these pages automatically with pagination handling (paid feature), like this:

  • Pagination type: cursor body
  • Next token parameter: after_id
  • Next token path: entities.uuid
  • Run until: choose when to stop fetching data
    crunchbase-pagination

Part 5: API Documentation

Official API documentation: https://data.crunchbase.com/docs/using-the-api

Leave a Comment

Jump To