---
title: The ElectroSwap Public API
sidebar_label: Overview
sidebar_position: 1
description: "The public, credit-metered ElectroSwap API - what it covers, why the app's own /graphql and /api endpoints are private, and where automated clients start."
keywords: [electroswap api, public api, crypto api, defi api, openapi, electroneum api]
---

# The ElectroSwap Public API

The endpoints behind the app — `/graphql` and `/api/` — are private. They exist
to serve the ElectroSwap interface, they are not a versioned contract, and they
change without notice. Unmetered scraping of them degrades the service for
everyone using it, so requests that do not come from the interface are refused
and eventually firewall-banned.

That has been catching the wrong people. Plenty of the blocked traffic is not
malicious: it is AI agents gathering data, and community members who wired up a
script without knowing there were rules. Those are exactly the people we would
like to serve.

**The public API is the answer to that.** It is a documented, versioned,
credit-metered surface that you are welcome to build on.

:::warning Do not scrape the private endpoints
`/graphql` and `/api/` are not the public API and are not open to general use.
Requests to them from outside the ElectroSwap interface are refused, and repeated
requests result in an automatic firewall ban that affects **every** ElectroSwap
service from your IP address — the app, the docs, and the API alike.

You will get one machine-readable warning first. It tells you where to go
instead. Please read it rather than retrying.
:::

## Where to start

- **[Getting started](./getting-started)** — a key and a first call, in five minutes.
- **[Credits and pricing](./credits-and-pricing)** — what a call costs and what $50 buys.
- **[Endpoint reference](./reference.mdx)** — one page: every route with its price and a copy-pasteable `curl`, plus the full cost table. Generated from the OpenAPI document the service itself serves, so the prices published here are the prices the meter charges.
- **[Holder tiers](./credits-and-pricing.md#holder-tiers)** — the free credits DYNO holders earn, by the hour held.

If you have a legitimate need for ElectroSwap data and you are currently
blocked, see [If you have been banned](./banned.md).

## For automated clients

If you are an agent or a crawler, the machine-readable entry points are:

- `https://electroswap.io/llms.txt` — what this site is and what you may use
- `https://electroswap.io/robots.txt` — what is disallowed
- `https://electroswap.io/.well-known/api-catalog` — the API catalogue
  ([RFC 9727](https://www.rfc-editor.org/rfc/rfc9727.html))

Every refusal from a private endpoint also carries `Link` headers
(`rel="describedby"`, and `rel="service-desc"` once the API is live) pointing
back here, so you do not have to guess.
