Resource

Elements

The elemental types of Teyvat. Each element lists the characters that wield it and the enemies that deal its damage.

8items
1filters
2sort fields

Endpoints

GET/api/v1/elementsPaginated list
GET/api/v1/elements/randomRandom item
GET/api/v1/elements/{id or name}Single item

List

Returns a paginated list of elements in summary form.

Query parameters

ParameterDescription
limitItems per page (1-100, default 20)
offsetItems to skip (default 0)
sortOne of id, name. Prefix with - for descending.
namePartial match on the name
GET /api/v1/elements?limit=2
{
  "count": 8,
  "next": "https://cdn.genshin-api.com/api/v1/elements?limit=2&offset=2",
  "previous": null,
  "results": [
    {
      "id": 1,
      "slug": "anemo",
      "name": "Anemo",
      "url": "https://cdn.genshin-api.com/api/v1/elements/anemo",
      "icon": "https://cdn.genshin-api.com/elements/anemo.svg"
    },
    {
      "id": 2,
      "slug": "geo",
      "name": "Geo",
      "url": "https://cdn.genshin-api.com/api/v1/elements/geo",
      "icon": "https://cdn.genshin-api.com/elements/geo.svg"
    }
  ]
}

Single item

Returns the full details of one item, by numeric id or by name. Arrays in the example below are shortened.

Fields

FieldType
idnumber
slugstring
namestring
urlstring
imagesobject
charactersReference[]
enemiesReference[]
GET /api/v1/elements/pyro
{
  "id": 6,
  "slug": "pyro",
  "name": "Pyro",
  "url": "https://cdn.genshin-api.com/api/v1/elements/pyro",
  "images": {
    "icon": "https://cdn.genshin-api.com/elements/pyro.svg"
  },
  "characters": [
    {
      "id": 4,
      "slug": "amber",
      "name": "Amber",
      "url": "https://cdn.genshin-api.com/api/v1/characters/amber",
      "icon": "https://cdn.genshin-api.com/characters/amber/icon.png"
    },
    {
      "id": 8,
      "slug": "xiangling",
      "name": "Xiangling",
      "url": "https://cdn.genshin-api.com/api/v1/characters/xiangling",
      "icon": "https://cdn.genshin-api.com/characters/xiangling/icon.png"
    }
  ],
  "enemies": [
    {
      "id": 13,
      "slug": "large-pyro-slime",
      "name": "Large Pyro Slime",
      "url": "https://cdn.genshin-api.com/api/v1/enemies/large-pyro-slime"
    },
    {
      "id": 15,
      "slug": "pyro-slime",
      "name": "Pyro Slime",
      "url": "https://cdn.genshin-api.com/api/v1/enemies/pyro-slime"
    }
  ]
}

Random

Returns one random item with the same shape as the single item endpoint. Accepts name.

Try it

GETcdn.genshin-api.com