# 2. Quick Start

# Quick Start

This section explains how to integrate with the API: prepare the access URL and authentication credentials, obtain the `x-openapi-key`, and send a real request using the example endpoint to quickly verify the call flow and response structure.

---

## 1. Prepare Information

You will need to prepare:

- **Base URL**: `https://api.foxdata.com/apiv1/open-api`
- **License**: Used for authentication
- **API Path**: We recommend starting from “Application Basic Information”

> Note: The authentication method used in this document primarily relies on `x-openapi-key` (see “Authentication and Authorization” below for details).

---
## 2. Obtain License (API Key)

After activating your account in the FoxData Personal Center or through a sales representative, you will receive an authorization key for API calls:

- **Header Name**: `x-openapi-key`
- **Value**: `Your License` (placeholder; the actual value will be the key you receive)

![image.png](https://api.apifox.com/api/v1/projects/4112992/resources/605543/image-preview)

---
## 3. First Call (Recommended Example: App Basic Information)

The following example demonstrates how to “query the basic information of an app in the app store (including title, subtitle, description, images, etc.)”.

- **API Endpoint**: `POST /app/app-info`
- **Authentication**: Include `x-openapi-key` in the request header
- **Request Body**: JSON

cURL Example

```bash
curl -X POST "https://api.foxdata.com/apiv1/open-api/app/app-info" \
  -H "Content-Type: application/json" \
  -H "x-openapi-key: YOUR_LICENSE" \
  -d '{
    "appId": “com.run.tower.defense”,
    "region": "US",
    "language": "en_US"
  }'
```

- `appId`: Application identifier (App ID in the App Store, Bundle ID in Google Play)
- `region`: Country/region (e.g., `US`)
- `language`: Language (optional; e.g., `en_US`)

---
## 4. How to Determine if the Call Was Successful

The API typically returns structured JSON (example):

```json
{
  "code": 200,
  "msg": "success",
  "data": {
    "requestParam": {
      "appId": "com.moye.shelter",
      "region": "US",
      "language": "en_US"
    },
    "result": [
      {
        "appId": "com.moye.shelter",
        "appName": "Gods & Demons",
        "icon": "https://...",
        "subtitle": "...",
        "descriptions": "...",
        "category": "Social Networking",
        "categoryId": "7014",
        "status": "ONLINE"
      }
    ],
    "creditsCost": {
      "requestCredits": 0,
      "baseCredits": 10,
      "extraCredits": 0,
      "totalCostCredits": 10
    }
  }
}
```

- **Success**: Generally indicated by `code=200` and `msg=success` (subject to the actual response from the API)
- **Business data**: Typically found in `data.result`
- **Credits consumed**: Typically found in `data.creditsCost.totalCostCredits`

---

