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
JSON-formatted response data
Requires API key authentication

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

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

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

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

Similar APIs

View All →