Skip to content

API Documentation


The Cryptosense v2 API uses GraphQL. Some familiarity with this query language is recommended to make the best use of the API but is not mandatory for this tutorial.

You can use any HTTP client you'd like to send queries. Below is an example with curl that retrieves the name of the user:

$ export CS_API_KEY=<your API key>
$ curl \
    --request POST \
    --header "API-KEY: $CS_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '{"query": "query {viewer {name}}"}' \
{"data":{"viewer":{"name":"<your username>"}}}

And here is the same query in Python:

import json
import os

import requests

cs_api_key = os.getenv("CS_API_KEY")
query = """
  query {
    viewer {
response =
    data=json.dumps({"query": query}),
    headers={"API-KEY": cs_api_key, "Content-Type": "application/json"},

In the following parts, we will assume you have chosen any suitable client and only show you the queries and responses.


Further Reading

For more information about the GraphQL types exposed by the API, go to the API explorer. You can write queries with auto-completion and submit them against the production database. In the top right corner, you will see a "DOCS" link that will show you the available types and their attributes.

For general information about traces, please see our support pages. For instructions on how to generate a trace using the Java Tracer, please see the user manual.

For information about how to interpret the results of an analysis, please see the support documentation for reports.