Skip to content

Game Data

Access collections of data such as NPCs, classes, abilities, items, maps, etc. Game data only changes when major game patches are released, so you should cache results for as long as possible and only update when new content is released for the game.

Overview

  • Coverage: 11 endpoints implemented
  • Use Cases: item databases, ability id lookup, etc...
  • Rate Limit Impact: 1-3 points per request (varies by complexity)

Methods

get_abilities()

Purpose: Retrieve a paginated list of all abilities in ESO

ParametersTypeRequiredDescription
limitintNoNumber of abilities to return (default: 100, max: 100)
pageintNoPage number for pagination (default: 1)

Returns: GetAbilities object with the following structure:

FieldTypeDescription
game_data.abilities.dataList[Ability]List of ability objects
game_data.abilities.totalintTotal number of abilities available
game_data.abilities.per_pageintNumber of abilities per page
game_data.abilities.current_pageintCurrent page number
game_data.abilities.has_more_pagesboolWhether more pages are available

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def get_all_abilities():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get first page of abilities
        abilities = await client.get_abilities(limit=50)
        print(f"Found {len(abilities.game_data.abilities.data)} abilities")

        # Show first few abilities
        for ability in abilities.game_data.abilities.data[:3]:
            print(f"- {ability.name} (ID: {ability.id})")

asyncio.run(get_all_abilities())

Output:

Found 3 abilities
- JUST Apprehend Teleport (ID: 2)
- Attack (ID: 3)
- Tool - Range (ID: 37)

Error Handling:

from esologs.exceptions import GraphQLClientHttpError, GraphQLClientGraphQLMultiError
from pydantic import ValidationError

try:
    abilities = await client.get_abilities(limit=200)  # Too high
except GraphQLClientGraphQLMultiError as e:
    print(f"GraphQL error: {e}")  # Server-side validation
except ValidationError as e:
    print(f"Invalid parameters: {e}")
except GraphQLClientHttpError as e:
    if e.status_code == 429:
        print("Rate limit exceeded")

get_ability()

Purpose: Get detailed information about a specific ability by ID

ParametersTypeRequiredDescription
idintYesThe ability ID to retrieve

Returns: GetAbility object with the following structure:

FieldTypeDescription
game_data.ability.idintAbility ID
game_data.ability.namestrAbility name
game_data.ability.descriptionstr | NoneAbility description (may be None)
game_data.ability.iconstrIcon filename

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def get_ability_details():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get a valid ability ID first
        abilities = await client.get_abilities(limit=10)
        valid_ability_id = abilities.game_data.abilities.data[0].id

        # Get specific ability details
        ability = await client.get_ability(id=valid_ability_id)
        if ability.game_data.ability:
            print(f"Ability: {ability.game_data.ability.name}")
            print(f"ID: {ability.game_data.ability.id}")

asyncio.run(get_ability_details())

Output:

Ability: JUST Apprehend Teleport
ID: 2

get_classes()

Purpose: Retrieve all character classes available in ESO

Parameters: None

Returns: GetClasses object with the following structure:

FieldTypeDescription
game_data.classesList[Class]List of class objects (direct list, not paginated)
game_data.classes[].idintClass ID
game_data.classes[].namestrClass name
game_data.classes[].slugstrURL-friendly class identifier

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def list_character_classes():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get all character classes
        classes = await client.get_classes()
        print("Available character classes:")

        for char_class in classes.game_data.classes:
            print(f"- {char_class.name} (ID: {char_class.id})")

asyncio.run(list_character_classes())

Output:

Available character classes:
- Dragonknight (ID: 1)
- Nightblade (ID: 2)
- Necromancer (ID: 3)
- Sorcerer (ID: 4)
- Templar (ID: 5)
- Warden (ID: 6)
- Arcanist (ID: 7)

get_class()

Purpose: Get detailed information about a specific character class

ParametersTypeRequiredDescription
idintYesThe class ID to retrieve

Returns: GetClass object with the following structure:

FieldTypeDescription
game_data.class_.idintClass ID
game_data.class_.namestrClass name
game_data.class_.slugstrURL-friendly class identifier

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def get_class_details():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get Sorcerer class details
        sorcerer = await client.get_class(id=1)
        print(f"Class: {sorcerer.game_data.class_.name}")

asyncio.run(get_class_details())

Output:

Class: Dragonknight

get_items()

Purpose: Retrieve a paginated list of items with optional filtering

ParametersTypeRequiredDescription
limitintNoNumber of items to return (default: 100, max: 100)
pageintNoPage number for pagination (default: 1)

Returns: GetItems object with the following structure:

FieldTypeDescription
game_data.items.dataList[Item]List of item objects
game_data.items.totalintTotal number of items available
game_data.items.per_pageintNumber of items per page
game_data.items.current_pageintCurrent page number
game_data.items.has_more_pagesboolWhether more pages are available

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def browse_items():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get first page of items
        items = await client.get_items(limit=25)
        print(f"Found {len(items.game_data.items.data)} items")

        # Show some item details
        for item in items.game_data.items.data[:5]:
            name = item.name or f"Item_{item.id}"
            print(f"- {name} (ID: {item.id})")

asyncio.run(browse_items())

Output:

Found 3 items
- Item_3 (ID: 3)
- Item_4 (ID: 4)
- Item_5 (ID: 5)

get_item()

Purpose: Get detailed information about a specific item by ID

ParametersTypeRequiredDescription
idintYesThe item ID to retrieve

Returns: GetItem object with the following structure:

FieldTypeDescription
game_data.item.idintItem ID
game_data.item.namestr | NoneItem name (may be None)
game_data.item.iconstr | NoneIcon filename (may be None)
Additional propertiesvariesAdditional item properties depending on item type

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def get_item_details():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get a valid item ID first
        items = await client.get_items(limit=5)
        valid_item_id = items.game_data.items.data[0].id

        # Get specific item details
        item = await client.get_item(id=valid_item_id)
        if item.game_data.item:
            item_name = item.game_data.item.name or f"Item_{item.game_data.item.id}"
            print(f"Item: {item_name}")
            print(f"ID: {item.game_data.item.id}")

asyncio.run(get_item_details())

Output:

Item: Item_3
ID: 3

get_npcs()

Purpose: Retrieve a paginated list of NPCs (Non-Player Characters)

ParametersTypeRequiredDescription
limitintNoNumber of NPCs to return (default: 100, max: 100)
pageintNoPage number for pagination (default: 1)

Returns: GetNPCs object with the following structure:

FieldTypeDescription
game_data.npcs.dataList[NPC]List of NPC objects
game_data.npcs.totalintTotal number of NPCs available
game_data.npcs.per_pageintNumber of NPCs per page
game_data.npcs.current_pageintCurrent page number
game_data.npcs.has_more_pagesboolWhether more pages are available

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def list_npcs():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get NPCs
        npcs = await client.get_npcs(limit=5)
        print(f"Found {len(npcs.game_data.npcs.data)} NPCs")

        # Show NPC names
        for npc in npcs.game_data.npcs.data:
            print(f"- {npc.name} (ID: {npc.id})")

asyncio.run(list_npcs())

Output:

Found 5 NPCs
- Wheels (ID: 1)
- Heals on Wheels (ID: 2)
- Flame Atronach (ID: 3)
- Argonian Behemoth (ID: 4)
- Clannfear (ID: 5)

get_npc()

Purpose: Get detailed information about a specific NPC by ID

ParametersTypeRequiredDescription
idintYesThe NPC ID to retrieve

Returns: GetNPC object with the following structure:

FieldTypeDescription
game_data.npc.idintNPC ID
game_data.npc.namestrNPC name
Additional propertiesvariesAdditional NPC properties (varies by NPC type)

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def get_npc_details():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get a valid NPC ID first
        npcs = await client.get_npcs(limit=5)
        valid_npc_id = npcs.game_data.npcs.data[0].id

        # Get specific NPC details
        npc = await client.get_npc(id=valid_npc_id)
        if npc.game_data.npc:
            print(f"NPC: {npc.game_data.npc.name}")
            print(f"ID: {npc.game_data.npc.id}")

asyncio.run(get_npc_details())

Output:

NPC: Wheels
ID: 1

get_maps()

Purpose: Retrieve all maps/zones available in ESO

Parameters: None

Returns: GetMaps object with the following structure:

FieldTypeDescription
game_data.maps.dataList[Map]List of map objects
game_data.maps.totalintTotal number of maps available
game_data.maps.per_pageintNumber of maps per page
game_data.maps.current_pageintCurrent page number
game_data.maps.has_more_pagesboolWhether more pages are available

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def list_maps():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get maps (returns first page by default)
        maps = await client.get_maps()
        print(f"Found {len(maps.game_data.maps.data)} maps (first page)")

        # Show first few maps
        for game_map in maps.game_data.maps.data[:5]:
            print(f"- {game_map.name} (ID: {game_map.id})")

asyncio.run(list_maps())

Output:

Found 100 maps (first page)
- Glenumbra (ID: 1)
- Edrald Undercroft (ID: 2)
- Wayrest (ID: 3)
- Stormhaven (ID: 4)
- Alcaire Castle (ID: 5)

get_map()

Purpose: Get detailed information about a specific map/zone by ID

ParametersTypeRequiredDescription
idintYesThe map ID to retrieve

Returns: GetMap object with the following structure:

FieldTypeDescription
game_data.map.idintMap ID
game_data.map.namestrMap name
Additional propertiesvariesAdditional map properties (varies by map type)

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def get_map_details():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get a valid map ID first
        maps = await client.get_maps()
        valid_map_id = maps.game_data.maps.data[0].id

        # Get specific map details
        game_map = await client.get_map(id=valid_map_id)
        if game_map.game_data.map:
            print(f"Map: {game_map.game_data.map.name}")
            print(f"ID: {game_map.game_data.map.id}")

asyncio.run(get_map_details())

Output:

Map: Glenumbra
ID: 1

get_factions()

Purpose: Retrieve all factions available in ESO

Parameters: None

Returns: GetFactions object with the following structure:

FieldTypeDescription
game_data.factionsList[Faction]List of faction objects (direct list, not paginated)
game_data.factions[].idintFaction ID
game_data.factions[].namestrFaction name

Example:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def list_factions():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Get all factions
        factions = await client.get_factions()
        print("Available factions:")

        for faction in factions.game_data.factions:
            print(f"- {faction.name} (ID: {faction.id})")

asyncio.run(list_factions())

Output:

Available factions:
- The Aldmeri Dominion (ID: 1)
- The Daggerfall Covenant (ID: 2)
- The Ebonheart Pact (ID: 3)

Common Patterns

Building Item Databases

Efficiently collect and store item information for analysis:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def build_item_database():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        items_database = []
        page = 1

        while True:
            # Get items in batches
            items_response = await client.get_items(limit=100, page=page)
            items = items_response.game_data.items.data

            if not items:
                break

            # Process each item
            for item in items:
                items_database.append({
                    'id': item.id,
                    'name': item.name or f"Item_{item.id}"  # Handle None names
                })

            print(f"Processed page {page}, total items: {len(items_database)}")
            page += 1

            # Respect rate limits
            await asyncio.sleep(0.1)

        print(f"Database complete: {len(items_database)} items")
        return items_database

asyncio.run(build_item_database())

Output:

Processed page 1, total items: 100
Processed page 2, total items: 200
Processed page 3, total items: 300
...
Database complete: 15000 items

Rate Limiting

Game data endpoints are generally low-cost but consider these guidelines:

  • Basic requests (get_classes, get_factions): 1 point each
  • Paginated requests (get_abilities, get_items): 1-2 points each
  • Individual lookups (get_ability, get_item): 1 point each
  • Batch operations: Add delays between requests to avoid hitting limits

Rate Limit Management:

import asyncio

# For bulk operations, add delays
async def respectful_bulk_operation():
    for item_id in large_item_list:
        item = await client.get_item(id=item_id)
        # Process item
        await asyncio.sleep(0.1)  # 100ms delay between requests

Monitor Your Usage:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def monitor_usage():
    token = get_access_token()
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:

        # Check rate limit status
        rate_limit = await client.get_rate_limit_data()
        print(f"Points used: {rate_limit.rate_limit_data.points_spent_this_hour}/18000")

asyncio.run(monitor_usage())