Getting Started

Pagination

List endpoints return results in pages. Use limit and offset to move through them.

Parameters

ParameterDefaultDescription
limit20Number of items per page, between 1 and 100.
offset0Number of items to skip from the start of the list.

Response format

Every list endpoint returns the same envelope:

FieldTypeDescription
countnumberTotal number of items matching the filters, across all pages.
nextstring | nullURL of the next page, or null on the last page.
previousstring | nullURL of the previous page, or null on the first page.
resultsobject[]The items of the current page, in summary form.
GET /api/v1/weapons?limit=2&offset=4
{
  "count": 252,
  "next": "https://cdn.genshin-api.com/api/v1/weapons?limit=2&offset=6",
  "previous": "https://cdn.genshin-api.com/api/v1/weapons?limit=2&offset=2",
  "results": [
    {
      "id": 5,
      "slug": "hunters-bow",
      "name": "Hunter's Bow",
      "url": "https://cdn.genshin-api.com/api/v1/weapons/hunters-bow",
      "rarity": {
        "id": 1,
        "slug": "1-star",
        "name": "1-Star",
        "url": "https://cdn.genshin-api.com/api/v1/rarities/1-star",
        "icon": "https://cdn.genshin-api.com/rarities/1-star.webp"
      },
      "weaponType": {
        "id": 5,
        "slug": "bow",
        "name": "Bow",
        "url": "https://cdn.genshin-api.com/api/v1/weapon-types/bow",
        "icon": "https://cdn.genshin-api.com/weapon-types/bow.webp"
      },
      "icon": "https://cdn.genshin-api.com/weapons/hunters-bow/icon.webp"
    },
    {
      "id": 6,
      "slug": "silver-sword",
      "name": "Silver Sword",
      "url": "https://cdn.genshin-api.com/api/v1/weapons/silver-sword",
      "rarity": {
        "id": 2,
        "slug": "2-star",
        "name": "2-Star",
        "url": "https://cdn.genshin-api.com/api/v1/rarities/2-star",
        "icon": "https://cdn.genshin-api.com/rarities/2-star.webp"
      },
      "weaponType": {
        "id": 1,
        "slug": "sword",
        "name": "Sword",
        "url": "https://cdn.genshin-api.com/api/v1/weapon-types/sword",
        "icon": "https://cdn.genshin-api.com/weapon-types/sword.webp"
      },
      "icon": "https://cdn.genshin-api.com/weapons/silver-sword/icon.webp"
    }
  ]
}

The next and previous links keep any filters and sorting you used, so you can follow them until next isnull.

Try it

GETcdn.genshin-api.com