Pagination
List endpoints return results in pages. Use limit and offset to move through them.
Parameters
| Parameter | Default | Description |
|---|---|---|
limit | 20 | Number of items per page, between 1 and 100. |
offset | 0 | Number of items to skip from the start of the list. |
Response format
Every list endpoint returns the same envelope:
| Field | Type | Description |
|---|---|---|
count | number | Total number of items matching the filters, across all pages. |
next | string | null | URL of the next page, or null on the last page. |
previous | string | null | URL of the previous page, or null on the first page. |
results | object[] | The items of the current page, in summary form. |
{
"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.