๐Ÿ“ŠData API

Overview

The Data API provides read-only access to query and browse intellectual property assets across the Molecule Protocol. Use these queries to build marketplaces, token screeners, portfolio trackers, and discovery interfaces for decentralized science projects.

Features:

  • Query IP-NFTs (Intellectual Property NFTs) and their metadata

  • Browse IP Tokens (IPTs) with market data

  • Access trading metrics and liquidity information

  • Filter, sort, and paginate results

  • Build data-driven applications


Authentication

All Data API requests require an API key.

Obtaining an API Key

To request an API key:

  1. Contact the Molecule team

  2. Provide your intended use case

  3. You'll receive your API key

Using Your API Key

Include the API key in all requests using the x-api-key header:


API Endpoint


Queries

List IP-NFTs

Query and browse all IP-NFTs on the platform with filtering, sorting, and pagination.

GraphQL Query:

Parameters:

Parameter
Type
Description

limit

Int

Maximum number of results (recommended: 20-50)

skip

Int

Number of results to skip (for pagination)

sortBy

IPNFTSortBy

Field to sort by (e.g., createdAt, mintedAt)

sortOrder

SortOrder

Sort direction: asc or desc

filterBy

IPNFTFilterBy

Filter criteria (owner, chainId, etc.)

Example Request (curl):

Response Example:


Get Single IP-NFT

Retrieve detailed information about a specific IP-NFT by its ID.

GraphQL Query:

Example Request:


List IP Tokens (IPTs)

Query and browse all IP Tokens with their associated IP-NFTs and market data.

GraphQL Query:

Parameters:

Parameter
Type
Description

limit

Int

Maximum number of results

skip

Int

Number of results to skip (for pagination)

sortBy

IPTSortBy

Field to sort by (e.g., createdAt, holderCount)

sortOrder

SortOrder

Sort direction: asc or desc

filterBy

IPTFilterBy

Filter criteria (ipnftId, l2TokenAddress, etc.)

Example Request (curl):

Response Example:


Get Single IP Token

Retrieve detailed information about a specific IPT by its ID.

GraphQL Query:


Query Markets

Access trading and market data for IP Tokens.

GraphQL Query:

Example - Get Markets by Trading Volume:


Common Patterns

Pagination

Use skip and limit for pagination:

Sorting

Sort results by any field:

Filtering

Filter results by specific criteria:

Filter by owner:

Filter by chain:

Filter IPTs by IPNFT:


Response Types

IPNFT Type

IPT Type

Market Type


Example Use Cases

Building a Marketplace UI

Token Screener / Price Tracker

Portfolio Tracker


Error Handling

Common Errors

Status Code
Error
Description

401

Unauthorized

Missing or invalid API key

400

Bad Request

Invalid query syntax or parameters

404

Not Found

Requested resource doesn't exist

500

Internal Server Error

Server error - retry the request

Troubleshooting

401 Unauthorized Error:

  • Verify x-api-key header is included

  • Check that your API key is valid and not expired

  • Ensure no typos in the API key

Empty Results:

  • Check filter criteria - may be too restrictive

  • Verify the chainId if filtering by chain

  • Try removing filters to see all results

GraphQL Errors:

  • Check query syntax is valid

  • Ensure field names match the schema

  • Verify variable types match parameter types


Getting Support

For questions or issues with the Data API:


Last updated: December 2024

Last updated