An API of Ice And Fire API

⭐ Beginner's Pick Video / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

An API of Ice and Fire is a free, open REST API providing comprehensive data from the Game of Thrones universe, including characters, houses, and books from George R.R. Martin's series. No authentication is needed — you can start making requests immediately. It is an excellent beginner API for learning how to work with paginated REST endpoints.

💡

Beginner Tip

Results are paginated by default (20 items per page) — use the ?page=2&pageSize=50 query parameters to navigate through results. The response also includes Link headers with next/previous page URLs, which is great practice for learning pagination patterns.

Available Data

Use case: Integrate game of thrones api data into web and mobile applications
An API of Ice And Fire data via REST API
JSON-formatted response data
Freely accessible without authentication

Example Response

JSON Response
{
  "id": 1,
  "name": "Anof Ice And Fire",
  "data": "Game Of Thrones API",
  "source": "An API of Ice And Fire"
}

Field Reference

url The canonical URL for this specific character, house, or book resource.
name The character's name — may be empty for unnamed characters, check aliases instead.
aliases List of alternate names or titles for the character (e.g., "The Imp", "Kingslayer").
allegiances List of URLs pointing to the houses this character has sworn allegiance to.
titles Official titles held by the character (e.g., "Lord of Winterfell").
born In-universe birth description (e.g., "In 262 AC, at Dragonstone").

Implementation Example

const url = "https://anapioficeandfire.com/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

404 Not Found The character, house, or book ID does not exist.
Use the list endpoints (/api/characters, /api/houses, /api/books) to discover valid IDs before querying specific resources.
Empty name fields Many characters in the series are unnamed or go by aliases.
Check the "aliases" array when the "name" field is empty — most unnamed characters still have aliases listed.
Slow response for large collections The characters endpoint has thousands of records that can be slow without pagination.
Always use pageSize (max 50) and page parameters to fetch data in chunks rather than requesting large datasets at once.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 15/20
✓ Reliability 7/15
Response Time 45ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Video
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →