Guild Wars 2 API

Games & Comics / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

The Guild Wars 2 API provides extensive access to in-game data including items, skills, achievements, characters, and trading post prices. Many endpoints are public and require no API key, while account-specific data requires a key generated in the game. It is a well-documented API that is great for intermediate beginners who want to practice working with large game datasets.

Beginner Tip

Most item and world data endpoints work without authentication. Only add an API key when querying personal account data like /v2/characters or /v2/account. Generate a key in-game via Guild Wars 2 > Account > Applications.

Available Data

Use case: Integrate guild wars 2 game information data into web and mobile applications
Guild Wars 2 data via REST API

Example Response

JSON Response
{
  "id": 1,
  "name": "Guild Wars 2",
  "data": "Guild Wars 2 Game Information",
  "source": "Guild Wars 2"
}

Field Reference

id Unique numeric ID of the item or resource in the game database
name Localized display name of the item in the requested language
type Category of the item, e.g. Weapon, Armor, Consumable, Trophy
rarity Rarity tier of the item: Junk, Basic, Fine, Masterwork, Rare, Exotic, Ascended, or Legendary
level Minimum character level required to equip or use the item
vendor_value Coin value when selling the item to an NPC vendor

Implementation Example

Request
const url = "https://wiki.guildwars2.com/wiki/API:Main";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
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

400 Bad Request: invalid key The API key in the Authorization header is malformed or expired
Generate a new API key in the Guild Wars 2 account settings and use the format: Authorization: Bearer YOUR_API_KEY
Empty results for item IDs The numeric IDs passed to the ids parameter do not exist in the current game version
First call /v2/items to get a valid list of all item IDs before requesting specific ones
206 Partial Content Too many IDs were passed in a single request (limit is 200)
Split your ID list into chunks of 200 or fewer and make multiple requests, then combine results

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Games & Comics
Difficulty Intermediate
Verified: 2026-04-04

Related Tags

Similar APIs

View All →