# App 详情接口

## 接口信息

- **接口名称**: 获取 App 详情
- **请求方法**: POST
- **接口地址**: `/open-api/v1/data`
- **接口路径**: `/v3/api/open/app/detail`
- **接口描述**: 根据 App ID 获取 App 详细信息
- **价格说明**: 详情接口计费规则： 基础费用：1 credit/次。 免费访问条件（满足其一即可）： 该ID在3天内已获取过详情；该ID在3天内出现在您的榜单列表查询结果中。

**请求头:**

- Content-Type: application/json
- Accept: application/json

## 请求参数

### 请求结构

| 参数名 | 类型   | 描述                        | 示例                      | 必填 | 默认值 |
| ------ | ------ | --------------------------- | ------------------------- | ---- | ------ |
| key    | string | 用户申请的外部 api 请求 key | "your_api_key_here"       | 是   |        |
| uri    | string | 接口路径                    | "/v3/api/open/app/detail" | 是   |        |
| params | object | 接口入参对象                | 见参数列表                | 是   |        |

### 参数列表 (params 对象)

| 参数名 | 类型   | 必填 | 描述   |
| ------ | ------ | ---- | ------ |
| id     | String | 是   | App ID |

### 请求示例

```bash
curl -X POST "https://www.pipispy.com/open-api/v1/data" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "key": "your_api_key_here",
    "uri": "/v3/api/open/app/detail",
    "params": {
      "id": "61d787d667dcc8ca6a82"
    }
  }'
```

## 响应参数

### 响应体结构

```json
{
  "code": 200,
  "message": "success",
  "data": {
    // App详情信息
  },
  "version": "v1",
  "timestamp": null,
  "sign": null,
  "remaining_credits": 9980,
  "consumed_credits": 1,
  "success": true,
  "fail": false
}
```

### 响应字段说明

##### 主要响应字段

| 字段名                        | 类型    | 描述                    |
| ----------------------------- | ------- | ----------------------- |
| id                            | String  | App ID                  |
| name                          | String  | App 名称                |
| icon                          | String  | App 图标 URL            |
| rate                          | Object  | 评分信息                |
| url                           | String  | App 商店链接            |
| app_download_count            | Number  | App 下载次数            |
| app_comment_count             | Number  | App 评论数              |
| desc                          | String  | App 描述                |
| app_system                    | String  | App 系统 (ios/android)  |
| app_store                     | String  | App 商店 (apple/google) |
| app_type                      | String  | App 类型 (app/game)     |
| app_category                  | Object  | App 分类信息            |
| app_create_time               | Number  | App 创建时间 (时间戳)   |
| app_update_time               | Number  | App 更新时间 (时间戳)   |
| ad_platform_list              | Array   | 广告平台列表            |
| app_dev                       | Object  | 开发者信息              |
| is_collection                 | Boolean | 是否收藏                |
| revenue                       | Object  | 收入信息                |
| last_month_app_download_count | Number  | 上月下载次数            |
| images                        | Array   | App 截图列表            |
| all_data_count                | Number  | 总数据量                |
| top_region                    | Array   | 主要地区                |
| top_in_app_purchases          | Array   | 应用内购买信息          |
| keywords                      | Array   | 关键词列表              |

##### 评分信息字段 (rate)

| 字段名 | 类型   | 描述         |
| ------ | ------ | ------------ |
| score  | Number | 评分         |
| count  | Number | 评分数量     |
| rate1  | Number | 1 星评分数量 |
| rate2  | Number | 2 星评分数量 |
| rate3  | Number | 3 星评分数量 |
| rate4  | Number | 4 星评分数量 |
| rate5  | Number | 5 星评分数量 |

##### App 分类信息字段 (app_category)

| 字段名     | 类型   | 描述       |
| ---------- | ------ | ---------- |
| id         | String | 分类 ID    |
| name       | String | 分类名称   |
| type       | String | 分类类型   |
| app_system | String | App 系统   |
| app_store  | String | App 商店   |
| children   | Array  | 子分类列表 |

##### 开发者信息字段 (app_dev)

| 字段名      | 类型   | 描述                  |
| ----------- | ------ | --------------------- |
| id          | String | 开发者 ID             |
| name        | String | 开发者名称            |
| email       | String | 开发者邮箱            |
| url         | String | 开发者 URL            |
| icon        | String | 开发者图标 URL        |
| avatar      | String | 开发者头像 URL        |
| website_url | String | 开发者网站 URL (可选) |

##### 收入信息字段 (revenue)

| 字段名   | 类型   | 描述                |
| -------- | ------ | ------------------- |
| unit     | String | 单位 (cent)         |
| currency | String | 货币类型 (USD 等)   |
| type     | String | 类型 (currency)     |
| value    | Number | 收入值 (以分为单位) |

##### 应用内购买信息字段 (top_in_app_purchases)

| 字段名 | 类型   | 描述         |
| ------ | ------ | ------------ |
| price  | String | 价格范围描述 |

##### 关键词信息字段 (keywords)

| 字段名 | 类型   | 描述           |
| ------ | ------ | -------------- |
| name   | String | 关键词名称     |
| url    | String | 关键词搜索链接 |

##### 响应根级别字段

| 字段名    | 类型        | 描述         |
| --------- | ----------- | ------------ |
| code      | Number      | 响应状态码   |
| message   | String      | 响应消息     |
| data      | Object      | App 详情数据 |
| version   | String      | API 版本号   |
| timestamp | Number/null | 时间戳       |
| sign      | String/null | 签名         |
| remaining_credits | Long    | 当前请求后的剩余可用积分 |
| consumed_credits  | Long    | 本次请求消耗的积分 |
| success   | Boolean     | 请求是否成功 |
| fail      | Boolean     | 请求是否失败 |

### 响应示例

```json
{
  "code": 200,
  "message": "success",
  "data": {
    "id": "69474be0ed2cecb479b1",
    "name": "Stickman vs Monster: Idle RPG",
    "icon": "https://cdn-app.pipispy.com/86f80c31e7712aa1ff486b1ff210028b.jpg",
    "rate": {
      "score": 4.8965516,
      "count": 12565,
      "rate1": 216,
      "rate2": 0,
      "rate3": 0,
      "rate4": 433,
      "rate5": 11916
    },
    "url": "https://play.google.com/store/apps/details?id=com.stickman.monster.epic.stickman.war.shadow.idle.game",
    "app_download_count": 1528081,
    "app_comment_count": 12566,
    "desc": "<b>Idle Gameplay, Epic Rewards</b><br>Stickman vs Monster offers a relaxed and enjoyable gaming experience...",
    "app_system": "android",
    "app_store": "google",
    "app_type": "game",
    "app_category": {
      "id": "googlegame",
      "name": "Game",
      "type": "game",
      "children": [
        {
          "id": "GAME_ROLE_PLAYING",
          "name": "Role Playing",
          "type": "game",
          "app_system": "android"
        }
      ],
      "app_system": "android"
    },
    "app_create_time": 1736218411,
    "app_update_time": 1750895087,
    "ad_platform_list": ["tiktok"],
    "app_dev": {
      "id": "7752608683054605616",
      "name": "Fansipan Limited",
      "email": "support@fansipan.hk",
      "url": "https://play.google.com/store/apps/dev?id=7752608683054605616",
      "icon": "https://cdn-app.pipispy.com/c8bb0c844b7fe66799bed62b7da8a166.jpg",
      "avatar": "https://cdn-app.pipispy.com/c8bb0c844b7fe66799bed62b7da8a166.jpg"
    },
    "is_collection": false,
    "revenue": {
      "unit": "cent",
      "currency": "USD",
      "type": "currency",
      "value": 2000000
    },
    "last_month_app_download_count": 200000,
    "images": [
      "https://cdn-app.pipispy.com/c37bd0ad1bb037fd89f174846d2b434f.jpg",
      "https://cdn-app.pipispy.com/59ba6218aa9ac9c8de05aef730d0f9d9.jpg",
      "https://cdn-app.pipispy.com/f71de19f71464fa8a2070f37362ac812.jpg"
    ],
    "all_data_count": 937,
    "top_region": ["US", "VN", "TW"],
    "top_in_app_purchases": [
      {
        "price": "$1.49 - $99.99 per item"
      }
    ],
    "keywords": [
      {
        "name": "Idle RPG",
        "url": "/store/search?q=Idle+RPG+games&c=apps"
      },
      {
        "name": "Stylized",
        "url": "/store/search?q=Stylized+games&c=apps"
      },
      {
        "name": "Monster",
        "url": "/store/search?q=Monster+games&c=apps"
      },
      {
        "name": "Stickman",
        "url": "/store/search?q=Stickman+games&c=apps"
      }
    ]
  },
  "version": "v1",
  "timestamp": null,
  "sign": null,
  "remaining_credits": 9980,
  "consumed_credits": 1,
  "success": true,
  "fail": false
}
```

## 错误码说明

| 错误码 | 描述                  |
| ------ | --------------------- |
| 200    | 成功                  |
| 400    | 请求参数错误          |
| 401    | 未授权 - API 密钥无效 |
| 404    | 未找到 - App 不存在   |
| 500    | 服务器内部错误        |
