Ordinal News Standard
  • About
  • Operations
  • API
  • inscribe.news
  • GitHub
Powered by GitBook
On this page
Edit on GitHub

API

PreviousOperations

Last updated 2 years ago

The is powered by Cloudflare Pages, and contains not only the website but also a powerful API and indexer to interact with any inscription and it's content.

The following API endpoints are available and , where ID is either the inscription ID or the inscription number.

URL
Description

/api/info/ID

Returns on-chain inscription information as JSON

/api/content/ID

Returns on-chain inscription content, based on mime type

/api/news/ID

Returns HTML by parsing the inscription body (news only)

/api/data/ID

Returns the inscription info and content above in one call as JSON (news only)

/api/data/ord-news

Returns all indexed and valid news inscriptions

/api/data/ord-list

Returns all indexed inscriptions

This API creates a cached layer of inscription data, and everything is returned from the edge when available. If not, the data is fetched then stored from the for future reads.

The API code exists in the , and Typescript types are available .

This API is free to use for any website, if you find it useful or run into any errors, please !

Fetching all Data

The /api/data/ord-news and /api/data/ord-list endpoints return a list of keys found in the KV namespace, and supports the following query parameters:

Parameter
Description

cursor

If list_complete is false, this value can be used to call again to get the next batch.

prefix

Return a list of keys starting with a particular prefix.

limit

Modify the number of results returned, default/max 1,000.

front-end for inscribe.news
documented at the root of the API
Hiro Ordinals API
/functions directory of the project
in this helper file
file an issue on GitHub