API
Introduction

Introduction

Welcome to the Amboss API!

Background

The Amboss API is a GraphQL endpoint that provides general and detailed information about the lightning network.

API Permissions

Our API is free to use but we do not allow commercial use of it. If you want to use our API for commercial purposes please reach out.

⚠️

For commercial use of the API please reach out.

Apollo Studio

The Apollo Studio Explorer provides a listing of all queries and mutations available through the API. Results may be exported in CSV or JSON formats. Using the Explorer enables access to the API without requiring any coding experience.

The Apollo Explorer may be accessed here (opens in a new tab).

Accessing the API

Our API is available at https://api.amboss.space/graphql (opens in a new tab)

A full listing of the queries and mutations available may be found here (opens in a new tab).

How to authenticate

For queries and mutations that need authentication you can get an API key by logging into amboss.space and going to your account panel. In the API Keys section you can create a new key.

The request should include the following header:

authorization: Bearer [API KEY]

Making Requests

cURL

curl -X POST -H "Content-Type: application/json" -d '{"query":"query{getHello}"}' https://api.amboss.space/graphql

Postman

To make a request from Postman you can follow these steps:

  1. Change request type to POST
  2. Change url to https://api.amboss.space/graphql (opens in a new tab)
  3. Change body type to GraphQL
  4. Add your query as the Body
  5. Send the request

NodeJS Example

let options = {
  'method': 'POST',
  'url': ‘https://api.amboss.space/graphql',
  'headers': {
    'Authorization': 'Bearer [Amboss api key here]’,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    query: 'query Query {getHello}'
    variables: VARIABLES_OBJECT
  })
};
 
request(options, (error, response) => {
  if (error) {
    console.log(error)
  }
  else {
    let json = JSON.parse(response.body);
    console.log(json)
  }
});

Getting help with this graph

For support working with the API, contact us through Telegram (opens in a new tab) or Twitter (opens in a new tab).