> For the complete documentation index, see [llms.txt](https://beesads.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://beesads.gitbook.io/documentation/shi-yong-zhi-nan/report-api/tracking-report/afs-tracking-report.md).

# AFS Tracking Report

### 请求URL

POST <https://api-us-east.eclicktech.com.cn/wgt/report/gamebridge/v2/ssp/search/afs/trace/report><br>

### 接口认证

请求header设置

x-apihub-ak={{后台授权token}}

x-apihub-env=prod<br>

### request参数

| 参数名称        | 参数类型      | 是否必填 | 描述和示例                                                                                        |
| ----------- | --------- | ---- | -------------------------------------------------------------------------------------------- |
| begin\_date | string    | 是    | 开始时间，2024-08-02                                                                              |
| end\_date   | string    | 是    | 结束时间，2024-08-09                                                                              |
| domain      | \[]string | 否    | siteId，例如：siteId1, siteId2                                                                   |
| keyword     | \[]string | 否    | 关键字，例如：car                                                                                   |
| country     | \[]string | 否    | 国家，例如：US                                                                                     |
| information | \[]string | 否    | 资讯文章Id，例如：63705bebbbebaf                                                                     |
| utm\_source | string    | 否    | <p>追踪源，例如：tikTok，taboola，facebook，<br>outbrain，网关，others，bigoads</p>                         |
| sub1        | string    | 否    | 追踪链接1                                                                                        |
| sub2        | string    | 否    | 追踪链接2                                                                                        |
| sub3        | string    | 否    | 追踪链接3                                                                                        |
| dimensions  | \[]string | 是    | <p>维度，枚举值Date，Domain，Sub1，Sub2，Sub3，<br>Keyword，Country，Information，UtmSource</p>            |
| page\_index | Number    | 是    | 页号，1                                                                                         |
| page\_size  | Number    | 是    | 页大小，100                                                                                      |
| sorts       | 对象        | 否    | <p>排序，1顺序，2倒序，可以排序字段：Date、Search\_PV、Search\_Click、Net\_Revenue、Lp\_PV。<br>例如：{"Date":1}</p> |

**request示例**

```Plaintext
{
    "keyword": [
        "cancer"
    ],
    "country": [
        "US"
    ],
    "domain": [
        "siteId1"
    ],
    "information": [
        "63705bebbbebaf"
    ],
    "utm_source": "tikTok",
    "sub1": "as",
    "sub2": "ac",
    "sub3": "ad",
    "begin_date": "2024-08-02",
    "end_date": "2024-08-09",
    "dimensions": [
        "Date",
        "Domain",
        "Keyword",
        "Country",
        "Information",
        "UtmSource",
        "Sub1",
        "Sub2",
        "Sub3"
    ],
    "sorts": {
        "Date": 1
    },
    "page_index": 1,
    "page_size": 10
}
```

### response参数

| 参数名称             | 描述     |
| ---------------- | ------ |
| Date             | 日期     |
| Domain           | 域名     |
| Country          | 国家     |
| InformationId    | 资讯Id   |
| InformationTitle | 资讯名称   |
| Keyword          | 关键字    |
| Lp\_Pv           | 落地页访问量 |
| Search\_Click    | 搜索点击量  |
| Search\_Pv       | 搜索访问量  |
| UtmSource        | 追踪源    |
| Sub1             | 追踪链接1  |
| Sub2             | 追踪链接2  |
| Sub3             | 追踪链接3  |
| Net\_Revenue     | 收益数据   |

**response示例**

```Plaintext
{
    "data": {
        "rows": [
            {
                "Country": "US",
                "Date": "2024-07-09",
                "Domain": "testdemo.com",
                "InformationId": "63705bebbbeb",
                "InformationTitle": "7 Types of Massage demo title",
                "Keyword": "Cancer",
                "Lp_Pv": "147",
                "Search_Click": "7",
                "Search_Pv": "83",
                "Sub1": "",
                "Sub2": "",
                "Sub3": "",
                "UtmSource": "tikTok",
                "Net_Revenue": "71.82"
            }
        ],
        "total": 1,
        "total_rows": [
            {
                "Lp_Pv": "147",
                "Search_Click": "7",
                "Search_Pv": "83",
                "Net_Revenue": "71.82"
            }
        ]
    },
    "success": true
}
```

<br>

### JAVA调用示例

```SQL
OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n" +
        "    \"keyword\": [\n" +
        "\n" +
        "    ],\n" +
        "    \"country\": [\n" +
        "        \"US\"\n" +
        "    ],\n" +
        "    \"domain\": [\n" +
        "\n" +
        "    ],\n" +
        "    \"information\": [\n" +
        "\n" +
        "    ],\n" +
        "    \"utm_source\": \"tikTok\",\n" +
        "    \"sub1\": \"\",\n" +
        "    \"sub2\": \"\",\n" +
        "    \"sub3\": \"\",\n" +
        "    \"begin_date\": \"2024-08-02\",\n" +
        "    \"end_date\": \"2024-08-09\",\n" +
        "    \"dimensions\": [\n" +
        "        \"Date\",\n" +
        "        \"Domain\",\n" +
        "        \"Keyword\",\n" +
        "        \"Country\",\n" +
        "        \"Information\",\n" +
        "        \"UtmSource\",\n" +
        "        \"Sub1\",\n" +
        "        \"Sub2\",\n" +
        "        \"Sub3\"\n" +
        "    ],\n" +
        "    \"page_index\": 1,\n" +
        "    \"page_size\": 10\n" +
        "}");
Request request = new Request.Builder()
        .url("https://api-us-east.eclicktech.com.cn/wgt/report/gamebridge/v2/ssp/search/afs/trace/report")
        .method("POST", body)
        .addHeader("Content-Type", "application/json")
        .addHeader("x-apihub-env", "prod")
        .addHeader("x-apihub-ak", "替换掉你的token")
        .build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
```

<br>


---

# 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, and the optional `goal` query parameter:

```
GET https://beesads.gitbook.io/documentation/shi-yong-zhi-nan/report-api/tracking-report/afs-tracking-report.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
