Raster GraphQL API
Private alpha GraphQL API. We're starting simple and minimal, and adding features slowly and on request — please reach out if you'd like to see changes.
API Endpoints
https://api.raster.art/graphql
Version
0.1.0
Changelog
2026-07-29
Fixed — Best-listing availability
Fixed cases where Token.bestListing returned null for tokens with an active applicable listing.
Improved — Currency display fields
When Raster cannot identify a currency's display details, CurrencyAmount returns null for symbol and, when precision is unknown, decimals, rather than placeholder values. The raw currency value and known decimals remain available.
Fixed — Usable media URLs
For embedded media, Artwork.media.contentUrl and Token.media.contentUrl now return Raster's hosted original URL instead of an internal reference clients could not load directly.
2026-07-28
Added — Token market data and sale history
Added Token.bestListing, which returns Raster's active applicable listing when one is available, and Token.sales, which returns completed sales newest first. Listing, CurrencyAmount, Sale, and BlockchainTransaction provide price, marketplace, participant, and transaction data when recorded.
query TokenMarketData($id: ID!) {
token(id: $id) {
bestListing {
unitPrice { amount currency decimals symbol }
marketplaceId
validTo
}
sales(first: 5) {
nodes {
kind
unitPrice { amount currency }
transaction { hash timestamp }
}
}
}
}
Added — Token standards
Added Token.tokenStandard, which identifies a token's primary transfer standard when Raster can classify it. The TokenStandard enum covers ERC-721, ERC-1155, FA2, Ordinals inscriptions, and CryptoPunks.
Fixed — Chain-slug token references
tokenByRef accepts registered chain slugs in ref.chainId; its response still uses the canonical CAIP chain ID.
query TokenByRef($ref: TokenRefInput!) {
tokenByRef(ref: $ref) {
id
chainId
tokenId
}
}
{
"ref": {
"chainId": "ethereum",
"contractAddress": "0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270",
"tokenId": "108000144"
}
}
2026-06-20
Added — Full connection counts
Added non-null totalCount to ArtworkConnection, TokenConnection, and TokenOwnershipConnection. It covers the full connection, independent of pagination cursors.
2026-06-18
Added — Artwork platforms
Added Artwork.platform, which provides the release platform's ID and name when Raster knows it.
2026-06-06
Added — Artists for an address
Added Address.artists, which returns the credited artist or artists associated with a minting address. Shared-address collaboration and alias records resolve to public artist identities.
Authentication
GraphQL API access is issued by API key. Contact Raster for a key before using the API in production.
Send the key on every request in the x-api-key HTTP header:
POST /graphql HTTP/1.1
Host: api.raster.art
Content-Type: application/json
x-api-key: <your-api-key>
Example with curl:
curl https://api.raster.art/graphql \
-H 'content-type: application/json' \
-H 'x-api-key: <your-api-key>' \
--data '{"query":"{ __typename }"}'
Keep the key private. Do not include it in query strings, client-side code, or public repositories.
Working with media
The API returns media as a Media object (Artwork.media, Token.media) that gives you a previewHash and a previewType — not ready-to-use URLs. This guide explains how to turn those into image/video URLs.
Preview URLs
Preview renditions are served from a CDN, addressed by previewHash:
https://bits.raster.art/{previewHash[:4]}/{previewHash}/{file}
{previewHash[:4]} is the first four characters of the hash (a sharding prefix). {file} is one of:
{file} |
What it is |
|---|---|
{size}.avif |
A still image at {size} px (longest edge) |
{size}-anim.avif |
An animated AVIF at {size} px |
original |
The unprocessed original (used for SVG) |
Example. A token whose previewHash is f1882baccbad286c0711ed8169778f6068fc853bb126b543561f2be7fdf9357d and previewType is image/2, at 700 px:
https://bits.raster.art/f188/f1882baccbad286c0711ed8169778f6068fc853bb126b543561f2be7fdf9357d/700.avif
Which renditions exist (previewType)
previewType is a handler/version key (it is not a MIME type). It tells you which files were generated, so you can build a valid URL without probing:
previewType |
Still sizes ({size}.avif) |
Animated ({size}-anim.avif) |
Original |
|---|---|---|---|
image/1 |
300, 700, 1500 | — | — |
image/2 |
350, 700, 1200, 1800, 2400, 3600, 7200 | — | — |
image-pixelart/1 |
350, 700, 1200, 1800, 2400, 3600, 7200 | — | — |
svg/1 |
— | — | ✓ (original, the SVG) |
gif/2 |
— | 300, 700, 1500 | — |
gif/3 |
300, 700, 1500 | 300, 700, 1500 | — |
video/1 |
300, 700, 1500 (poster frame) | 300, 700, 1500 | — |
video/3 |
300, 700, 1500 (poster frame) | 300, 700, 1500 | — |
Pick the smallest size that covers your display. All renditions are AVIF except svg/1, whose original is the SVG itself. Older items may carry an earlier type version (e.g. gif/1); the URL scheme is identical — request the still or animated size you need.
The other Media fields
| Field | Meaning |
|---|---|
previewHash |
Content hash; the input to the preview URLs above. |
previewType |
Rendition type key (the table above). Not a MIME type. |
contentType |
Kind of the original media — image, video, gif, svg, webapp, … Not a MIME type. |
contentUrl |
Browser-loadable URL of the original source file when available — frequently null. For embedded media, Raster returns its hosted original URL. For display, prefer the preview renditions above. |
contentSize |
Size in bytes. |
dimensions |
Intrinsic pixel width/height, when known. |
Queries
address
Description
Resolve a wallet address. Always returns an Address for any well-formed address; profile and ownership are populated only when such data exists.
Example
Query
query address($address: String!) {
address(address: $address) {
address
artists {
...ArtistFragment
}
profile {
...CollectorFragment
}
tokensOwned {
...TokenOwnershipConnectionFragment
}
}
}
Variables
{"address": "0xdf9396b3600583c3dc1e67d5c963f0c4e230680e"}
Response
{
"data": {
"address": {
"address": "0xdf9396b3600583c3dc1e67d5c963f0c4e230680e",
"artists": [Artist],
"profile": Collector,
"tokensOwned": TokenOwnershipConnection
}
}
}
artist
Description
Look up an artist by its opaque id.
Example
Query
query artist($id: ID!) {
artist(id: $id) {
id
name
slug
addresses
artworks {
...ArtworkConnectionFragment
}
}
}
Variables
{"id": "8231"}
Response
{
"data": {
"artist": {
"id": "8231",
"name": "Michael Connolly",
"slug": "michael-connolly",
"addresses": ["0xf92bb2215684c353b4009395061ee7652883c365"],
"artworks": ArtworkConnection
}
}
}
artistBySlug
Description
Look up an artist by its URL slug.
Example
Query
query artistBySlug($slug: String!) {
artistBySlug(slug: $slug) {
id
name
slug
addresses
artworks {
...ArtworkConnectionFragment
}
}
}
Variables
{"slug": "divisions-by-michael-connolly"}
Response
{
"data": {
"artistBySlug": {
"id": "8231",
"name": "Michael Connolly",
"slug": "michael-connolly",
"addresses": ["0xf92bb2215684c353b4009395061ee7652883c365"],
"artworks": ArtworkConnection
}
}
}
artwork
Description
Look up an artwork by its opaque id.
Example
Query
query artwork($id: ID!) {
artwork(id: $id) {
id
slug
title
description
artists {
...ArtistFragment
}
platform {
...PlatformFragment
}
media {
...MediaFragment
}
tokens {
...TokenConnectionFragment
}
}
}
Variables
{"id": "8231"}
Response
{
"data": {
"artwork": {
"id": "8231",
"slug": "divisions-by-michael-connolly",
"title": "Divisions",
"description": "Divisions creates playful abstract compositions that can go all the way up to eleven.",
"artists": [Artist],
"platform": Platform,
"media": Media,
"tokens": TokenConnection
}
}
}
artworkBySlug
Description
Look up an artwork by its URL slug.
Example
Query
query artworkBySlug($slug: String!) {
artworkBySlug(slug: $slug) {
id
slug
title
description
artists {
...ArtistFragment
}
platform {
...PlatformFragment
}
media {
...MediaFragment
}
tokens {
...TokenConnectionFragment
}
}
}
Variables
{"slug": "divisions-by-michael-connolly"}
Response
{
"data": {
"artworkBySlug": {
"id": "8231",
"slug": "divisions-by-michael-connolly",
"title": "Divisions",
"description": "Divisions creates playful abstract compositions that can go all the way up to eleven.",
"artists": [Artist],
"platform": Platform,
"media": Media,
"tokens": TokenConnection
}
}
}
token
Description
Look up a token by its opaque id.
Example
Query
query token($id: ID!) {
token(id: $id) {
id
chainId
contractAddress
tokenId
tokenStandard
bestListing {
...ListingFragment
}
sales {
...SaleConnectionFragment
}
name
description
media {
...MediaFragment
}
artworks {
...ArtworkFragment
}
artists {
...ArtistFragment
}
owners {
...TokenOwnershipConnectionFragment
}
}
}
Variables
{"id": "8231"}
Response
{
"data": {
"token": {
"id": "8231",
"chainId": "eip155:1",
"contractAddress": "0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270",
"tokenId": "108000144",
"tokenStandard": "ERC721",
"bestListing": Listing,
"sales": SaleConnection,
"name": "Divisions #144",
"description": "Divisions creates playful abstract compositions that can go all the way up to eleven.",
"media": Media,
"artworks": [Artwork],
"artists": [Artist],
"owners": TokenOwnershipConnection
}
}
}
tokenByRef
Description
Look up a token by its on-chain reference (chain, contract, token id).
Response
Returns a Token
Arguments
| Name | Description |
|---|---|
ref - TokenRefInput!
|
Example
Query
query tokenByRef($ref: TokenRefInput!) {
tokenByRef(ref: $ref) {
id
chainId
contractAddress
tokenId
tokenStandard
bestListing {
...ListingFragment
}
sales {
...SaleConnectionFragment
}
name
description
media {
...MediaFragment
}
artworks {
...ArtworkFragment
}
artists {
...ArtistFragment
}
owners {
...TokenOwnershipConnectionFragment
}
}
}
Variables
{"ref": TokenRefInput}
Response
{
"data": {
"tokenByRef": {
"id": "8231",
"chainId": "eip155:1",
"contractAddress": "0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270",
"tokenId": "108000144",
"tokenStandard": "ERC721",
"bestListing": Listing,
"sales": SaleConnection,
"name": "Divisions #144",
"description": "Divisions creates playful abstract compositions that can go all the way up to eleven.",
"media": Media,
"artworks": [Artwork],
"artists": [Artist],
"owners": TokenOwnershipConnection
}
}
}
Types
Address
Description
A wallet address and anything publicly known about it.
Fields
| Field Name | Description |
|---|---|
address - String!
|
The wallet address. |
artists - [Artist!]!
|
The artists who mint from this address. Usually one; a wallet shared by several artists who are each credited individually resolves to all of them (an artist with its own identity stays a single entry). |
profile - Collector
|
The public collector profile linked to this address, if any. |
tokensOwned - TokenOwnershipConnection!
|
Tokens held by this address, newest acquisition first. Paginate with first/after. |
Example
{
"address": "0xdf9396b3600583c3dc1e67d5c963f0c4e230680e",
"artists": [Artist],
"profile": Collector,
"tokensOwned": TokenOwnershipConnection
}
Artist
Description
A creator credited on artworks and/or tokens.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
name - String
|
Display name. |
slug - String
|
URL slug. |
addresses - [String!]!
|
On-chain addresses attributed to this artist. |
artworks - ArtworkConnection!
|
Public artworks crediting this artist, newest mint first. Paginate with first/after. |
Example
{
"id": "8231",
"name": "Michael Connolly",
"slug": "michael-connolly",
"addresses": ["0xf92bb2215684c353b4009395061ee7652883c365"],
"artworks": ArtworkConnection
}
Artwork
Description
A work, backed by one or more on-chain tokens.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
slug - String
|
URL slug. |
title - String!
|
Title. |
description - String!
|
Long-form description. |
artists - [Artist!]!
|
Verified artist credits for this artwork. |
platform - Platform
|
The release platform for this artwork, when known. |
media - Media
|
Preview and content media, taken from the artwork's cover token. |
tokens - TokenConnection!
|
The artwork's tokens, ordered by mint index. Paginate with first/after. |
Example
{
"id": "8231",
"slug": "divisions-by-michael-connolly",
"title": "Divisions",
"description": "Divisions creates playful abstract compositions that can go all the way up to eleven.",
"artists": [Artist],
"platform": Platform,
"media": Media,
"tokens": TokenConnection
}
ArtworkConnection
Description
A page of artworks.
Fields
| Field Name | Description |
|---|---|
totalCount - Int!
|
Total number of artworks in the full connection, ignoring pagination cursors. |
nodes - [Artwork!]!
|
|
pageInfo - PageInfo!
|
Example
{
"totalCount": 100,
"nodes": [Artwork],
"pageInfo": PageInfo
}
BigInt
Description
An integer that may exceed 32/64 bits (e.g. an NFT token id), serialized as a decimal string to avoid precision loss. Accepts an integer or an integer string as input.
Example
"108000144"
BlockchainTransaction
Description
A transaction that settled a token sale.
Example
{
"hash": "example",
"chainId": "eip155:1",
"timestamp": "2023-08-27T11:43:23.000Z"
}
Boolean
Description
The Boolean scalar type represents true or false.
Example
true
Collector
Description
A public collector profile.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
username - String
|
Chosen username. |
slug - String
|
URL slug. |
addresses - [String!]!
|
Verified, public addresses linked to this profile. |
Example
{
"id": "8231",
"username": "Le Random",
"slug": "le-random",
"addresses": ["0xdf9396b3600583c3dc1e67d5c963f0c4e230680e"]
}
CurrencyAmount
Description
A currency-denominated amount in base units.
Example
{
"amount": "108000144",
"currency": "example",
"decimals": 100,
"symbol": "example"
}
DateTime
Description
ISO-8601 / RFC-3339 timestamp in UTC, e.g. 2024-01-01T00:00:00.000Z.
Example
"2023-08-27T11:43:23.000Z"
Dimensions
ID
Description
The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
Example
"8231"
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
100
Listing
Description
A marketplace listing that can be fulfilled for a token.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
unitPrice - CurrencyAmount!
|
The payment required per one token unit. |
maker - Address
|
The address that created the listing, when known. |
protocolId - String!
|
The protocol used to create and fulfill this order, e.g. seaport/1.6. |
marketplaceId - String
|
The marketplace where the order originated, when known. |
validTo - DateTime
|
When the listing ceases to be valid, when supplied by the marketplace. |
Example
{
"id": "8231",
"unitPrice": CurrencyAmount,
"maker": Address,
"protocolId": "example",
"marketplaceId": "example",
"validTo": "2023-08-27T11:43:23.000Z"
}
Media
Description
Preview and full-content media for an artwork or token.
Preview files are served from a CDN and addressed by previewHash: https://bits.raster.art/{previewHash[:4]}/{previewHash}/{file}. The {file} part is a rendition filename (for example {size}.avif, {size}-anim.gif, or original); available sizes, formats, and animated variants depend on previewType. See the "Working with media" guide in the API docs for the full table.
Fields
| Field Name | Description |
|---|---|
previewHash - String
|
Content hash used to build preview URLs (see the type description / media guide). |
previewType - String
|
Rendition type that selects which preview files exist, e.g. image/2, gif/3, svg/1. This is a handler/version key, NOT a MIME type. |
contentUrl - String
|
URL of the original source file, when available (may be null). |
contentType - String
|
Kind of the original media — image, video, gif, svg, webapp, … — not a MIME type. |
contentSize - Int
|
Size of the full content, in bytes. |
dimensions - Dimensions
|
Intrinsic pixel dimensions, when known. |
Example
{
"previewHash": "f1882baccbad286c0711ed8169778f6068fc853bb126b543561f2be7fdf9357d",
"previewType": "image/2",
"contentUrl": "https://generator.artblocks.io/0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270/108000144",
"contentType": "webapp",
"contentSize": 107698,
"dimensions": Dimensions
}
PageInfo
Description
Cursor-pagination metadata for a connection.
Example
{"hasNextPage": true, "endCursor": "eyJpZCI6MTA4MDAwMTQ0fQ"}
Platform
Sale
Description
A completed sale of a token.
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
transaction - BlockchainTransaction!
|
|
kind - SaleKind
|
How the sale settled, when classified. |
unitPrice - CurrencyAmount
|
Payment per token unit, when the event recorded it. |
quantity - BigInt
|
Number of token units sold, when the event recorded it. |
buyer - Address
|
The purchasing address, when known. |
seller - Address
|
The selling address, when known. |
marketplaceId - String
|
The marketplace where the sale occurred, when known. |
Example
{
"id": "8231",
"transaction": BlockchainTransaction,
"kind": "MINT",
"unitPrice": CurrencyAmount,
"quantity": "1",
"buyer": Address,
"seller": Address,
"marketplaceId": "example"
}
SaleConnection
SaleKind
Description
The settlement path that produced a token sale.
Values
| Enum Value | Description |
|---|---|
|
|
A primary mint. |
|
|
A buyer purchased an active listing. |
|
|
A seller accepted an active bid. |
|
|
An auction completed with a winning bid. |
Example
"MINT"
String
Description
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"example"
Token
Description
A single on-chain token (NFT).
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
chainId - String!
|
CAIP-2 chain id, e.g. eip155:1. |
contractAddress - String
|
Contract address; null on chains without contracts (e.g. Bitcoin). |
tokenId - BigInt!
|
The token's on-chain id. |
tokenStandard - TokenStandard
|
The token's primary transfer standard; null when Raster cannot classify it confidently. |
bestListing - Listing
|
The active applicable listing selected by Raster's canonical best-listing calculation. |
sales - SaleConnection!
|
Completed sales, newest first. Paginate with first/after. |
name - String
|
Token name, from token metadata. |
description - String
|
Token description, from token metadata. |
media - Media
|
Preview and content media for this token. |
artworks - [Artwork!]!
|
Artworks this token belongs to. |
artists - [Artist!]!
|
Artists credited on this token, falling back to its artworks' credits when it has none. |
owners - TokenOwnershipConnection!
|
Current holders, largest holding first; burn/system addresses excluded. Paginate with first/after. |
Example
{
"id": "8231",
"chainId": "eip155:1",
"contractAddress": "0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270",
"tokenId": "108000144",
"tokenStandard": "ERC721",
"bestListing": Listing,
"sales": SaleConnection,
"name": "Divisions #144",
"description": "Divisions creates playful abstract compositions that can go all the way up to eleven.",
"media": Media,
"artworks": [Artwork],
"artists": [Artist],
"owners": TokenOwnershipConnection
}
TokenConnection
TokenOwnership
Description
A holding: an address's ownership of a token.
Example
{
"address": "0xdf9396b3600583c3dc1e67d5c963f0c4e230680e",
"token": Token,
"quantity": "1",
"lastAcquiredAt": "2023-08-27T11:43:23.000Z"
}
TokenOwnershipConnection
Description
A page of token holdings.
Fields
| Field Name | Description |
|---|---|
totalCount - Int!
|
Total number of holdings in the full connection, ignoring pagination cursors. |
nodes - [TokenOwnership!]!
|
|
pageInfo - PageInfo!
|
Example
{
"totalCount": 100,
"nodes": [TokenOwnership],
"pageInfo": PageInfo
}
TokenRefInput
Description
On-chain reference that identifies a single token.
Example
{
"chainId": "eip155:1",
"contractAddress": "0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270",
"tokenId": "108000144"
}
TokenStandard
Description
The primary transfer standard implemented by a token's contract.
Values
| Enum Value | Description |
|---|---|
|
|
Ethereum ERC-721. |
|
|
Ethereum ERC-1155. |
|
|
Tezos FA2. |
|
|
A Bitcoin Ordinals inscription. |
|
|
The original non-ERC-721 CryptoPunks contract. |
Example
"ERC721"