Superhero API
A free superhero API with no key: 731 Marvel, DC and other characters with power stats, appearance, biography, affiliations and images, served as static JSON. Live example included.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the Superhero API?
This Superhero API is a free, key-free dataset of 731 comic book characters covering Marvel, DC and other publishers. Each record carries six power stats, physical appearance, biography, occupation and connections, plus hosted image URLs, and it is served as static JSON from a CDN.
The original SuperHero API required an access token; this is the open mirror of the same dataset, published as flat JSON files on GitHub Pages. That architecture is the whole story. There is no server to fall over, no rate limit to hit and no key to rotate — you are fetching a static file from a CDN, so latency is low and uptime is essentially GitHub's. The trade-off is that there is no query interface at all: you cannot search server-side, so anything beyond a lookup by id means fetching `all.json` and filtering in your own code.
The `powerstats` block is what most people come for. Six integers from 0 to 100 for intelligence, strength, speed, durability, power and combat, consistently populated across the whole set, which makes it a genuinely good dataset for teaching — radar charts, sorting, weighted comparison, a 'who would win' calculator that is arithmetic rather than argument. The per-field endpoints are worth knowing about too: if you only need stats you can fetch `/api/powerstats/{id}.json` instead of the full record and cut the payload sharply.
Quick facts
- Base URL
https://akabab.github.io/superhero-api/api- Authentication
- No key and no account — these are static JSON files on a CDN.
- Rate limit
- None. It is GitHub Pages serving static files.
- Pricing
- Free and open source.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Superhero API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Fetch Batman's full record by id
GET https://akabab.github.io/superhero-api/api/id/70.json
curl 'https://akabab.github.io/superhero-api/api/id/70.json'const res = await fetch("https://akabab.github.io/superhero-api/api/id/70.json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://akabab.github.io/superhero-api/api/id/70.json", timeout=20)
res.raise_for_status()
print(res.json()){
"id": 70,
"name": "Batman",
"slug": "70-batman",
"powerstats": {
"intelligence": 100,
"strength": 26,
"speed": 27,
"durability": 50,
"power": 47,
"combat": 100
},
"appearance": {
"gender": "Male",
"race": "Human",
"height": [
"6'2",
"188 cm"
],
"weight": [
"210 lb",
"95 kg"
],
"eyeColor": "blue",
"hairColor": "black"
},
"biography": {
"fullName": "Bruce Wayne",
"alterEgos": "No alter egos found.",
"aliases": [
"Insider",
"Matches Malone"
],
"placeOfBirth": "Crest Hill, Bristol Township; Gotham County",
"firstAppearance": "Detective Comics #27",
"publisher": "DC Comics",
"alignment": "good"
},
"work": {
"occupation": "Businessman",
"base": "Batcave, Stately Wayne Manor, Gotham City; Hall of Justice, Justice League Watchtower"
},
"connections": {
"groupAffiliation": "Batman Family, Batman Incorporated, Justice League, Outsiders, Wayne Enterprises, Club of Heroes, formerly White Lantern Corps, Sinestro Corps",
"relatives": "Damian Wayne (son), Dick Grayson (adopted son), Tim Drake (adopted son), Jason Todd (adopted son), Cassandra Cain (adopted ward)\nMartha Wayne (mother, deceased), Thomas Wayne (father, deceased), Alfred Pennyworth (former guardian), Roderick Kane (grandfather, deceased), Elizabeth Kane (grandmother, deceased), Nathan Kane (uncle, deceased), Simon Hurt (ancestor), Wayne Family"
},
"images": {
"xs": "https://cdn.jsdelivr.net/gh/akabab/superhero-api@0.3.0/api/images/xs/70-batman.jpg",Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | path segment | Required | Numeric character id, from 1 to 731: `/api/id/70.json`. 70 |
all | path segment | Optional | `/api/all.json` returns every character in one document. Fetch it once and filter locally. all |
field | path segment | Optional | Slice a single block instead of the whole record: `powerstats`, `appearance`, `biography`, `work`, `connections` or `image`. powerstats |
Response fields
id / name / sluginteger / string- Character id, display name, and a URL-safe slug that includes the id.
powerstatsobject- Six integers 0-100: intelligence, strength, speed, durability, power, combat.
appearanceobject- Gender, race, eye and hair colour, plus height and weight as two-element arrays holding imperial and metric strings.
biographyobject- Full name, aliases, place of birth, first appearance and publisher.
workobject- Occupation and base of operations.
connectionsobject- Group affiliations and relatives, as free text.
imagesobject- Image URLs at several sizes — `xs`, `sm`, `md` and `lg`.
What you can build with the Superhero API
- Build a character comparison tool driven by the six power stats
- Teach radar and bar charts against a dataset everyone already understands
- Seed a card game or quiz with real stats and artwork
- Practise client-side search and filtering over a single fetched document
- Populate a portfolio project without registering for anything
Common errors and how to fix them
404
No character with that id.
Fix: Ids run from 1 to 731 with no gaps. Anything outside that range returns GitHub Pages' own 404 page, which is HTML, not JSON.
HTML instead of JSON
You hit the 404 page or omitted the `.json` extension.
Fix: Every path ends in `.json` — `/api/id/70.json`, not `/api/id/70`.
No way to search by name
There is no query interface; it is a static file host.
Fix: Fetch `/api/all.json` once, index it by name in memory, and search locally. The whole dataset is small enough to hold.
Superhero API — frequently asked questions
Is there a free superhero API that does not need a token?
Yes. This mirror publishes the SuperHero dataset as static JSON on GitHub Pages, so there is no token, no account and no rate limit — unlike the original API, which required an access token.
How many characters does it cover?
731, spanning Marvel, DC and several smaller publishers. Records are consistently populated, which is unusual for a scraped comics dataset.
Can I search by name or publisher?
Not server-side. It serves static files, so the pattern is to fetch `/api/all.json` once and filter in your own code. The full document is small enough to keep in memory or in localStorage.
Are the character images usable?
The dataset links to hosted images at four sizes. They are third-party artwork owned by the publishers, so treat them as fine for a personal or learning project and get advice before using them commercially.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
JSON Path Finder
Evaluate a dot/bracket path against your JSON and list every leaf path for discovery. Free online JSON path finder that runs 100% in your browser.
Superhero API is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.