# Fandom Wiki Search API

> Setting SocialTap up for your user? Follow https://socialtap.dev/setup.md.

Fandom

Returns the pages of a public Fandom wiki that match your words, best match first, from the wiki's name or link, on any language edition. Each page has its id, title, link, type, namespace, size, word count and when it was last edited. Pages follow each other without the rows skipped and repeated by Fandom's own page offsets. [Overview](https://socialtap.dev/apis/fandom/search-wiki-pages/index.md)

GET `/v1/fandom/search_wiki_pages`

> [!NOTE]
>
> **Good to know**
>
> - text, markup, editor and the page's lists are empty or null: the [Fandom Wiki Page API](https://socialtap.dev/docs/reference/fandom/wiki-page/index.md) returns them for each url.
> - Fandom's search stops after the first few thousand results of a search: there the walk ends with platform_limit.
> - A wiki Fandom does not serve, or a language edition the wiki lacks, returns not_found.
> - Fandom's ranking can move a result by a place between pages: one already served is not repeated, and one can, rarely, be passed over.
> - Fandom's firewall refuses a query of script or SQL syntax (\<script>, UNION SELECT): it returns invalid_input.

## Example

cURL:

```shell
curl 'https://socialtap.dev/v1/fandom/search_wiki_pages?query=peely&wiki=fortnite' \
  -H "x-api-key: $SOCIALTAP_API_KEY"
```

TypeScript SDK:

```typescript
// Save this as app.mjs (an ES module) and run: node app.mjs
import { SocialTap } from "socialtap";

const client = new SocialTap(); // apiKey defaults to process.env.SOCIALTAP_API_KEY

const res = await client.fandom.searchWikiPages.list({ query: "peely", wiki: "fortnite" });
console.log(res.data);
console.log(res.credits.charged, res.meta.request_id);
```

Python SDK:

```python
from socialtap import SocialTap

client = SocialTap()  # api_key defaults to os.environ["SOCIALTAP_API_KEY"]

res = client.fandom.search_wiki_pages.list(query="peely", wiki="fortnite")
print(res.data)
print(res.credits.charged, res.meta.request_id)
```

Go SDK:

```go
package main

import (
	"context"
	"fmt"
	"log"

	socialtap "socialtap.dev/sdk/go"
)

func main() {
	ctx := context.Background()
	client, err := socialtap.NewClient() // the API key defaults to $SOCIALTAP_API_KEY
	if err != nil {
		log.Fatal(err)
	}
	res, err := client.Fandom.SearchWikiPages.List(ctx, socialtap.FandomSearchWikiPagesParams{Query: "peely", Wiki: "fortnite"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(res.Data)
	fmt.Println(res.Credits.Charged, res.Meta.RequestID)
}
```

200 OK:

```json
{
  "data": [
    {
      "approximate_fields": [],
      "edit_summary": null,
      "edited_at": "2026-08-31T08:01:08Z",
      "editor": null,
      "html": null,
      "id": "fortnite:11594",
      "markup": null,
      "markup_format": null,
      "platform": "fandom",
      "platform_specific": {
        "fandom": {
          "categories": [],
          "categorized_at": null,
          "description": null,
          "display_title": null,
          "external_links": [],
          "file": null,
          "file_names": [],
          "hidden_categories": [],
          "image_url": null,
          "infoboxes": [],
          "is_redirect": null,
          "language": null,
          "language_links": [],
          "linked_titles": [],
          "namespace": 0,
          "page_id": "11594",
          "redirected_from": null,
          "size_bytes": 40484,
          "templates": [],
          "word_count": 5542
        }
      },
      "revision_id": null,
      "sections": [],
      "text": null,
      "title": "Peely",
      "type": "page",
      "unknown_fields": [
        "sections",
        "platform_specific.fandom.categories",
        "platform_specific.fandom.hidden_categories"
      ],
      "url": "https://fortnite.fandom.com/wiki/Peely",
      "wiki": {
        "id": "440321",
        "name": "fortnite",
        "title": "Fortnite Wiki",
        "url": "https://fortnite.fandom.com"
      }
    }
  ],
  "page": {
    "has_more": true,
    "next_cursor": "c1.EXAMPLE_CURSOR",
    "next_cursor_expires_at": "2026-10-26T12:00:00Z",
    "end_reason": null
  },
  "meta": {
    "request_id": "req_3f9c2a7d1e8b4c6a9f0e2d4b6a8c0e1f",
    "platform": "fandom",
    "source": "api",
    "is_cached": false,
    "credits_charged": 1,
    "latency_ms": 1000,
    "fetched_at": "2026-10-25T12:00:00Z",
    "input": null,
    "credits_remaining": 9999,
    "client_request_id": null,
    "warnings": []
  }
}
```

The first item of the page; long arrays and strings are shortened for display.

## Query parameters

| Name | Type | Description | Example |
| --- | --- | --- | --- |
| `query` required | `string`<br>max 500 chars | Words to find in the wiki's page titles and text, or the wiki's own search link (fortnite.fandom.com/wiki/Special:Search?query=peely), which names the wiki too. A \* ends a word's prefix (pee\*). | `peely` |
| `wiki` required | `string`<br>max 2,048 chars | The wiki to search: its name (fortnite, or fortnite/de for a language edition), its host, or its link, its search page's too. Legacy wikia.com and gamepedia.com links work too. When query is the wiki's search link, wiki must name the same wiki. | `fortnite` |
| `lang` optional | `string`<br>bcp47 | Preferred language: a BCP-47 tag such as en or pt-BR (case-insensitive; _ is read as -). | `en` |
| `namespace` optional | `string` | Only pages in this namespace, by number: 0 articles, 2 user pages, 6 files, 14 categories. Default: 0. | `0` |
| `limit` optional | `integer`<br>min 1<br>max 99 | Items per page, up to the endpoint's page size (the default; larger values are reduced to it). Every page costs the same, so a smaller limit makes a walk cost more. | `99` |
| `cursor` optional | `string` | page.next_cursor from the previous response, with the other parameters unchanged. Omit for the first page. | — |

Every endpoint also accepts [`max_age`](https://socialtap.dev/docs/reference/index.md#common-params), [`max_credits`](https://socialtap.dev/docs/reference/index.md#common-params) and [`fields`](https://socialtap.dev/docs/reference/index.md#common-params).

## Response

`{data, page, meta}`: `data` is an array of [wiki page](https://socialtap.dev/resources/wiki_page/index.md) objects, `page` says how to get the next page. Fields only Fandom has are under `platform_specific.fandom`. [`meta`](https://socialtap.dev/docs/reference/index.md#meta) describes the request.

| Field | Type | Description |
| --- | --- | --- |
| `data[].id` | `string` | Platform-native page ID (string), unique on the platform: the wiki's link key (wiki.name) and the page's number on that wiki, joined by a colon (fortnite:11594; fortnite/de:2536 on the German edition). Stays the same when the page is renamed, where the platform keeps its number; an endpoint that reads a page takes it back as its input. |
| `data[].title` | `string` | The page's title as its wiki names it, with spaces (not the underscores of its link) and its namespace prefix (Category:Outfits). |
| `data[].url` | `string` (uri) | Canonical page URL. |
| `data[].type` | `string` | page: an article or any other page; category: a category's page, which lists its members; file: an uploaded file's page (an image, a video). New values may be added; treat unknown values as page.<br>One of `page`, `category`, `file` |
| `data[].wiki` | `object` | The wiki the page belongs to: its link key and link, and its ID and title when the answer carries them. |
| `data[].wiki.id` | `string` or `null` | The wiki's ID, as the platform's endpoint for the wiki answers it (community.id: Fandom's numeric wiki ID); null when the answer does not carry it. |
| `data[].wiki.name` | `string` | The wiki's link key as its links write it (community.name): fortnite for fortnite.fandom.com, fortnite/de for its German edition at fortnite.fandom.com/de. |
| `data[].wiki.title` | `string` or `null` | The wiki's name as it shows it (community.title: Fortnite Wiki); null when the answer does not carry it. |
| `data[].wiki.url` | `string` (uri) | The wiki's link, where its pages' links start (https://fortnite.fandom.com, or https://fortnite.fandom.com/de for its German edition). |
| `data[].text` | `string` or `null` | The page's readable text as plain text: its body as rendered (templates expanded, tables kept), without navigation, infoboxes or edit links. Not the source (that is markup; a readme's text is its source). Null when the page renders no text, and on lists that don't carry it. |
| `data[].markup` | `string` or `null` | The page's source as its editors wrote it, in its markup (MediaWiki wikitext, Markdown), not rendered: what a readme's text is to a README, with markup_format as its format. Null when the page is empty, on lists, and when the request leaves it out. |
| `data[].markup_format` | `string` or `null` | The markup markup is written in (wikitext: MediaWiki's; rst: reStructuredText; text: plain); null when markup is. New values may be added.<br>One of `wikitext`, `markdown`, `rst`, `asciidoc`, `org`, `text`, `other` |
| `data[].html` | `string` or `null` | The page's body as the wiki renders it, in HTML; links in it are as the wiki wrote them (a relative one resolves against url). Null unless the request asks for it, and when the page renders nothing. |
| `data[].sections` | `object[]` | The page's headings in order, its table of contents; \[\] when it has none (or unknown: see unknown_fields). |
| `data[].sections[].title` | `string` | The heading's text, as plain text. |
| `data[].sections[].level` | `integer` | Heading level, as the HTML heading it renders (1–6: MediaWiki's == Heading == is 2, Markdown's # is 1). |
| `data[].sections[].anchor` | `string` | The heading's anchor: the page's url followed by # and the anchor links to it. |
| `data[].edited_at` | `string` (date-time) or `null` | When the page's current revision was saved, RFC 3339 UTC; null when the answer does not carry it. |
| `data[].editor` | `object` or `null` | The account that saved the current revision; null when the platform names none (an edit made logged out, or a hidden user). |
| `data[].editor.id` | `string` or `null` | Platform-native account ID; null when only the handle is known. |
| `data[].editor.username` | `string` or `null` | Handle without the @; null when the account has none. |
| `data[].editor.display_name` | `string` or `null` | Display name shown on the profile. |
| `data[].editor.url` | `string` (uri) or `null` | Canonical profile URL. |
| `data[].editor.avatar_url` | `string` (uri) or `null` | Profile picture URL. Platform CDN URLs can expire within hours. |
| `data[].editor.is_verified` | `boolean` or `null` | Platform verification badge; null where the platform has no badge. |
| `data[].revision_id` | `string` or `null` | ID of the page's current revision (it changes with every edit); null when the answer does not carry it. |
| `data[].edit_summary` | `string` or `null` | What the editor wrote about the current revision (its edit summary), as written; null when they wrote nothing or the answer does not carry it. |
| `data[].platform_specific.fandom` | `object` or `null` | A Fandom wiki page's own fields. |
| `data[].platform_specific.fandom.page_id` | `string` or `null` | The page's number on its wiki (MediaWiki's page ID: what api.php's pageids and index.php?curid take); numbered per wiki, so the same number names other pages on other wikis. |
| `data[].platform_specific.fandom.language` | `string` or `null` | BCP-47 language the page is written in, as its wiki states it (MediaWiki's page language: de on a German edition); null when not given. |
| `data[].platform_specific.fandom.namespace` | `integer` or `null` | MediaWiki namespace number: 0 articles, 2 user pages, 6 files, 10 templates, 14 categories, odd numbers talk pages, 100 and up the wiki's own. |
| `data[].platform_specific.fandom.display_title` | `string` or `null` | The title as the page displays it, as plain text (it may differ from title in case or styling); null when not shown. |
| `data[].platform_specific.fandom.description` | `string` or `null` | Fandom's short summary of the page (what search results and link previews show); null when it has none. |
| `data[].platform_specific.fandom.image_url` | `string` (uri) or `null` | The page's lead image, as Fandom picks it for previews; null when it has none. |
| `data[].platform_specific.fandom.is_redirect` | `boolean` or `null` | True when the page only redirects to another (on a list that includes redirects). |
| `data[].platform_specific.fandom.redirected_from` | `string` or `null` | The title asked for, when it redirected to this page; null when it did not. |
| `data[].platform_specific.fandom.size_bytes` | `integer` or `null` | Length of the page's wikitext in bytes, as MediaWiki counts it. |
| `data[].platform_specific.fandom.word_count` | `integer` or `null` | Words on the page, as the wiki's search counts them; null outside a search. |
| `data[].platform_specific.fandom.categorized_at` | `string` (date-time) or `null` | On a category's member list, when the page was added to that category, RFC 3339 UTC; null elsewhere. |
| `data[].platform_specific.fandom.categories` | `string[]` | The categories the page shows readers, without the Category: prefix (Outfits); \[\] when none (or unknown: see unknown_fields). |
| `data[].platform_specific.fandom.hidden_categories` | `string[]` | Maintenance categories the page is in but hides from readers, without the Category: prefix; \[\] when none (or unknown: see unknown_fields). |
| `data[].platform_specific.fandom.templates` | `string[]` | Titles of the templates and modules the page uses (Template:Infobox Cosmetics); \[\] when none (or unknown: see unknown_fields). |
| `data[].platform_specific.fandom.linked_titles` | `string[]` | Titles of the wiki's pages this page links to, prefix included; \[\] when none (or unknown: see unknown_fields). |
| `data[].platform_specific.fandom.external_links` | `string[]` | Links from the page to other websites; \[\] when none (or unknown: see unknown_fields). |
| `data[].platform_specific.fandom.file_names` | `string[]` | Names of the files (images, videos) the page shows, without the File: prefix; \[\] when none (or unknown: see unknown_fields). |
| `data[].platform_specific.fandom.language_links` | `object[]` | The same page on the wiki's other language editions; \[\] when none (or unknown: see unknown_fields). |
| `data[].platform_specific.fandom.language_links[].language` | `string` | BCP-47 language of the edition. |
| `data[].platform_specific.fandom.language_links[].title` | `string` | The page's title there. |
| `data[].platform_specific.fandom.language_links[].url` | `string` (uri) or `null` | The page's link there; null when the wiki does not give one. |
| `data[].platform_specific.fandom.infoboxes` | `object[]` | The page's infoboxes (the fact boxes beside an article), structured, in the page's order; \[\] when none (or unknown: see unknown_fields). |
| `data[].platform_specific.fandom.infoboxes[].title` | `string` or `null` | The infobox's heading, usually the subject's name; null when it has none. |
| `data[].platform_specific.fandom.infoboxes[].images` | `object[]` | Pictures the infobox shows, in its order (a gallery's tabs: Icon, Featured); \[\] when none. |
| `data[].platform_specific.fandom.infoboxes[].images[].type` | `string` | Kind of file. New values may be added; treat unknown values as other.<br>One of `image`, `video`, `audio`, `gif` |
| `data[].platform_specific.fandom.infoboxes[].images[].url` | `string` (uri) or `null` | Direct file URL; null when the platform withholds it, or when the link would only work from SocialTap's network or with a login. Often signed and expiring: see expires_at. |
| `data[].platform_specific.fandom.infoboxes[].images[].expires_at` | `string` (date-time) or `null` | When url stops working, RFC 3339 UTC, read from the platform's signed URL; null when unknown or when it does not expire. |
| `data[].platform_specific.fandom.infoboxes[].images[].thumbnail_url` | `string` (uri) or `null` | Poster or preview image URL. |
| `data[].platform_specific.fandom.infoboxes[].images[].width` | `integer` or `null` | Width in pixels. |
| `data[].platform_specific.fandom.infoboxes[].images[].height` | `integer` or `null` | Height in pixels. |
| `data[].platform_specific.fandom.infoboxes[].images[].duration_ms` | `integer` or `null` | Duration in milliseconds (video and audio only). |
| `data[].platform_specific.fandom.infoboxes[].images[].alt_text` | `string` or `null` | Accessibility text provided by the author or platform. |
| `data[].platform_specific.fandom.infoboxes[].images[].file_name` | `string` or `null` | Its file's name on the wiki, without the File: prefix; null when not given. |
| `data[].platform_specific.fandom.infoboxes[].images[].caption` | `string` or `null` | Its caption or tab label; null when none. |
| `data[].platform_specific.fandom.infoboxes[].fields` | `object[]` | Its rows, in display order; \[\] when none. |
| `data[].platform_specific.fandom.infoboxes[].fields[].tab` | `string` or `null` | The tab of a tabbed infobox it sits in; null when the infobox has no tabs. |
| `data[].platform_specific.fandom.infoboxes[].fields[].group` | `string` or `null` | The header it sits under; null when none. |
| `data[].platform_specific.fandom.infoboxes[].fields[].key` | `string` or `null` | The template parameter behind the row (rarity): the same on every page of the wiki that uses the infobox; null when it has none. |
| `data[].platform_specific.fandom.infoboxes[].fields[].label` | `string` or `null` | The row's label as plain text; null when it has none. |
| `data[].platform_specific.fandom.infoboxes[].fields[].value` | `string` | The row's value as plain text (a list's items separated by commas). |
| `data[].platform_specific.fandom.file` | `object` or `null` | On a file's page, the file itself; null on other pages. |
| `data[].platform_specific.fandom.file.url` | `string` (uri) | The file's URL on Fandom's image host. |
| `data[].platform_specific.fandom.file.mime_type` | `string` or `null` | Its MIME type (image/png); null when not given. |
| `data[].platform_specific.fandom.file.size_bytes` | `integer` or `null` | Its size in bytes. |
| `data[].platform_specific.fandom.file.width` | `integer` or `null` | Width in pixels; null for a file without one (audio, a document). |
| `data[].platform_specific.fandom.file.height` | `integer` or `null` | Height in pixels; null for a file without one. |
| `data[].platform_specific.fandom.file.uploaded_at` | `string` (date-time) or `null` | When its current version was uploaded, RFC 3339 UTC. |
| `data[].platform_specific.fandom.file.uploader` | `object` or `null` | The account that uploaded its current version; null when not named. |
| `data[].platform_specific.fandom.file.uploader.id` | `string` or `null` | Platform-native account ID; null when only the handle is known. |
| `data[].platform_specific.fandom.file.uploader.username` | `string` or `null` | Handle without the @; null when the account has none. |
| `data[].platform_specific.fandom.file.uploader.display_name` | `string` or `null` | Display name shown on the profile. |
| `data[].platform_specific.fandom.file.uploader.url` | `string` (uri) or `null` | Canonical profile URL. |
| `data[].platform_specific.fandom.file.uploader.avatar_url` | `string` (uri) or `null` | Profile picture URL. Platform CDN URLs can expire within hours. |
| `data[].platform_specific.fandom.file.uploader.is_verified` | `boolean` or `null` | Platform verification badge; null where the platform has no badge. |
| `data[].approximate_fields` | `string[]` | JSON paths of values the platform rounds or states as display text. \[\] when all exact. |
| `data[].unknown_fields` | `string[]` | JSON paths of lists whose \[\] means unknown, not none (sections on a list of pages). \[\] when every list is known. |

Besides [the errors any request can return](https://socialtap.dev/docs/errors/index.md): [`not_found`](https://socialtap.dev/docs/errors/index.md#not_found) (404) and [`private_or_unavailable`](https://socialtap.dev/docs/errors/index.md#private_or_unavailable) (403) when the item can't be returned; [`invalid_cursor`](https://socialtap.dev/docs/errors/index.md#invalid_cursor) (400).

## Pagination

Send the same request with `cursor` set to `page.next_cursor` until `page.has_more` is `false`. [Pagination](https://socialtap.dev/docs/pagination/index.md)

- **Order**: The wiki's own search ranking, best match first
- **Page size**: Up to 99 wiki pages (the default; `limit` lowers it)
- **Cursor lifetime**: 24 hours

## Pricing

**1 credit** per successful page ($0.75–$1.97 per 1,000). Failed requests are free. [How credits work](https://socialtap.dev/docs/credits/index.md)

Endpoint ID `fandom.search_wiki_pages` · operationId `fandom.search_wiki_pages.list`

---

[HTML version](https://socialtap.dev/docs/reference/fandom/search-wiki-pages/) · [Docs index for AI agents](https://socialtap.dev/llms.txt) · [All docs in one file](https://socialtap.dev/llms-full.txt)
