# Monitor Task Ad Details

## API Information

- **API Name**: Monitor Task Ad Details
- **Request Method**: POST
- **API URL**: `open-api/v1/monitor/data`
- **Endpoint Path**: `/v3/api/ad-monitor-task/ad-details`
- **Description**:
    - Get monitor ad details
    - Usage Note: `Free`

**Request Headers:**

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

## Request Parameters

### Request Structure

| Parameter | Type   | Description                       | Example                                | Required | Default |
| --------- | ------ | --------------------------------- | -------------------------------------- | -------- | ------- |
| key       | string | User's external API request key   | "your_api_key_here"                   | Yes      |         |
| uri       | string | Endpoint path                     | "/v3/api/ad-monitor-task/ad-details"   | Yes      |         |
| params    | object | Request parameters object         | See parameter list                     | Yes      |         |

### Request Body Parameters (params object)

| Parameter | Type   | Required | Description   |
|-----------|--------|----------|---------------|
| ad_id     | string | true     | Ad ID         |

### Request Example

```bash
curl -X POST "https://www.pipispy.com/open-api/v1/monitor/data" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "key": "your_api_key_here",
    "uri": "/v3/api/ad-monitor-task/ad-details",
    "params": {
      "ad_id": "1160096586185797"
    }
  }'
```

## Response Parameters

### Response Structure

```json
{
  "code": 200,
  "message": "success",
  "data": {},
  "version": "v1",
  "timestamp": null,
  "sign": null,
  "remaining_credits": 9980,
  "consumed_credits": 0,
  "success": true,
  "fail": false
}
```

##### Main Response Fields

| Field Name      | Type    | Description                |
| --------------- | ------- | -------------------------- |
| **ads_history** | object  | Ad history change data     |
| **advertisement**| object  | Ad detailed information    |
| **version**     | string  | API version number         |
| **timestamp**   | long    | Response timestamp         |
| **sign**        | string  | Response signature         |
| **remaining_credits** | number        | Current remaining available credits after this request |
| **consumed_credits**  | number        | Credits consumed by this request                       |
| **success**     | boolean | Request success status     |
| **fail**        | boolean | Request failure status     |

##### Ad History Fields (ads_history)

| Field Name  | Type   | Description                      |
| ----------- | ------ | ------------------------------- |
| ad_cost     | object | Ad spend history data           |
| adset_count | object | Ad set count history data       |

##### History Timeline Fields (timeline)

| Field Name | Type   | Description                   |
| ---------- | ------ | ----------------------------- |
| count      | double | Value                         |
| date       | string | Date (YYYY-MM-DD format)      |

##### Ad Details Fields (advertisement)

| Field Name            | Type   | Description                                          |
| --------------------- | ------ | ---------------------------------------------------- |
| id                    | string | Ad ID, system internal unique identifier            |
| active_days           | long   | Ad running days                                      |
| ad_audience           | object | Ad audience information                              |
| ad_audience_reach     | long   | Ad reach count                                       |
| ad_caption            | string | Ad caption                                           |
| ad_content            | string | Ad copy content                                      |
| ad_cost               | double | Ad spend amount                                      |
| ad_forecast           | long   | Ad forecast status (1:Testing 2:Scaling 3:Winning)  |
| ad_link               | string | Ad link                                              |
| ad_link_description   | string | Ad link description                                  |
| ad_platform           | array  | Ad delivery platform list                           |
| ad_started_at         | long   | Ad creation time                                     |
| ad_status             | long   | Ad status (1:Active 2:Inactive 3:Removed)           |
| ad_title              | string | Ad title                                             |
| adset_count           | long   | Number of ad sets                                    |
| advertiser            | object | Advertiser information                              |
| button_text           | string | Button text                                          |
| button_type           | string | Button type                                          |
| cards                 | array  | Carousel media list                                  |
| country               | array  | Delivery countries list                              |
| first_discovered_at   | long   | Ad first discovered time                             |
| images                | array  | Ad images list                                       |
| landing_page_type     | long   | Landing page type                                    |
| landing_pages         | array  | Landing page URLs list                               |
| language              | string | Ad language                                          |
| last_discovered_at    | long   | Ad last update time                                  |
| latest_actived_at     | long   | Ad last active time                                  |
| media_format          | long   | Media format type                                    |
| products              | array  | Ad products list                                     |
| source_ad_id          | string | Source ad ID                                         |
| store                 | object | Ad store information                                 |
| user_collected        | long   | User collection status (1:Collected 2:Not collected)|
| videos                | array  | Ad videos list                                       |
| size                  | string | Size information                                     |
| clarity               | string | Clarity information                                  |
| aspect_ratio          | string | Aspect ratio information                             |
| ai_analysis           | object | AI analysis results                                  |

##### AI Analysis Object Fields (ai_analysis)

| Field Name                      | Type   | Description                |
| ------------------------------- | ------ | -------------------------- |
| ai_analysis_human_presenter     | string | Whether human presenter    |
| ai_analysis_language            | string | Video language             |
| ai_analysis_main_hook           | string | Main hook content          |
| ai_analysis_script              | string | Video script               |
| ai_analysis_tags                | array  | Video tags list            |

##### Advertiser Information Object Fields (advertiser)

| Field Name            | Type   | Description                      |
| --------------------- | ------ | ------------------------------- |
| id                    | string | Advertiser ID                    |
| name                  | string | Advertiser name                  |
| ad_count              | long   | Advertiser ad count              |
| ad_country            | array  | Advertiser delivery countries    |
| ads_library_link      | string | Ads library link                 |
| adset_count           | long   | Ad set count                     |
| e_commerce_platform   | string | E-commerce platform              |
| like_count            | long   | Like count                       |
| profile_picture_url   | string | Profile picture URL              |
| source_advertiser_id  | string | Source advertiser ID             |
| source_advertiser_link| string | Source advertiser link           |
| user_blocked          | long   | User blocked status (1:Yes 2:No) |

##### Product Information Object Fields (products)

| Field Name           | Type   | Description         |
| -------------------- | ------ | ------------------- |
| id                   | string | Product ID          |
| name                 | string | Product name        |
| ad_count             | long   | Product ad count    |
| category_id          | string | Category ID         |
| category_name        | string | Category name       |
| creation_time        | long   | Creation time       |
| currency             | string | Currency type       |
| image_url            | string | Product image URL   |
| price                | double | Product price       |
| price_usd            | double | Product USD price   |
| source_product_link  | string | Source product link |

##### Store Information Object Fields (store)

| Field Name            | Type   | Description            |
| --------------------- | ------ | ---------------------- |
| id                    | string | Store ID               |
| name                  | string | Store name             |
| ad_count              | long   | Store ad count         |
| categories            | array  | Store categories list   |
| e_commerce_platform   | string | E-commerce platform    |
| e_commerce_types      | array  | E-commerce types list  |
| logo_url              | string | Store logo URL         |
| source_store_link     | string | Source store link      |

##### Store Category Object Fields (categories)

| Field Name | Type   | Description          |
| ---------- | ------ | -------------------- |
| id         | string | Category ID          |
| name_en    | string | Category English name|
| name_zh    | string | Category Chinese name|

##### Video Information Object Fields (videos)

| Field Name | Type   | Description              |
| ---------- | ------ | ------------------------ |
| url        | string | Video URL                |
| cover_url  | string | Cover URL                |
| duration   | long   | Video duration (seconds) |
| width      | long   | Video width              |
| height     | long   | Video height             |

##### Image Information Object Fields (images)

| Field Name | Type   | Description    |
| ---------- | ------ | -------------- |
| url        | string | Image URL      |
| width      | long   | Image width    |
| height     | long   | Image height   |

##### Carousel Media Information Object Fields (cards)

| Field Name | Type   | Description                      |
| ---------- | ------ | -------------------------------- |
| url        | string | Media URL                        |
| cover_url  | string | Cover URL                        |
| duration   | long   | Duration (for video)             |
| width      | long   | Width                            |
| height     | long   | Height                           |
| media_type | long   | Media type (1:Video 2:Image)    |


## Response Example

```json
{
  "code": 200,
  "message": "success",
  "data": {
    "ads_history": {
      "ad_cost": {
        "timeline": [
          {
            "date": "2025-10-23",
            "count": 0.7
          }
        ]
      },
      "adset_count": {
        "timeline": [
          {
            "date": "2025-10-23",
            "count": 5
          }
        ]
      },
      "ad_active_day": {
        "timeline": [
          {
            "date": "2025-10-23",
            "count": 1
          }
        ]
      }
    },
    "advertisement": {
      "country": [
        "NL"
      ],
      "cards": null,
      "ad_caption": "www.coolblue.nl",
      "ad_audience": null,
      "button_type": "ORDER_NOW",
      "language": null,
      "videos": [
        {
          "duration": 15,
          "cover_url": "https://cdn.pipidata.com/images/b29269c786c7f9338b95649e19787a86.png",
          "width": 720,
          "url": "https://cdn.pipidata.com/videos/f3ba152d8c133802075a79fe0b64d8c4.mp4",
          "height": 900
        }
      ],
      "ad_content": "Op zoek naar een snelle printer? Gevonden.",
      "last_discovered_at": 1761203655,
      "ad_title": "Nu besteld in de app, morgen in huis.",
      "ad_cost_min": 0.6,
      "products": null,
      "ad_ended_at": 1761202800,
      "ad_link": "https://www.facebook.com/ads/library/?id=1160096586185797",
      "ad_forecast": 1,
      "id": "1160096586185797",
      "latest_actived_at": 1761202800,
      "ad_link_description": null,
      "landing_page_type": 3,
      "source_ad_id": null,
      "advertiser": {
        "like_count": 463298,
        "profile_picture_url": "https://cdn.pipidata.com/images/b467aa4e0f396674a14f1ffaa99a1d76.png",
        "ad_count": 18788,
        "source_advertiser_id": "422603325536",
        "name": "Coolblue",
        "source_advertiser_link": null,
        "id": "422603325536",
        "ad_country": [
          "NL",
          "BE",
          "HU",
          "DE",
          "ES",
          "AT",
          "IE",
          "LT",
          "RO",
          "SI",
          "GR"
        ],
        "ads_library_link": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=ALL&is_targeted_country=false&media_type=all&search_type=page&view_all_page_id=422603325536",
        "adset_count": null,
        "e_commerce_platform": null
      },
      "images": null,
      "ad_cost": 0.7,
      "first_discovered_at": 1761203655,
      "estimated_conversion_max": 1,
      "landing_pages": [
        "https://www.coolblue.nl/printers/hp/hp-laserjet"
      ],
      "ad_audience_reach": 38,
      "store": null,
      "adset_count": 5,
      "ad_status": 1,
      "media_format": 1,
      "ad_platform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "estimated_conversion_min": 1,
      "impression": 70,
      "button_text": "Order now",
      "ad_started_at": 1761202800,
      "active_days": 1,
      "ad_cost_max": 0.9
    }
  },
  "version": "v1",
  "timestamp": null,
  "sign": null,
  "remaining_credits": 9980,
  "consumed_credits": 0,
  "success": true,
  "fail": false
}
```

## Error Codes

| Error Code | Description           |
| ---------- | --------------------- |
| 200        | Success               |
| 400        | Invalid request parameters |
| 500        | Internal server error |

## Notes
1. The ad ID must be a valid system internal ID
2. URLs in the response are converted to CDN addresses
3. All timestamps are Unix timestamps (seconds)
4. AI analysis fields are only returned for video ads
5. Some fields may be empty depending on ad type and data completeness
