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 run your own custom requests instead of using API Connector’s pre-built integration, using any of the endpoints and parameters shown in the API documentation. Here's an example request setup. If you have one, enter your API key where it says your_API_key.

  • ApplicationCustom
  • MethodGET
  • Request URLhttps://api.opensea.io/api/v1/collections?limit=300
  • Headers
    • X-API-Key: your_API_key
    • Accept: application/json


opensea-results1

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

Leave a Comment

Jump To...