Orbitoads
浏览文档

广告活动与账户统计

可获取单项活动数据、账户汇总或按货币展示的排名。支持滚动窗口和自定义日期小时范围,导出数据时一并记录时间范围。

Markdown

统计接口有三种汇总粒度。每个接口都会按账户返回密钥可访问的各个账户的数据。

终点回归
GET /v1/stats期间的每个运动人数
GET /v1/stats/total每个内阁的总和加图表点
GET /v1/stats/analytics按货币、图表、顶级活动划分的总数

查询单项广告活动一段时间内的历史数据,请使用 GET /v1/campaigns/{ad_id}/history。 GET /v1/campaigns/{ad_id}/history

报告周期

period窗口
1d最后24小时(/stats和/stats/total的默认)
7d过去 7 天
30d最后30天( /stats/analytics 的默认)
all所有时间
customstartDate和endDate(YYYY-MM-DD),可选startHour和endHour(0-23)

任何<N>h或<N>d也是可行的(6h,14d,可长达365天 ) 。 一个未识别的值被读作最后24小时 — — 它不会返回错误,所以请检查您的拼写。 所有时间都是UTC 。

示例
# 14:00–15:59 UTC on 8 October
curl -s "https://orbitoads.pro/api/v1/stats?period=custom&startDate=2026-10-08&endDate=2026-10-08&startHour=14&endHour=15" \
  -H "X-API-Key: $ORBITO_API_KEY"

GET /v1/stats

每一次广告活动,由内阁驻巢:data[account_id][ad_id].

示例
{
  "success": true,
  "data": {
    "53": {
      "90412": { "views": 640, "clicks": 7, "actions": 3, "spent": 0.96, "ctr": 1.09, "cpm": 1.5, "cpa": 0.32, "group_id": 7 }
    }
  },
  "meta": { "period": "7d" }
}

键是字符串;这里的值是数字(与广告活动对象不同). cpa是每个动作的支出;ctr是一个百分比.

GET /v1/stats/total

仪表板端点:总数和每个柜子的图表.

示例
{
  "success": true,
  "data": {
    "accounts": {
      "53": {
        "chart": [
          { "label": "2026-10-08 12:00", "views": 52, "clicks": 1, "spent": 0.83, "budget": 4.95, "ctr": 1.92, "cpc": 0.83, "cpm": 16 }
        ],
        "totals": {
          "views": 121, "clicks": 3, "spent": 1.81, "ctr": 2.48, "cpc": 0.6, "cpm": 14.95,
          "campaigns": 4, "active": 2, "stopped": 2, "declined": 0,
          "totalBudget": 5.21, "totalSpentAllTime": 2.79
        },
        "cabinetType": "euro"
      }
    },
    "period": "1d",
    "lastUpdated": "2026-10-08T10:02:54.016Z"
  },
  "meta": { "period": "1d" }
}

chart分是按时或按时计算. cabinetType给出了货币(euro~EUR,ton~TON,stars~恒星).

GET /v1/stats/analytics

例如/stats/total,加上按货币和最高广告活动额划分的支出。

示例
{
  "success": true,
  "data": {
    "accounts": {
      "53": {
        "chart": [ { "label": "2026-10-08 12:00", "views": 52, "clicks": 1, "spent": 0.83,
                     "spent_ton": 0, "spent_euro": 0.83, "spent_stars": 0, "ctr": 1.92, "cpc": 0.83, "cpm": 16 } ],
        "totals": { "views": 121, "clicks": 3, "spent": 1.81,
                    "spentByCurrency": { "ton": 0, "euro": 1.81, "stars": 0 },
                    "ctr": 2.48, "cpc": 0.6, "cpm": 14.95 },
        "topCampaigns": [ { "ad_id": 90412, "account_id": 53, "title": "API test", "status": "Active",
                            "views": 58, "clicks": 1, "actions": 1, "spent": 0.85,
                            "ctr": 1.72, "cpc": 0.85, "cpm": 14.66, "cpa": 0.85 } ]
      }
    }
  },
  "meta": { "period": "30d" }
}

说明

  • Stats跟随Telegram自己的计数器,定期同步到Orbito Ads;最新时数随着同步到来而填补.
  • 永远不要加起来spent 横跨不同货币的柜子.
  • 关于转换,你跟踪自己(铅,存款,销售) 转换 - Telegram的actions是加入和bot开始,而不是你的转换。
  • 最好每几分钟就把时刻消化 Webhook的票数 放在投票统计表上

API 参考

完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。

GET /api/v1/stats

按账户与广告 ID 读取时段指标。

参数位置格式必填
periodquerystring—
startDatequerystring—
endDatequerystring—
startHourqueryinteger—
endHourqueryinteger—
X-API-Keyheaderstring是
cURL
curl -X GET 'https://orbitoads.pro/api/v1/stats?period=7d' \
  -H 'X-API-Key: YOUR_ORBITO_KEY'
HTTP 200
{
  "success": true,
  "data": {
    "7401": {
      "38017": {
        "views": 3200,
        "clicks": 32,
        "actions": 4,
        "spent": 4,
        "ctr": 1,
        "cpm": 1.25,
        "cpa": 1,
        "group_id": 516
      }
    }
  },
  "meta": {
    "period": "7d"
  }
}

GET /api/v1/stats/total

读取所选时段的账户总计及图表数据点。

参数位置格式必填
periodquerystring—
startDatequerystring—
endDatequerystring—
startHourqueryinteger—
endHourqueryinteger—
X-API-Keyheaderstring是
cURL
curl -X GET 'https://orbitoads.pro/api/v1/stats/total?period=7d' \
  -H 'X-API-Key: YOUR_ORBITO_KEY'
HTTP 200
{
  "success": true,
  "data": {
    "accounts": {
      "7401": {
        "chart": [
          {
            "label": "2026-11-03",
            "views": 3200,
            "clicks": 32,
            "spent": 4,
            "budget": 36,
            "ctr": 1,
            "cpc": 0.125,
            "cpm": 1.25
          }
        ],
        "totals": {
          "views": 3200,
          "clicks": 32,
          "spent": 4,
          "ctr": 1,
          "cpc": 0.125,
          "cpm": 1.25,
          "campaigns": 1,
          "active": 1,
          "stopped": 0,
          "declined": 0,
          "totalBudget": 36,
          "totalSpentAllTime": 4
        },
        "cabinetType": "euro"
      }
    },
    "period": "7d",
    "lastUpdated": "2026-11-03T12:00:00Z"
  },
  "meta": {
    "period": "7d"
  }
}

GET /api/v1/stats/analytics

读取币种拆分、图表和广告排名。

参数位置格式必填
periodquerystring—
startDatequerystring—
endDatequerystring—
startHourqueryinteger—
endHourqueryinteger—
X-API-Keyheaderstring是
cURL
curl -X GET 'https://orbitoads.pro/api/v1/stats/analytics?period=custom&startDate=2026-11-03&endDate=2026-11-03&startHour=8&endHour=17' \
  -H 'X-API-Key: YOUR_ORBITO_KEY'
HTTP 200
{
  "success": true,
  "data": {
    "accounts": {
      "7401": {
        "chart": [
          {
            "label": "2026-11-03",
            "views": 3200,
            "clicks": 32,
            "spent": 4,
            "ctr": 1,
            "cpc": 0.125,
            "cpm": 1.25,
            "spent_ton": 0,
            "spent_euro": 4,
            "spent_stars": 0
          }
        ],
        "totals": {
          "views": 3200,
          "clicks": 32,
          "spent": 4,
          "spentByCurrency": {
            "euro": 4,
            "ton": 0,
            "stars": 0
          },
          "ctr": 1,
          "cpc": 0.125,
          "cpm": 1.25
        },
        "topCampaigns": [
          {
            "views": 3200,
            "clicks": 32,
            "actions": 4,
            "spent": 4,
            "ctr": 1,
            "cpm": 1.25,
            "cpa": 1,
            "account_id": 7401,
            "ad_id": 38017,
            "title": "Conversation club · November",
            "status": "Active",
            "cpc": 0.125
          }
        ]
      }
    }
  },
  "meta": {
    "period": "custom"
  }
}

实施说明

余额与币种

逐账户核对 currency、balance_updated_at 和 min_budget。广告对象中的金额及费率可能是十进制字符串或 null,统计聚合使用数值。EUR、TON 和 Stars 分开汇总。

周期与 UTC 小时

period 支持 1d、7d、30d、all、custom 及最长 365 天的 Nh/Nd 窗口。custom 必须指定 startDate、endDate,可选 0–23 UTC 的 startHour/endHour。stats、total 默认 1d,analytics 默认 30d。

理解平台行动数

actions 统计加入频道或启动机器人等平台行为。追踪器的线索、购买和收入见 conversions。/stats/analytics 按账户提供图表、总计及 topCampaigns。

操作与字段

GET /api/v1/stats GET /api/v1/stats/total GET /api/v1/stats/analytics 1d 7d 30d all custom

  • GET /api/v1/stats
  • GET /api/v1/stats/total
  • GET /api/v1/stats/analytics
  • 1d
  • 7d
  • 30d
  • all
  • custom

请求示例

GET /api/v1/stats/total?period=7d HTTP/1.1 Host: orbitoads.pro X-API-Key: {key}

结构字段与限制

本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。

协议参考

方法路径参数请求内容响应码
GET/api/v1/statsperiod, startDate, endDate, startHour, endHour—200, 401, 429
GET/api/v1/stats/totalperiod, startDate, endDate, startHour, endHour—200, 401, 429
GET/api/v1/stats/analyticsperiod, startDate, endDate, startHour, endHour—200, 401, 429
GET/api/v1/campaigns/{ad_id}/historyad_id, account_id, period, startDate, endDate, startHour, endHour—200, 400, 401, 404

来源 · 数据来源

结构字段与限制 · 广告活动与账户统计

字段文档取值
period1d, 7d, 30d, all, custom
startDate, endDateYYYY-MM-DD
startHour, endHour0 … 23
/stats1d
/stats/analytics30d

来源 · 数据来源

StatsNumbers

字段字段类型
viewsnumber
clicksnumber
actionsnumber
spentnumber
ctrnumber
cpmnumber
cpanumber
group_idinteger | null

来源 · 数据来源

参考资料更新日期

Pro Panel
Pro Panel