> For the complete documentation index, see [llms.txt](https://docs.exoclick.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exoclick.com/api/ja/exoclick-gong-kai-api/api-manual-global-stats.md).

# グローバル統計API

このセクションでは、Global Statistics API のリクエストパラメータと結果データについて説明します。

{% hint style="info" %}
statistics API のルート名が変更されました:

* `/statistics/advertiser/...` -> `/statistics/a/...`
* `/statistics/publisher/...` -> `/statistics/p/...`
  {% endhint %}

{% hint style="info" %}
Global Statistics API では、Date、Sites、Zones、Countries、Regions、Sub IDs のスキップされた RTB クエリのみが表示されます。
{% endhint %}

| パラメータ      | 説明                                     | 備考     | 型  |
| ---------- | -------------------------------------- | ------ | -- |
| count      | 結果の合計のみを返します。                          | 整数     | 任意 |
| detailed   | 可能であれば、より詳細な情報を取得します。                  | 整数     | 任意 |
| timezone   | 'hour' フィルターと 'group\_by' のタイムゾーン設定    | 文字列    | 任意 |
| totals     | 応答に合計を追加するかどうかを示します。                   | 整数     | 任意 |
| filter     | 統計クエリの返却値を絞り込むためのフィルター                 | オブジェクト | 任意 |
| group\_by  | データに適用する group by 値の一覧。最大 4 件まで指定できます。 | 配列     | 必須 |
| order\_by  | 特定のフィールドによる結果の並び順。最大 2 件まで指定できます。      | 配列     | 任意 |
| projection | 応答で返却したい個々のサブ構造。                       | 配列     | 任意 |
| limit      | このレスポンスで返却するレコード数。                     | 整数     | 任意 |
| offset     | レコードを取得する開始位置。                         | 整数     | 任意 |

## パラメータ数

|        |               |
| ------ | ------------- |
| プロパティ  | count         |
| 型      | 任意            |
| 変数の型   | 整数            |
| デフォルト値 | 0             |
| 利用可能な値 | \[0, 1]       |
| 説明     | 結果の合計のみを返します。 |

#### 例:

```json
{
    "count": 1
}
```

## パラメータ detailed

|        |              |
| ------ | ------------ |
| プロパティ  | detailed     |
| 型      | 任意           |
| 変数の型   | 整数           |
| デフォルト値 | 0            |
| 利用可能な値 | \[0, 1]      |
| 説明     | 詳細情報を返すかどうか。 |

#### 例:

```json
{
    "detailed": 1
}
```

## パラメータ timezone

timezone のタイムゾーン設定 `hour` filter と `group_by`.

|        |                                                            |
| ------ | ---------------------------------------------------------- |
| プロパティ  | timezone                                                   |
| 型      | 任意                                                         |
| 変数の型   | 文字列                                                        |
| デフォルト値 | America/New\_york                                          |
| 利用可能な値 | /collections/timezones の timezone フィールドを設定します              |
| 説明     | 注意: タイムゾーンは、時間単位のデータに基づいてクエリする場合にのみ関連し、時間単位以外のデータでは何もしません。 |

#### 例:

```json
{
    "timezone": "Europe/Dublin"
}
```

## パラメータ totals

|        |                      |
| ------ | -------------------- |
| プロパティ  | totals               |
| 型      | 任意                   |
| 変数の型   | 整数                   |
| デフォルト値 | 0                    |
| 利用可能な値 | \[0,1]               |
| 説明     | 応答に合計を追加するかどうかを示します。 |

#### 例:

```json
{
    "totals": 1
}
```

## パラメータ filter

|                      |                                                                                                                                                                                                                                                                                                                                                                                                                |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| プロパティ                | filter                                                                                                                                                                                                                                                                                                                                                                                                         |
| 型                    | 任意                                                                                                                                                                                                                                                                                                                                                                                                             |
| 変数の型                 | オブジェクト                                                                                                                                                                                                                                                                                                                                                                                                         |
| 広告主向けの利用可能なオプション     | \[”adblock”, ”advertiser\_ad\_type\_id”, “browser\_id”, “carrier\_id”, “category\_id”, “country\_iso”, “date\_from”, “date\_to”, “device\_id”, “device\_type\_id”, hour”, “language\_id”, “operating\_system\_id”, “region\_id”, “site\_hostname”, “site\_id”, “size”, “sub”, “zone\_id”, “campaign\_group\_id”, “campaign\_id”, “exclude\_deleted”, “offer\_id”, “offer\_landing\_page\_id”, “variation\_id”] |
| パブリッシャー向けの利用可能なオプション | \[”adblock”, “browser\_id”, “carrier\_id”, “category\_id”, “country\_iso”, “date\_from”, “date\_to”, “device\_id”, “device\_type\_id”, “hour”, “language\_id”, “operating\_system\_id”, “region\_id”, “site\_hostname”, “site\_id”, “zone\_id”, “publisher\_ad\_type\_id”, “size”, “sub”]                                                                                                                      |
| 説明                   | 特定のパラメータでフィルターします。                                                                                                                                                                                                                                                                                                                                                                                             |

### フィルター: `country_iso`

|        |                                                     |
| ------ | --------------------------------------------------- |
| プロパティ  | country\_iso                                        |
| 型      | 任意                                                  |
| 変数の型   | 文字列                                                 |
| デフォルト値 | -                                                   |
| 利用可能な値 | /collections/countries エンドポイントの iso3 プロパティを参照してください |
| 説明     | ISO 3 コード一覧                                         |

#### 例:

```json
{
    "filter": {
        "country_iso": ["ESP", "IRL"]
    }
}
```

### フィルター `date_from`, `date_to`

その `date_from` および `date_to` これらのパラメータは、統計情報を取得する期間を制御します。

* date\_from: 統計の開始日範囲（デフォルトは月初）,
* date\_to: 統計の終了日範囲（デフォルトは今日）

|        |                             |
| ------ | --------------------------- |
| プロパティ  | date\_from, date\_to        |
| 型      | 任意                          |
| 変数の型   | 文字列                         |
| デフォルト値 | 日付はデフォルトで当月になります。           |
| 利用可能な値 | YYYY-mm-dd                  |
| 説明     | 統計の開始日/終了日範囲。形式は YYYY-mm-dd |

#### 例:

```json
{
    "filter": {
        "date_from": "2019-02-25",
        "date_to": "2019-02-28"
    }
}
```

タイムゾーンは、時間単位のデータに基づいてクエリする場合にのみ関連し、時間単位以外のデータでは何もしません。

### フィルター: advertiser\_ad\_type\_id, campaign\_group\_id, campaign\_id, browser\_id, carrier\_id, category\_id, device\_id, device\_type\_id, language\_id, offer\_id, offer\_landing\_page\_id, operating\_system\_id, hour, region\_id, site\_id, sub, variation\_id, zone\_id, publisher\_ad\_type\_id

|        |                                                                                                                                                                                                                                                                                                                          |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| プロパティ  | advertiser\_ad\_type\_id, campaign\_group\_id, campaign\_id, browser\_id, carrier\_id, category\_id, device\_id, device\_type\_id, language\_id, offer\_id, offer\_landing\_page\_id, operating\_system\_id, hour, region\_id, site\_id, sub, variation\_id, zone\_id, advertiser\_ad\_type\_id, publisher\_ad\_type\_id |
| 型      | 任意                                                                                                                                                                                                                                                                                                                       |
| 変数の型   | 配列                                                                                                                                                                                                                                                                                                                       |
| アイテムの型 | 整数                                                                                                                                                                                                                                                                                                                       |
| デフォルト値 | -                                                                                                                                                                                                                                                                                                                        |
| 利用可能な値 | 関連プロパティ または コレクション                                                                                                                                                                                                                                                                                                       |
| 説明     | エンティティ ID の一覧                                                                                                                                                                                                                                                                                                            |

#### 例:

```json
{
    "filter": {
        "campaign_id": [123, 456],
        "browser_id": [789]
    }
}
```

### フィルター: `exclude_deleted`

|        |                      |
| ------ | -------------------- |
| プロパティ  | exclude\_deleted     |
| 型      | 任意                   |
| 変数の型   | 整数                   |
| デフォルト値 | 0                    |
| 利用可能な値 | \[0, 1]              |
| 説明     | 削除済みキャンペーンを除外するかどうか。 |

#### 例:

```json
{
    "filter": {
        "exclude_deleted": 1
    }
}
```

### フィルター: `adblock`

|        |                              |
| ------ | ---------------------------- |
| プロパティ  | adblock                      |
| 型      | 任意                           |
| 変数の型   | 文字列                          |
| デフォルト値 | "all"                        |
| 利用可能な値 | "adblock", "all", "standard" |
| 説明     | adblock ゾーンを含めるかどうか。         |

#### 例:

```json
{
    "filter": {
        "adblock": "standard"
    }
}
```

### フィルター: `site_hostname`

|        |                                                     |
| ------ | --------------------------------------------------- |
| プロパティ  | site\_hostname                                      |
| 型      | 任意                                                  |
| 変数の型   | 文字列                                                 |
| デフォルト値 | -                                                   |
| 利用可能な値 | ホスト名として有効な文字は、a から z までの英字、0 から 9 までの数字、ハイフン、ドットです。 |
| 説明     | サイトのホスト名でフィルターします。                                  |

#### 例:

```json
{
    "filter": {
        "site_hostname": ["www.example.com", "www.example-site.org"]
    }
}
```

### フィルター: `size`

|        |                                              |
| ------ | -------------------------------------------- |
| プロパティ  | size                                         |
| 型      | 任意                                           |
| 変数の型   | 文字列                                          |
| デフォルト値 | -                                            |
| 利用可能な値 | size に有効な文字は、0 から 9 までの数字と x 文字です。例: 300x100 |
| 説明     | size でフィルターします                               |

#### 例:

```json
{
    "filter": {
        "size": ["300x100"]
    }
}
```

## パラメータ group\_by

|                  |                                                                                                                                                                                                                                                                                                                                                                                                            |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| プロパティ            | group\_by                                                                                                                                                                                                                                                                                                                                                                                                  |
| 型                | 必須                                                                                                                                                                                                                                                                                                                                                                                                         |
| 変数の型             | 配列                                                                                                                                                                                                                                                                                                                                                                                                         |
| アイテムの型           | 文字列                                                                                                                                                                                                                                                                                                                                                                                                        |
| デフォルト値           | -                                                                                                                                                                                                                                                                                                                                                                                                          |
| 広告主向けの利用可能な値     | \[”adblock”, “advertiser\_ad\_type\_id”, browser\_id”, “idcampaign\_group“, “campaign\_id”, “carrier\_id”, “category\_id”, “country\_iso”, “date”, “hour”, “device\_id”, “device\_type\_id”, “language\_id”, “operating\_system\_id”, “region\_id”, “site\_id”, “sub”, “zone\_id”, “week”, “month”, “quarter”, “year”, “offer\_id”, “offer\_landing\_page\_id”, “site\_hostname”, “size”, “variation\_id”] |
| パブリッシャー向けの利用可能な値 | \[“adblock”, “browser\_id”, “carrier\_id”, “category\_id”, “country\_iso”, “date”, “device\_id”, “device\_type\_id”, “hour”, “language\_id”, “operating\_system\_id”, “publisher\_ad\_type\_id” “region\_id”, “site\_id”, “size”, “sub”, “zone\_id”, “week”, “month”, “quarter”, “year”]                                                                                                                   |
| 説明               | 追加データを応答に含めるためのサブリクエスト一覧。                                                                                                                                                                                                                                                                                                                                                                                  |

#### 例:

```json
{
  "group_by": [
    "browser",
    "date"
  ]
}
```

## パラメータ order\_by

| プロパティ                                  | order\_by                                                                                                                                                                                                                                                                                                                                                        |
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 型                                      | 任意                                                                                                                                                                                                                                                                                                                                                               |
| 変数の型                                   | 配列                                                                                                                                                                                                                                                                                                                                                               |
| アイテムの型                                 | 文字列                                                                                                                                                                                                                                                                                                                                                              |
| デフォルト値                                 | -                                                                                                                                                                                                                                                                                                                                                                |
| 利用可能なメトリクス項目値                          | \[“cpc”, “cpc”, “cpm”, “cpv”, “ctr”, “clicks”, “impressions”, “video\_impressions”, “video\_views”, “vtr”, “rtb\_win\_ratio”, “rtb\_avg\_total\_time”, “rtb\_skipped”, “rtb\_bid\_response\_ratio”, “rtb\_avg\_cpm”, “rtb\_timeouts\_ratio”, “rt\_errors\_ratio”, “rtb\_no\_bid\_ratio”, “rtb\_skipped\_ratio”]                                                  |
| 広告主向けの \`group\_by\` に依存する利用可能な項目値     | \[”adblock”, “browser\_id”, “campaign\_id”, “carrier\_id”, “category\_id”, “country\_iso”, “device\_id”, “date”, “device\_type\_id”, “hour”, “ecpa1”, “g1”,“language\_id”, “month”, “offer\_id”, “offer\_landing\_page\_id”, “operating\_system\_id”, “quarter”, “region\_id”, “site\_hostname”, “site\_id”, “sub”, “variation\_id”, “week”, “year” ,“zone\_id”] |
| パブリッシャー向けの \`group\_by\` に依存する利用可能な項目値 | \[“adblock”, “browser\_id”, “carrier\_id”, “category\_id”, “country\_iso”, “device\_id”, “date”, “device\_type\_id” , “hour”, “language\_id”, “month”, “operating\_system\_id”, “quarter”, “region\_id”, “site\_id”, “sub”, “week”, “year”, “zone\_id”]                                                                                                          |
| 利用可能な order 値                          | \[“asc”, “desc”]                                                                                                                                                                                                                                                                                                                                                 |
| 説明                                     | 利用可能な order\_by オプション一覧                                                                                                                                                                                                                                                                                                                                          |

{% hint style="info" %}
**ヒント**:

* メトリクス項目は、常に order\_by フィールドとして使用できます。
* 特定の値（たとえば “browser\_id”）で並べ替えるには、“group\_by” パラメータに含める必要があります。
  {% endhint %}

“g1”, “ecpa1” の値は、ユーザーがコンバージョントラッキング（Goals）を有効にしている場合にのみ利用できます。シリアル番号（g1, g2, …gx）に関連付けられたすべての goals。eCPA 値はそれぞれ ecpa1, ecpa2, …ecpax です。

#### 例:

```json
{
  "order_by": [
    {
      "field": "impressions",
      "order": "desc"
    }
  ]
}
```

キャンペーン結果を時系列で並べるには、“date” を “group\_by” と “order\_by” の両方に含める必要があります:

```json
{
  "group_by": [
    "campaign_id",
    "date"
  ],
  "order_by": [
    {
      "field": "date",
      "order": "asc"
    }
  ]
}
```

## パラメータ projection

projection パラメータは、結果ペイロードに何が返されるかを示します。指定しない場合は、すべてのサブ構造が返されます。

| プロパティ              | projection                           |
| ------------------ | ------------------------------------ |
| 型                  | 任意                                   |
| 変数の型               | オブジェクト                               |
| アイテムの型             | 配列                                   |
| デフォルト値             | すべてのオプション、以下を参照                      |
| 広告主向けの利用可能な項目値     | \[“base”, “rtb”, “video”, “goals\*”] |
| パブリッシャー向けの利用可能な項目値 | \[“base”, “rtb”, “video”, “wpn”]     |

\*「profit」や「roi」のような一部の "goal" フィールドは、キャンペーンのコストに基づいて計算されるため、正しい "goals" メトリクスを受け取りたい場合は "base" フィールドも使用する必要があります。

#### 例:

広告主として可能なすべてのメトリクスを受け取るには、次を使用します:

```json
{
    "projection": {
      "base": ["*"],
      "video": ["*"],
      "goals": ["*"],
      "rtb": ["*"]
    }
}
```

パブリッシャーとして可能なすべてのメトリクスを受け取るには、次を使用します:

```json
{
    "projection": {
      "base": ["*"],
      "video": ["*"],
      "wpn": ["*"],
      "rtb": ["*"]
    }
}
```

各 projection フィールド内でメトリクスを指定することもできます:

```json
{
    "projection": {
      "base": ["impressions","clicks","cost","revenue","cpc","cpm","ctr"],
      "video": ["impressions","views","cpv","vtr"],
      "rtb": ["total_time","queries","value","success","no_bid","skipped","errors","timeouts","wins","win_ratio"],
      //パブリッシャーのみ
      "wpn": ["subscriptions","unsubscriptions","sent"]
    }
}
```

個別のメトリクス projection を許可しない唯一のフィールドは "goals" です

## パラメータ limit

このレスポンスで返却するレコード数。

|        |       |
| ------ | ----- |
| プロパティ  | limit |
| 型      | 任意    |
| 変数の型   | 整数    |
| デフォルト値 | 50    |

#### 例:

```json
{
    "limit": 25
}
```

## パラメータ offset

レコードを取得する開始位置。

|        |        |
| ------ | ------ |
| プロパティ  | offset |
| 型      | 任意     |
| 変数の型   | 整数     |
| デフォルト値 | 0      |

#### 例

```json
{
    "offset": 150
}
```

## 例 1

フィルタリング付きの広告主キャンペーン統計。

#### リクエスト:

```json
{
    "detailed": true,
    "totals": 1,
    "filter": {
      "date_from": "2019-03-10",
      "date_to": "2019-03-11",
      "country_iso": ["USA"]
    },
    "group_by": ["campaign_id"],
    "order_by": [
      {
        "field": "campaign_id",
        "order": "desc"
      }
    ]
    "projection": {
        "base": ["*"],
        "video": ["*"],
        "rtb": ["*"]
      },
    "limit": 2,
    "offset": 0
  }
```

#### レスポンス:

```json
{
  "request_metadata": {
    "count": 4,
    "limit": 2,
    "offset": 0
  },
  "result": [
    {
      "clicks": 0,
      "cost": 1.3302,
      "cpc": 0,
      "cpm": 0.45586017820425,
      "ctr": 0,
      "group_by": {
        "campaign_id": {
          "active": "1",
          "campaign_ad_type_name": "Popunders",
          "id": "1234567",
          "name": "Ron Mainstream Campaign "
        }
      },
      "impressions": 2918,
      "rtb": {
        "avg_cpm": 0.15582967823432,
        "avg_total_time": 89.522714492492,
        "errors": 112,
        "errors_ratio": 0.011368411650186,
        "no_bid": 870594,
        "no_bid_ratio": 88.368490823053,
        "queries": 985186,
        "response_ratio": 11.57101298638,
        "skipped": 0,
        "skipped_ratio": 0,
        "success": 984590,
        "timeouts": 484,
        "timeouts_ratio": 0.049127778916875,
        "total_time": 88196525,
        "value": 1776.396,
        "win_ratio": 0.29842080581738,
        "wins": 2940
      },
      "video": {
        "cpv": 0,
        "impressions": 0,
        "views": 0,
        "vtr": 0
      }
    },
    {
      "clicks": 0,
      "cost": 18.1621655,
      "cpc": 0,
      "cpm": 1.8273634671496,
      "ctr": 0,
      "group_by": {
        "campaign_id": {
          "active": "1",
          "campaign_ad_type_name": "Popunders",
          "id": "7654321",
          "name": "Ron Mainstream Campaign Test"
        }
      },
      "impressions": 9939,
      "rtb": {
        "avg_cpm": 1.4753505300475,
        "avg_total_time": 88.777190144965,
        "errors": 46,
        "errors_ratio": 0.0014192869995779,
        "no_bid": 3209674,
        "no_bid_ratio": 99.031490893114,
        "queries": 3241064,
        "response_ratio": 0.8964340105595,
        "skipped": 0,
        "skipped_ratio": 0,
        "success": 3238728,
        "timeouts": 2290,
        "timeouts_ratio": 0.070655809326814,
        "total_time": 287732555,
        "value": 4286.48343,
        "win_ratio": 0.30665855410445,
        "wins": 9939
      },
      "video": {
        "cpv": 0,
        "impressions": 0,
        "views": 0,
        "vtr": 0
      }
    }
  ],
  "result_total": {
    "clicks": 0,
    "cost": 74.0473595,
    "cpc": 0,
    "cpm": 2.0864288391096,
    "ctr": 0,
    "impressions": 35490,
    "rtb": {
      "avg_cpm": 0.23441613972984,
      "avg_total_time": 87.995789332859,
      "errors": 539,
      "errors_ratio": 0.0049868154705264,
      "no_bid": 9771471,
      "no_bid_ratio": 90.405422546568,
      "queries": 10808501,
      "response_ratio": 9.5135301370653,
      "skipped": 0,
      "skipped_ratio": 0,
      "success": 10799741,
      "timeouts": 8221,
      "timeouts_ratio": 0.07606050089647,
      "total_time": 951102577,
      "win_ratio": 0.32861171035651,
      "wins": 35518
    },
    "video": {
      "cpv": 0,
      "impressions": 0,
      "views": 0,
      "vtr": 0
    }
  }
}
```

## 例 2

当月の、impressions で並べ替えた日付別広告主統計。

#### リクエスト:

```json
{
  "group_by": ["date"],
  "order_by": [
    {
      "field": "impressions",
      "order": "desc"
    }
  ]
  "projection": {
      "base": ["*"],
      "video": ["*"],
      "rtb": ["*"]
    }
}
```

#### レスポンス:

```json
{
  "request_metadata": {
    "count": 3,
    "limit": 50,
    "offset": 0
  },
  "result": [
    {
      "clicks": 0,
      "cost": 624.2439917,
      "cpc": 0,
      "cpm": 1.0978015474007,
      "ctr": 0,
      "group_by": {
        "date": {
          "date": "2019-03-02"
        }
      },
      "impressions": 568631,
      "rtb": {
        "avg_cpm": 0.31273156270632,
        "avg_total_time": 114.34705591799,
        "errors": 4143,
        "errors_ratio": 0.0076578188576312,
        "no_bid": 48085697,
        "no_bid_ratio": 88.8804144989,
        "queries": 54101567,
        "response_ratio": 10.971772776933,
        "skipped": 0,
        "skipped_ratio": 0,
        "success": 54021598,
        "timeouts": 75826,
        "timeouts_ratio": 0.14015490530986,
        "total_time": 6186354907,
        "value": 185634.35958,
        "win_ratio": 1.1633248996281,
        "wins": 629377
      },
      "video": {
        "cpv": 0,
        "impressions": 0,
        "views": 0,
        "vtr": 0
      }
    },
    {
      "clicks": 0,
      "cost": 622.1688691,
      "cpc": 0,
      "cpm": 1.1800128762878,
      "ctr": 0,
      "group_by": {
        "date": {
          "date": "2019-03-01"
        }
      },
      "impressions": 527256,
      "rtb": {
        "avg_cpm": 0.27775587567531,
        "avg_total_time": 118.91585420372,
        "errors": 2954,
        "errors_ratio": 0.0078196779097434,
        "no_bid": 32641750,
        "no_bid_ratio": 86.407573260111,
        "queries": 37776492,
        "response_ratio": 13.412992397494,
        "skipped": 0,
        "skipped_ratio": 0,
        "success": 37708708,
        "timeouts": 64830,
        "timeouts_ratio": 0.17161466448499,
        "total_time": 4492223815,
        "value": 140737.73563,
        "win_ratio": 1.4077723257099,
        "wins": 531807
      },
      "video": {
        "cpv": 0,
        "impressions": 0,
        "views": 0,
        "vtr": 0
      }
    },
    {
      "clicks": 0,
      "cost": 441.843491,
      "cpc": 0,
      "cpm": 0.96186339096399,
      "ctr": 0,
      "group_by": {
        "date": {
          "date": "2019-03-03"
        }
      },
      "impressions": 459362,
      "rtb": {
        "avg_cpm": 0.26462497173837,
        "avg_total_time": 116.9210100884,
        "errors": 2183,
        "errors_ratio": 0.0059889808787451,
        "no_bid": 32174177,
        "no_bid_ratio": 88.268681100486,
        "queries": 36450275,
        "response_ratio": 11.500815837466,
        "skipped": 0,
        "skipped_ratio": 0,
        "success": 36366256,
        "timeouts": 81836,
        "timeouts_ratio": 0.22451408116948,
        "total_time": 4261802971,
        "value": 110932.87869,
        "win_ratio": 1.2852029237091,
        "wins": 468460
      },
      "video": {
        "cpv": 0,
        "impressions": 0,
        "views": 0,
        "vtr": 0
      }
    }
  ]
}
```

## 例 3

date と region\_id によるパブリッシャー統計。インプレッション順。

#### リクエスト:

```json
{
  "detailed": true,
  "filter": {
    "date_from": "2019-03-10",
    "date_to": "2019-03-11",
    "country_iso": ["USA"]
  },
  "group_by": ["date", "region_id"],
  "order_by": [
    {
      "field": "impressions",
      "order": "desc"
    }
  ],
  "projection": {
    "base": ["*"],
    "video": ["*"],
    "wpn": ["*"],
    "rtb": ["*"]
  }
  "limit": 30,
  "offset": 0
}
```

#### レスポンス:

```json
{
  "request_metadata": {
    "count": 2,
    "limit": 30,
    "offset": 0
  },
  "result": [
    {
      "clicks": 3087,
      "cpc": 0.033842716164561,
      "cpm": 0.069188574849649,
      "ctr": 0.20444155402072,
      "group_by": {
        "date": {
          "date": "2019-03-11"
        },
        "region_id": {
          "country_iso": "USA",
          "country_long_name": "アメリカ合衆国",
          "country_short_name": "アメリカ合衆国",
          "id": 5332921,
          "name": "カリフォルニア"
        }
      },
      "impressions": 1494954,
      "revenue": 104.4724648,
      "rtb": {
        "avg_cpm": 0,
        "avg_total_time": 0,
        "bid_response_ratio": 0,
        "errors": 0,
        "errors_ratio": 0,
        "no_bid": 0,
        "no_bid_ratio": 0,
        "queries": 0,
        "skipped": 0,
        "skipped_ratio": 0,
        "success": 0,
        "timeouts": 0,
        "timeouts_ratio": 0,
        "total_time": 0,
        "value": 0,
        "win_ratio": 0,
        "wins": 0
      },
      "video": {
        "cpv": 0.038451404048583,
        "impressions": 15013,
        "views": 2717,
        "vtr": 18.097648704456
      },
      "wpn": {
        "subscriptions": 0,
        "unsubscriptions": 0
      }
    },
    {
      "clicks": 3071,
      "cpc": 0.03151133555845,
      "cpm": 0.066658890819906,
      "ctr": 0.21153940205505,
      "group_by": {
        "date": {
          "date": "2019-03-10"
        },
        "region_id": {
          "country_iso": "USA",
          "country_long_name": "アメリカ合衆国",
          "country_short_name": "アメリカ合衆国",
          "id": 5332921,
          "name": "カリフォルニア"
        }
      },
      "impressions": 1436818,
      "revenue": 96.7713115,
      "rtb": {
        "avg_cpm": 0,
        "avg_total_time": 0,
        "bid_response_ratio": 0,
        "errors": 0,
        "errors_ratio": 0,
        "no_bid": 0,
        "no_bid_ratio": 0,
        "queries": 0,
        "skipped": 0,
        "skipped_ratio": 0,
        "success": 0,
        "timeouts": 0,
        "timeouts_ratio": 0,
        "total_time": 0,
        "value": 0,
        "win_ratio": 0,
        "wins": 0
      },
      "video": {
        "cpv": 0.036216808196108,
        "impressions": 14921,
        "views": 2672,
        "vtr": 17.907646940554
      },
      "wpn": {
        "subscriptions": 0,
        "unsubscriptions": 0
      }
    }
  ]
}
```

## 例 4

site\_id によるパブリッシャー統計。プロジェクション付き。

#### リクエスト:

```json
{
  "detailed": true,
  "projection": {
    "base": ["*"],
    "video": ["*"],
    "wpn": ["*"],
    "rtb": ["*"]
  },
  "filter": {
    "date_from": "2019-03-10",
    "date_to": "2019-03-11",
    "country_iso": ["USA"]
  },
  "group_by": ["site_id"],
  "order_by": [
    {
      "field": "impressions",
      "order": "desc"
    }
  ],
  "limit": 30,
  "offset": 0
}
```

#### レスポンス

```json
{
  "request_metadata": {
    "count": 2,
    "limit": 30,
    "offset": 0
  },
  "result": [
    {
      "clicks": 14320,
      "cpc": 0.028298959692737,
      "cpm": 0.057945765404939,
      "ctr": 0.20476288186597,
      "group_by": {
        "site_id": {
          "id": "11223344",
          "name": "nice-example.com"
        }
      },
      "impressions": 6916414,
      "revenue": 405.2411028,
      "rtb": {
        "avg_cpm": 0,
        "avg_total_time": 0,
        "bid_response_ratio": 0,
        "errors": 0,
        "errors_ratio": 0,
        "no_bid": 0,
        "no_bid_ratio": 0,
        "queries": 0,
        "skipped": 0,
        "skipped_ratio": 0,
        "success": 0,
        "timeouts": 0,
        "timeouts_ratio": 0,
        "total_time": 0,
        "value": 0,
        "win_ratio": 0,
        "wins": 0
      },
      "video": {
        "cpv": 0.031519102652252,
        "impressions": 77041,
        "views": 12857,
        "vtr": 16.688516504199
      },
      "wpn": {
        "subscriptions": 0,
        "unsubscriptions": 0
      }
    },
    {
      "clicks": 14148,
      "cpc": 0.028769196296296,
      "cpm": 0.063791981699323,
      "ctr": 0.22173710048179,
      "impressions": 6314909,
      "revenue": 407.0265892,
      "rtb": {
        "avg_cpm": 0,
        "avg_total_time": 0,
        "bid_response_ratio": 0,
        "errors": 0,
        "errors_ratio": 0,
        "no_bid": 0,
        "no_bid_ratio": 0,
        "queries": 0,
        "skipped": 0,
        "skipped_ratio": 0,
        "success": 0,
        "timeouts": 0,
        "timeouts_ratio": 0,
        "total_time": 0,
        "value": 0,
        "win_ratio": 0,
        "wins": 0
      },
      "video": {
        "cpv": 0.036406671663685,
        "impressions": 65620,
        "views": 11180,
        "vtr": 17.037488570558
      },
      "wpn": {
        "subscriptions": 0,
        "unsubscriptions": 0
      }
    }
  ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.exoclick.com/api/ja/exoclick-gong-kai-api/api-manual-global-stats.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
