> For the complete documentation index, see [llms.txt](https://knowledgebase.offer18.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.offer18.com/zh/wang-luo/wang-luo-api/bao-gao-api.md).

# 报表 API

```
GET https://api.offer18.com/api/m/report
```

:link: [<mark style="color:蓝色;">**点击测试报表 API**</mark>](https://offer18.readme.io/reference/reports-api)

### 常用参数

<table data-header-hidden><thead><tr><th width="150">查询</th><th width="150"> </th><th> </th></tr></thead><tbody><tr><td><strong>查询</strong></td><td><strong>类型</strong></td><td><strong>描述</strong></td></tr><tr><td>mid</td><td>整数</td><td>网络账户 ID</td></tr><tr><td>api-key</td><td>字符串</td><td>网络 API 密钥</td></tr><tr><td>secret-key</td><td>字符串</td><td>网络密钥</td></tr></tbody></table>

***

### 筛选条件

<table data-header-hidden><thead><tr><th width="168.4">查询</th><th width="150"> </th><th></th></tr></thead><tbody><tr><td><strong>查询</strong></td><td><strong>类型</strong></td><td><strong>描述</strong></td></tr><tr><td>date_from</td><td>日期</td><td>报表开始日期（YYYY-MM-DD）</td></tr><tr><td>date_end</td><td>日期</td><td>报表结束日期（YYYY-MM-DD）</td></tr><tr><td>datetime_from</td><td>日期时间</td><td>报表开始日期和时间（YYYY-MM-DD hh:mm:ss）</td></tr><tr><td>datetime_end</td><td>日期时间</td><td>报表结束日期和时间（YYYY-MM-DD hh:mm:ss）</td></tr><tr><td>results</td><td>整数</td><td>结果数量</td></tr><tr><td>page</td><td>整数</td><td>页码（从 0 开始）</td></tr><tr><td>timezone</td><td>小数</td><td>默认 0.0 UTC</td></tr><tr><td>offer</td><td>字符串</td><td>Offer ID</td></tr><tr><td>affiliate</td><td>字符串</td><td>Affiliate ID</td></tr><tr><td>advertiser</td><td>字符串</td><td>Advertiser ID</td></tr></tbody></table>

{% code overflow="wrap" %}

```
https://api.offer18.com/api/m/report?mid=000&api-key=000000&secret-key=000000000&date_from=0000-00-00&date_end=0000-00-00&offer=0000,1111,2222,3333&affiliate=0000,1111,2222&advertiser=0000,1111,2222&timezone=0.0&results=100
```

{% endcode %}

#### 获取特定字段

<table data-header-hidden><thead><tr><th width="150">查询</th><th width="158"> </th><th></th></tr></thead><tbody><tr><td><strong>查询</strong></td><td><strong>类型</strong></td><td><strong>描述</strong></td></tr><tr><td>fields</td><td>字符串</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f517">🔗</span> <a href="/pages/d9d4155c600d0d3d7c6df1cd9f8ebac54fafa4a3#report-fields"><mark style="color:蓝色;">查看字段</mark> </a></td></tr></tbody></table>

<pre data-overflow="wrap"><code><strong>https://api.offer18.com/api/m/report?mid=000&#x26;api-key=0000000&#x26;secret-key=00000000000&#x26;fields=tid,i_id,offer_name,advertiser,affiliate,advertiser_model,affiliate_model,advertiser_price,clicks,conversion,affiliate_price,date,time,hour,offer,s_affiliate,event,impressions,unique_clicks,affiliate_model,ip,currency,isp,country,conn_speed,location,browser,os,os_ver,device,device_brand,device_model,referral_domain,useragent,referral_url,aff_click_id,aff_sub1,aff_sub2,aff_sub3,aff_sub4,aff_sub5,aff_sub6,aff_sub7,aff_sub8,aff_sub9,aff_sub10,adv_sub4,adv_sub5,ios_idfa,source,google_aid,android_id,device_id,cr,ctr,epc,cpc,erpm,ecpm,e_cost_per_conversion,e_revenue_per_conversion,status,status_type,filter_log
</strong></code></pre>

#### 附加排序方式

<table data-header-hidden><thead><tr><th width="150">查询</th><th width="150"> </th><th width="370.2"></th></tr></thead><tbody><tr><td><strong>查询</strong></td><td><strong>类型</strong></td><td><strong>描述</strong></td></tr><tr><td>sort_by</td><td>字符串</td><td><strong>允许的值：</strong> clicks, unique_clicks, conversions, date, time, hour<br>（只能使用一个选项） </td></tr><tr><td>sort_type</td><td>字符串</td><td><strong>允许的值：</strong> asc 和 desc</td></tr></tbody></table>

{% code overflow="wrap" %}

```
https://api.offer18.com/api/m/report?mid=000&api-key=000&secret-key=000000000000&sort_by=clicks&sort_type=asc
```

{% endcode %}

***

### API 请求示例

![](/files/2dca2e9ab4d691cdd82b984f892607118d432ff6)

***

### API 响应

```
{
  "status": 200,
  "records": 100,
  "timezone": "+5:30",
  "reports": [
    {
      "TID": "D-1111-1630919271-34G126G155G34-WKBNIYP121890",
      "ImpressionID": "",
      "Date": "2021-09-06",
      "Time": "2021-09-06 14:37:51",
      "Hour": "2021-09-06 14:00",
      "OfferID": 1111,
      "OfferName": "",
      "Advertiser": 22,
      "Affiliate": 89,
      "Sub_Affiliate": "",
      "Event": "",
      "Impressions": 0,
      "Clicks": 1,
      "UniqueClicks": 0,
      "Conversions": 0,
      "Advertiser_Model": "CPA",
      "Affiliate_Model": "CPA",
      "Advertiser_Price": 0,
      "Affiliate_Price": 0,
      "IP": "1.1.1.1",
      "Currency": "USD",
      "ISP": "Mountain_View_Communications",
      "Country": "AU",
      "Connection_Speed": "cable_dsl",
      "Location": "Australia, Oceania",
      "Browser": "ch",
      "OS": "windows",
      "OSver": 10,
      "Device": "desktop",
      "Device_Brand": "Lenovo",
      "Device_Model": "ideapad-x310s-ua",
      "Referral_Domain": "urlopener.net",
      "UserAgent": "Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F93.0.4577.63+Safari%2F537.36",
      "Referral_URL": "https%3A%2F%2Fexample.net%2F",
      "Aff_Click_ID": "",
      "Aff_Sub_1": "",
      "Aff_Sub_2": "",
      "Aff_Sub_3": "",
      "Aff_Sub_4": "",
      "Aff_Sub_5": "",
      "Adv_Sub_4": "",
      "Adv_Sub_5": "",
      "iOS_IDFA": "",
      "Source": "",
      "Google_AID": "",
      "Android_ID": "",
      "Device_ID": "",
      "Status": "已批准",
      "Status_Type": "直接",
      "Filter_Log": "",
      "CTR": "0.000 %",
      "EPC": 0,
      "CPC": 0,
      "ERPM": 0,
      "ECPM": 0,
      "E_Cost_Per_Conversion": 0,
      "E_Revenue_Per_Conversion": 0,
      "CR": "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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.offer18.com/zh/wang-luo/wang-luo-api/bao-gao-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
