canonical: https://jentic.com/apis/marvel.com/marvel

# Marvel Comics API

The Marvel Comics API exposes Marvel's comic book catalogue, including characters, comics, creators, events, series, and stories, along with the relationships between them. Marvel self-served its own Swagger document for the same 39 read operations from its API gateway, and that endpoint no longer responds, so Jentic maintains a curated, agent-optimized OpenAPI 3.0.3 specification of the same surface rather than pointing agents at a document they cannot fetch. Marvel's developer portal now redirects to marvel.com and every gateway path tested returns HTTP 500, so the upstream API is not currently callable. Each request is authenticated via a public key, timestamp, and md5 hash signature, all passed as query parameters. It is intended for fan sites, comic recommendation engines, and AI agents that answer questions about Marvel characters and storylines.

## For AI agents

Browse Marvel's catalogue of characters, comics, creators, events, series, and stories with cross-resource lookups for AI agents answering pop-culture questions.

## Scope

Does not handle digital comic purchases, streaming video, or Marvel Studios film metadata - use for the comic-book catalogue (characters, comics, creators, events, series, stories) only.

## Capabilities

- Search Marvel characters by name and retrieve biographical metadata
- List comics filtered by character, creator, series, event, or release date
- Look up creators (writers, artists, editors) and the works they contributed to
- Browse Marvel events (Civil War, Secret Wars) and the comics tied to each event
- Traverse character > comic, comic > creator, and series > story relationships
- Fetch series details and their constituent issues for a given run

## Use cases

### Comic Recommendation Engine

Comic-discovery sites recommend issues based on a user's favourite characters or creators. Marvel's API exposes character-to-comics and creator-to-comics traversals so a recommender can pull every Spider-Man comic by a chosen writer in a single chained query. Combined with date filters this powers 'new issues this week starring X' email digests.

Example prompt: Call `GET /characters` to find Spider-Man's id, then `GET `/characters/{characterId}/comics`` filtered by `dateDescriptor=thisWeek` to return the latest issues.

### Pop-Culture Trivia Bot

Trivia and chatbot apps answer questions like 'who drew the cover of X-Men 137?' or 'list every Avengers event'. The Marvel API's creator and event resources, plus the comic detail endpoint, return the structured data needed to power factual answers without scraping fan wikis.

Example prompt: Call `GET `/comics/{comicId}`` and parse the creators array to surface penciller and writer credits.

### Fan Site Catalogue Browsing

Fan sites that catalogue Marvel content paginate through characters, series, and events to keep their local index up to date. The Marvel API supports orderBy and modifiedSince filters so the site only fetches changed records since the last sync, then joins comics back to series and events for navigation.

Example prompt: Call `GET /characters?modifiedSince=2025-01-01&limit=100` and paginate to refresh the local character index.

### AI Agent Comic Q&A

An AI agent answering Marvel-related questions can use Jentic to call the right endpoint based on the user's intent (character, comic, creator, event). Jentic stores the public/private key pair and computes the timestamp+hash signature at execution time so the agent never handles signing logic.

Example prompt: Search Jentic for 'find marvel character', load the `/characters` schema, and execute it with name='Storm' to answer the user's question.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/characters` | Search and list Marvel characters |
| GET | `/characters/{characterId}` | Fetch a single character |
| GET | `/characters/{characterId}/comics` | List comics featuring a character |
| GET | `/comics` | Search and list comics |
| GET | `/comics/{comicId}` | Fetch a single comic |
| GET | `/creators` | Search and list creators |
| GET | `/events` | List Marvel events |
| GET | `/series` | Search and list series |

## Key resources

- **Characters** — Marvel characters with biographical metadata and links to comics, events, series, and stories.
- **Comics** — Comic issues with metadata, creators, characters, and series associations.
- **Creators** — Writers, artists, editors, and other creators with their bibliographies.
- **Events** — Crossover events such as Civil War or Secret Wars with their participating comics and characters.
- **Series** — Comic series and their constituent issues.
- **Stories** — Individual stories within comics.

## Why Jentic

- **Setup:** Wiring the Marvel Comics API by hand means computing the per-request ts timestamp and md5 hash from your public and private keys, appending apikey to every query, and pointing at the gateway.marvel.com host. Through Jentic you install once, import the Marvel Comics API from the API Directory, store the public and private keys once, and your agent calls it.
- **Permission scoping:** Marvel puts the resource id in the URL path (`/characters/{characterId}`, `/comics/{comicId}`), so a rule can pin your agent to one character or comic and its related listings. You choose the operations it may call, and since the catalogue surface is read-only, it retrieves data without any write access unless you add it.
- **Credential handling:** Your Marvel public and private keys are stored once, encrypted, by your own Jentic One instance, which computes the timestamp and hash signature and injects them at execution time. The private key never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'find a Marvel character' or 'list comics by a creator', and Jentic returns the matching Marvel operation with its query schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Marvel Developer Portal API** — An alternative spec for the same Marvel Comics catalogue surface.
- **xkcd API** — xkcd exposes a small comics-strip API and pairs naturally with broader comic catalogues.
- **Comic Vine API** — Comic Vine offers a community-curated cross-publisher comic catalogue beyond Marvel.

## FAQ

### Which OpenAPI specification does this Marvel Comics API page describe?

A curated, agent-optimized Jentic OpenAPI 3.0.3 specification covering 39 Marvel Comics API operations. Marvel self-served its own Swagger 1.0 document for the same 39 operations at https://gateway.marvel.com/docs/public, and that endpoint now returns HTTP 500 'Internal server error' on every path, while the developer documentation portal at developer.marvel.com redirects to www.marvel.com. An archived copy of Marvel's own document is still readable in the Wayback Machine at https://web.archive.org/web/20190625221753/http://gateway.marvel.com//docs/public?apikey= (HTTP 200, checked 2026-08-13). The Jentic variant restates that surface as OpenAPI 3.0.3 with typed query parameters, so agents get a document they can load today. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Marvel Comics API use?

Marvel uses three query parameters per request: `apikey` (public key), `ts` (timestamp), and `hash` (md5 of `ts + private_key + public_key`). Through Jentic, all three values are computed and injected at execution time so the agent never handles signing.

### Can I list every comic featuring a specific character with the Marvel Comics API?

Yes. After looking up the character via `GET /characters?name=Spider-Man`, call `GET `/characters/{characterId}/comics`` to retrieve every comic that character appears in, with optional date and series filters.

### What are the rate limits for the Marvel Comics API?

Marvel's developer portal limits each public/private key pair to 3,000 calls per day. Responses include `etag` and Marvel recommends caching with `If-Modified-Since` to reduce burn against the daily quota.

### How do I look up a Marvel character through Jentic?

Run `pip install jentic`, then use Jentic's search with the query 'find marvel character'. Jentic loads the `/characters` operation schema and your agent executes it with the character name - Jentic computes the `apikey`/`ts`/`hash` triplet for you.

### Are there relationship endpoints between resources?

Yes. Each top-level resource exposes nested endpoints such as `/characters/{characterId}/comics`, `/characters/{characterId}/events`, and `/comics/{comicId}/creators`, letting you traverse the catalogue without joining client-side.

### Can I limit what my agent is allowed to do with the Marvel Comics API?

Yes. Because you run Jentic One yourself, your own rules decide which Marvel operations the agent may call, so you can allow only reads like GET /characters, GET /comics, or GET /creators and leave everything else off. Since Marvel puts the resource id in the URL path, such as `/characters/{characterId}` and `/comics/{comicId}`, you can pin the agent to a single character or comic and its related listings. The catalogue surface is read-only, so the agent retrieves data without any write access unless you grant it, and your stored keys are only used for the operations you permit.
