# Fandom API
> Live community data from Fandom (formerly Wikia), the world's largest network of fan-built wikis: a community's profile and size (pages, articles, edits, images, users, active users, admins), full-text article search, single-page detail (url, length, categories, last edit) and a wiki's live recent-changes activity feed — for any Fandom community by name (minecraft, marvel, starwars, pokemon and tens of thousands more).

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/fandom-api/..."
```

## Pricing
- **Free** (Free) — 6,000 calls/Mo, 2 req/s
- **Basic** ($7/Mo) — 110,000 calls/Mo, 5 req/s
- **Pro** ($20/Mo) — 720,000 calls/Mo, 10 req/s
- **Scale** ($47/Mo) — 4,100,000 calls/Mo, 25 req/s

## Endpoints

### Community

#### `GET /v1/wiki` — A Fandom community profile and size

**Parameters:**
- `wiki` (query, required, string) — Fandom wiki subdomain Example: `minecraft`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fandom-api/v1/wiki?wiki=minecraft"
```

**Response:**
```json
{
    "data": {
        "url": "https://minecraft.fandom.com",
        "name": "Minecraft Wiki",
        "wiki": "minecraft",
        "source": "Fandom",
        "language": "en",
        "statistics": {
            "edits": 2069833,
            "pages": 141987,
            "users": 41251097,
            "admins": 3,
            "images": 75991,
            "articles": 7616,
            "active_users": 83
        }
    },
    "meta": {
        "timestamp": "2026-06-10T14:01:50.031Z",
        "request_id": "f33f7c3b-0e70-49ea-b867-3427b3d842f5"
    },
    "status": "ok",
    "message": "Wiki retrieved successfully",
    "success": true
}
```

### Content

#### `GET /v1/page` — A single article's detail and last edit

**Parameters:**
- `wiki` (query, required, string) — Fandom wiki subdomain Example: `marvel`
- `title` (query, required, string) — Article title Example: `Spider-Man`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fandom-api/v1/page?wiki=marvel&title=Spider-Man"
```

**Response:**
```json
{
    "data": {
        "url": "https://marvel.fandom.com/wiki/Spider-Man",
        "wiki": "marvel",
        "title": "Spider-Man",
        "source": "Fandom",
        "page_id": 8190,
        "language": "en",
        "last_edit": {
            "user": "Nurdboy42",
            "timestamp": "2026-05-31T00:19:52Z"
        },
        "categories": [
            "Disambiguation Pages"
        ],
        "last_touched": "2026-06-03T01:21:39Z",
        "length_bytes": 40491
    },
    "meta": {
        "timestamp": "2026-06-10T14:01:50.528Z",
        "request_id": "ade3821f-9f2f-4574-96c9-64afb4ab95e3"
    },
    "status": "ok",
    "message": "Page retrieved successfully",
    "success": true
}
```

#### `GET /v1/search` — Full-text search a wiki's articles

**Parameters:**
- `wiki` (query, required, string) — Fandom wiki subdomain Example: `marvel`
- `q` (query, required, string) — Search term Example: `spider`
- `limit` (query, optional, string) — Max results (1-50) Example: `10`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fandom-api/v1/search?wiki=marvel&q=spider&limit=10"
```

**Response:**
```json
{
    "data": {
        "wiki": "marvel",
        "count": 10,
        "query": "spider",
        "source": "Fandom",
        "results": [
            {
                "url": "https://marvel.fandom.com/wiki/Spider",
                "title": "Spider",
                "page_id": 43728,
                "snippet": null,
                "last_edit": "2026-06-03T20:22:21Z",
                "size_bytes": 19213,
                "word_count": 2114
            },
            {
                "url": "https://marvel.fandom.com/wiki/Spider-Totems",
                "title": "Spider-Totems",
                "page_id": 906646,
                "snippet": null,
                "last_edit": "2026-05-03T01:43:53Z",
                "size_bytes": 14373,
                "word_count": 1871
            },
            {
                "url": "https://marvel.fandom.com/wiki/Spider_Society_(Earth-616)",
                "title": "Spider Society (Earth-616)",
                "page_id": 35887,
                "snippet": null,
                "last_edit": "2026-04-29T11:03:02Z",
                "size_bytes": 7389,
                "word_count": 1020
            },
            {
                "url": "https://marvel.fandom.com/wiki/Spiders-Man_(Earth-11580)",
                "title": "Spiders-Man (Earth-11580)",
                "page_id": 1220105,
                "snippet": null,
                "last_edit": "2026-05-02T13:49:29Z",
                "size_bytes": 8153,
                "word_count": 1031
   
…(truncated, see openapi.json for full schema)
```

### Activity

#### `GET /v1/activity` — A wiki's live recent-changes feed

**Parameters:**
- `wiki` (query, required, string) — Fandom wiki subdomain Example: `starwars`
- `limit` (query, optional, string) — Max changes (1-50) Example: `15`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fandom-api/v1/activity?wiki=starwars&limit=15"
```

**Response:**
```json
{
    "data": {
        "wiki": "starwars",
        "count": 15,
        "source": "Fandom",
        "changes": [
            {
                "type": "edit",
                "user": "あざした",
                "title": "Dragonsnake",
                "comment": null,
                "is_minor": true,
                "timestamp": "2026-06-10T13:48:09Z",
                "new_length": 10943,
                "is_new_page": false,
                "size_change": 0
            },
            {
                "type": "edit",
                "user": "DokTayss",
                "title": "Category:Jedi Battlemasters",
                "comment": null,
                "is_minor": false,
                "timestamp": "2026-06-10T13:27:59Z",
                "new_length": 249,
                "is_new_page": false,
                "size_change": 6
            },
            {
                "type": "edit",
                "user": "Rsand 30",
                "title": "Thrawn, Vol. 1",
                "comment": "/* Appearances */",
                "is_minor": false,
                "timestamp": "2026-06-10T13:24:38Z",
                "new_length": 6632,
                "is_new_page": false,
                "size_change": -936
            },
            {
                "type": "edit",
                "user": "Rsand 30",
                "title": "Thrawn, Vol. 1",
                "comment": null,
                "is_minor": false,
                "timestamp": "2026-06-10T13:24:23Z",
     
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata and endpoint catalog

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fandom-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "source": "Fandom MediaWiki Action API (<wiki>.fandom.com, live)",
        "service": "fandom-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/page": "An article's url, length, categories and last edit (wiki=marvel, title=Spider-Man).",
            "GET /v1/wiki": "A Fandom community's profile and size (wiki=minecraft).",
            "GET /v1/search": "Full-text search a wiki's articles (wiki=minecraft, q=diamond, limit).",
            "GET /v1/activity": "A wiki's live recent-changes feed (wiki=starwars, limit)."
        },
        "description": "Live community data from Fandom (formerly Wikia), the world's largest network of fan-built wikis, each a fan-run encyclopedia powered by MediaWiki. Every Fandom wiki lives at a subdomain (minecraft, marvel, starwars, pokemon) and this API speaks to any of them by name. The wiki endpoint returns a community's profile and size (pages, articles, edits, images, registered users, active users, admins); the search endpoint full-text searches a wiki's articles; the page endpoint returns one article's url, length, categories, language and most recent edit; the activity endpoint returns a wiki's live recent-changes feed (latest edits, who, when, byte change and summary). Live, no key, nothing stored. Distinct from the Wikipedia, Wikibooks, Wikivoyage and other Wikimedia-project APIs — those are Wikimedia's own reference projects; this is Fandom's network of fan-built c
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/fandom-api
OpenAPI spec: https://www.oanor.com/api/fandom-api/openapi.json
