API Reference

Overview

Santiment API utilizes GraphQL. The decision to use GraphQL over REST was made due to several reasons:

  • It allows you to request precisely the data you need and conveniently batch requests together. This effectively addresses the issues of underfetching and overfetching data. For instance, why fetch all 20+ fields of a project when you only need its name?

  • The request describes the format of the response. This eliminates the need to guess what data the result contains and how to parse it.

  • It provides an easy, out-of-the-box method to explore our API via our Live Explorer.

Example

The example below demonstrates a GraphQL query used to fetch timeseries price data. The parameters control the time range, the interval between data points, and how all the values within an interval are aggregated.

1
2
3
4
5
6
7
8
9
10
11
12
13
{
  getMetric(metric: "twitter_followers") {
    timeseriesData(
      slug: "ethereum"
      from: "2023-01-01T00:00:00Z"
      to: "2023-01-05T00:00:00Z"
      interval: "1d"
      aggregation: LAST){
        datetime
        value
    }
  }
}

Run the example in the GraphiQL Live Explorer

How to access the API

Instructions on how to access the API can be found here.

Metrics

You can find information on how to explore and fetch the available metrics here.

Supported Blockchains

You can find information about the blockchains we support on our Supported Blockchains page.

Rate Limits

The Rate Limits Page provides detailed information on how API calls are counted and how rate limits are applied.

Complexity

Each API query has a limit to the amount of data points it can fetch. The Complexity Page provides a detailed explanation on how complexity analysis determines whether a given query will be executed or rejected.

Glossary

You can find the definitions of some terms used on this page in our dedicated glossary page.