← 娱乐

Star Wars 人物详情

GET /starwars/people/:id

按 SWAPI ID 获取特定 Star Wars 角色的详细信息。返回角色的姓名、出生年份、身高、体重、发色、肤色、眼睛颜色、性别、家乡星球详情和出演电影列表。适用于构建角色资料页、Star Wars 数据库和粉丝应用中的详细角色卡片。

参数

id 必填

SWAPI person ID

请求示例

基本用法
curl https://nordapi.ee/api/v1/starwars/people/1
Luke Skywalker (ID 1)
curl https://nordapi.ee/api/v1/starwars/people/1
Darth Vader (ID 4)
curl https://nordapi.ee/api/v1/starwars/people/4
Leia Organa (ID 5)
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
}