GET /starwars/people/:id
按 SWAPI ID 获取特定 Star Wars 角色的详细信息。返回角色的姓名、出生年份、身高、体重、发色、肤色、眼睛颜色、性别、家乡星球详情和出演电影列表。适用于构建角色资料页、Star Wars 数据库和粉丝应用中的详细角色卡片。
id
必填
SWAPI person ID
| 名称 | 必填 | 默认值 | 描述 |
|---|---|---|---|
id |
是 | - | SWAPI person ID |
curl https://nordapi.ee/api/v1/starwars/people/1
curl https://nordapi.ee/api/v1/starwars/people/1
curl https://nordapi.ee/api/v1/starwars/people/4
curl https://nordapi.ee/api/v1/starwars/people/5
{
"data": {
"birth_year": "19BBY",
"eye_color": "blue",
"films_count": 4,
"gender": "male",
"hair_color": "blond",
"height": "172",
"homeworld": "https://swapi.dev/api/planets/1/",
"mass": "77",
"name": "Luke Skywalker"
},
"success": true
}