Npcs 请求路由

简介

This route fetches a list of all NPCs that can be found in Elden Ring, and outputs that in JSON format. The user can define his own pagination and also use search queries to find the desired output.

响应

参数名称类型描述
idstringId of the NPC
namestringName of the NPC
imagestringImage URL of the NPC
descriptionstringShort description of the NPC
locationstringWhere the NPC can be found
quotestringIconic quote from that NPC

响应示例

{
success: true,
count: 2,
data: [{
id: "17f69b266a8l0i2okbqoh1wxlp59l",
name: "Thops",
image: "https://eldenring-api.vercel.app/images/npcs/17f69b266a8l0i2okbqoh1wxlp59l.png",
quote: "For a small donation, I'd be happy to share my knowledge.",
location: "Church of Irith in Liurnia of the Lakes",
role: "Sorcery Student"
},
{
id: "17f698fa9a6l0i2oki2yjnuz5pqjrh",
name: "Enia",
image: "https://eldenring-api.vercel.app/images/npcs/17f698fa9a6l0i2oki2yjnuz5pqjrh.png",
quote: "The Fingers guide us all. And you Tarnished, you are here to take, are you not?",
location: "Roundtable Hold",
role: "Finger Reader"
}
]
}

请求路由

请求方法URL描述
GEThttps://eldenring-api.vercel.app/api/npcsThis route retrieves a list of all the NPCs of Elden Ring.
GEThttps://eldenring-api.vercel.app/api/npcs/:npc_idThis route retrieves one Elden Ring NPC using its ID.

请求参数

This route supports the following 请求参数:

参数名称默认值示例URL描述
limit20https://eldenring-api.vercel.app/api/npcs?limit=100This parameter is used to set the maximum amount of items in the response
page0https://eldenring-api.vercel.app/api/npcs?limit=20&page=3This parameter is used no navigate between pages of results
namenonehttps://eldenring-api.vercel.app/api/npcs?name=EniaThis parameter is used to search for fields by their names