Search API Connector Documentation

Print

Import OpenSea Data to Google Sheets

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

Contents

Before You Begin

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

Part 1: Get an OpenSea API Key

The OpenSea API is open and public for limited use, so you don’t need a key if you’re just testing it out.

However, if you plan to use the API in any substantial capacity, I recommend getting your own API key so you don’t get rate-limited.

To get an OpenSea API key, fill out the request form here: https://docs.opensea.io/reference/request-an-api-key. You’ll need to have some ETH in your wallet.

Part 2: Pull Data from OpenSea to Sheets

The easiest way to get started with the OpenSea API is through API Connector’s built-in integration.

  1. Select OpenSea from the drop-down list of applications
    opensea-application
  2. If you have an API key, enter it into the Authorization section
    opensea-authorization
  3. Choose an endpoint. We’ll start with the /collections endpoint, which produces a list of recent collections.
    opensea-collections
  4. Select a destination sheet, name your request, and click Run.
    opensea-response

Part 3: Create a Custom API Request

Alternatively, you can create a custom request instead of using API Connector’s built-in integration, using any of the endpoints and parameters shown in the API documentation. To create a custom request, add the complete URL into the request URL field. If you have an API key, enter a second header where Key = X-API-KEY, and Value = your_api_key.
opensea-results1
To easily convert your preset request to a custom request, click Output Options > More Options > Add Request URL. This will print your URL into your sheet where you can copy and paste it into a custom request.

Part 4: Handle Pagination

OpenSea will generally limit the number of records returned at once, unless you loop through using the parameters shown in their documentation. The specific parameters depend on the endpoint:

Assets and events endpoints

Assets and event endpoints return just 20 records unless you use the “limit” and “cursor” parameters.
opensea-pagination

In API Connector, you can loop through these automatically using pagination handling, like this:

  • Next token parameter: cursor
  • Next token path: next
  • Run until: choose when to stop fetching data
    opensea-pagination-cursor

Collections & bundles endpoints

Collections and bundles endpoints use offset-limit parameters.
opensea-pagination-collections

This would be automated like this:

  • Pagination type: offset-limit
  • Offset parameter: offset
  • Limit parameter: limit
  • Limit value: 300
  • Run until: choose when to stop fetching data
    opensea-pagination-offsetlimit

Part 5: API Documentation

Official API documentation: https://docs.opensea.io/reference/api-overview

Previous Import OMDb / IMDb Data to Google Sheets
Next Import OpenWeatherMap Data to Google Sheets

Leave a Comment

Table of Contents