查询广告活动
可按状态或目标链接过滤列表,也可读取单项活动和历史记录。不同账户的广告 ID 可能相同,定位时需同时使用 account_id 与 ad_id。
在 API 中,一项广告活动对应一条 Telegram 广告。请用 (account_id, ad_id) 标识;不同账户可能重复使用同一 ad_id。
广告活动对象字段
GET /v1/campaigns/{ad_id} 返回 :
{
"ad_id": 90412,
"account_id": 53,
"title": "API test",
"text": "Join the channel for daily market notes",
"status": "Active",
"active": true,
"promote_url": "https://t.me/yourchannel",
"tme_path": "yourchannel",
"target_type": "channels",
"targets": ["durov"],
"cpm": "1.50",
"budget": "3.54100",
"spent": "1.45900",
"daily_budget": null,
"views": 1043,
"opens": 0,
"clicks": 12,
"actions": 4,
"ctr": "1.15",
"cvr": "33.33",
"cpc": "0.1215833333",
"cpa": "0.3647500000",
"views_per_user": 1,
"schedule": {
"days": { "mon": [9, 10, 11, 12, 13, 14, 15, 16, 17], "tue": [9, 10, 11, 12, 13, 14, 15, 16, 17],
"wed": [9, 10, 11, 12, 13, 14, 15, 16, 17], "thu": [9, 10, 11, 12, 13, 14, 15, 16, 17],
"fri": [9, 10, 11, 12, 13, 14, 15, 16, 17], "sat": [], "sun": [] },
"timezone": "+03:00"
},
"has_media": false,
"media_type": null,
"button": null,
"website_name": null,
"group_id": 7,
"auto_cpm_enabled": false,
"date": "1791364800",
"synced_at": "2026-10-08T10:29:41.000Z",
"status_changed_at": "2026-10-08T10:31:07.112Z"
}| 田野 | 意义 |
|---|---|
title | 你的广告内部名字。 |
text | 广告短信人们看到。 |
status | Telegram正在做的广告——见状态. |
active | 你要求的:true=应该运行. active: true和Stopped状态的广告活动一旦再次获得预算,即恢复. |
promote_url / tme_path | 广告内容包括:网站URL,或t.me/<tme_path>链接(频道,bot,迷你应用,帖子). |
target_type | channels,bots,search或users —见创建活动. |
targets | 用户名称为广告目标(频道或bots),当知道时。 |
cpm | 每1000次观看,在广告账户的货币中。 |
budget | 左 钱在广告活动中。 budget + spent 是它得到的一切。 |
spent | 至今所花之钱. |
daily_budget | 每日开支上限,如果设置了的话。 |
views, clicks, actions, opens | 生活计数器. actions是平台动作(joins,bot start)——而不是你的转换;对于那些,参见转换. |
ctr, cvr | 百分比:"1.15"意味着1.15%。 |
cpc, cpa | 每点击一次和每起行动的费用。 |
views_per_user | 一个人能看多少次广告(1–4). |
schedule | 周日与时日广告显示,或null — 它全天候运行。见时间表 。 |
group_id | 广告活动团体在小组中, |
auto_cpm_enabled | Orbito Ads的CPM号汽车管理出价. |
date | 当广告创建时:unix秒,作为字符串. |
status_changed_at | 最后地位变化:不受最新数据的影响——对“此后的变化”有利。 |
synced_at | 当广告本身的设置——schedule,text,views_per_user,目标设定——最后从Telegram读取. 见新鲜. |
金钱领域是十字线(cpm,budget,spent,ctr,cvr,cpc,cpa)所以十进制不变,计数器(views,clicks,actions,opens)都是数字,所有的钱都在内阁的货币中(参见广告账户).
状态
| 状态 | 意义 | 做你该做的 |
|---|---|---|
Active | 跑步。 | 暂停,变更出价,增加预算. |
In Review | 等待Telegram的检讨;尚未显示. | 等等,一个网友告诉你,当它改变。 |
Declined | Telegram拒绝了该广告. | 编辑文本或链接(重新提交),或创建新的文本或链接。 |
On Hold | 关机了——由你或自动化规则。 | 回复。 |
Stopped | 预算用光了。 | 增加预算;如果active是true,则再次运行。 |
Paused | 全柜被Telegram停用(稀有). | 联系@orbitoads |
Deleted | 被删除,在历史中保存,隐藏在列表中. | — |
GET /v1/campaigns
每个内阁的广告活动都是关键所在。
curl -s "https://orbitoads.pro/api/v1/campaigns?account_id=53&status=Active,On%20Hold&limit=100&cursor=" \
-H "X-API-Key: $ORBITO_API_KEY"| 参数 | 默认 | 意义 |
|---|---|---|
account_id | — | 只有这个柜子(accountId也有效. ) |
status | 全部删除 | 一个或几个状态,逗号分隔. |
title | — | 标题载有本案文。 |
bot_username | — | 一个bot或通道的广告:匹配tme_path中的用户名,大小写不敏感,编号为@. foo不匹配foobar. |
promote_domain | — | 链接在这个主机上的网站广告。 接受example.com或一个完整的URL; www., 方案, 路径和端口被忽略 。 |
promote_domain_mode | exact | suffix也匹配子域(x.example.com). |
type | — | bot (机器人和微型应用程序),channel(频道,组,站)或site(外部网站). |
limit | 100 | 1–500. |
cursor | — | 铺设-见页面. 建议。 |
offset, sortBy, sortOrder | — | 抵消平面图(每柜500美元)。 |
过滤器与 AND 结合。 一个未知的bot 或域返回一个空列表,而不是错误 。
{
"success": true,
"data": [
{ "ad_id": 90412, "account_id": 53, "title": "API test", "text": "…", "status": "Active",
"tme_path": "yourchannel", "promote_url": null, "views": 1043, "opens": 0, "clicks": 12,
"actions": 4, "spent": "1.45900", "budget": "3.54100", "cpm": "1.50", "cpc": "0.12",
"cpa": "0.36", "ctr": "1.15", "cvr": "33.33", "date": "1791364800", "group_id": 7,
"status_changed_at": "2026-10-08T10:31:07.112Z" }
],
"meta": { "limit": 100, "cursor": null, "next_cursor": null, "hasMore": false }
}获取单个广告活动
GET /v1/campaigns/{ad_id} — 上面的全部对象,包括瞄准,创意字段和schedule(列表终点将那些留作快速停留). 已删除的战役也被还原,有status: "Deleted".
curl -s "https://orbitoads.pro/api/v1/campaigns/90412?account_id=53" -H "X-API-Key: $ORBITO_API_KEY"account_id只有在你几个柜子里存在同样的ad_id时才需要(400 ACCOUNT_ID_REQUIRED告诉你).
新鲜
每一场运动的柜台和状态每时每刻都在刷新。广告本身的设置 — — schedule,text,views_per_user — — 目标来自阅读广告本身,所以:
GET /v1/campaigns/{ad_id}在回答之前从Telegram重新读取了这个广告,因为我们的复制时间已经超过5分钟年。 Telegram年的广告界面中有人直接做了改动,就出现在了窗外。- 活动活动(
Active,In Review,On Hold此外,在背景下每3小时都会重新阅读。 - 通过Orbito Ads——面板或这API——所作的修改,一并抄入.
如果Telegram没有及时回答,你就能拿到存储的拷贝;synced_at告诉你它多大了.
GET /v1/campaigns/{ad_id}/history
一个运动的总数在一段时间内——一个总数,而不是一个小时的分数。
curl -s "https://orbitoads.pro/api/v1/campaigns/90412/history?account_id=53&period=7d" -H "X-API-Key: $ORBITO_API_KEY"{ "success": true,
"data": { "views": 640, "clicks": 7, "spent": 0.96, "ctr": 1.09, "cpm": 1.5, "cpa": 0.32 },
"meta": { "adId": 90412, "accountId": 53, "period": "7d" } }period:24h(默认),7d,30d或custom,有startDate/endDate(YYYY-MM-DD,UTC)和可选的startHour/endHour(0–23). 该时期没有数据~404 NOT_FOUND.
同步本地副本
- 页面通过
GET /v1/campaigns?cursor=,上升由(account_id, ad_id). - 订阅网页,用于状态变化和小时统计,而不是每分钟投票.
- 一天一次重新同步 捕捉到任何被网友错过的东西
API 参考
完整广告接口需要为此工作区单独配置供应商凭据。客户端请求使用自己的 Orbito API 密钥。账户订购、开通和外部账单分别处理。
GET /api/v1/campaigns
按筛选条件分页读取广告列表。
| 参数 | 位置 | 格式 | 必填 |
|---|---|---|---|
account_id | query | integer | — |
status | query | string | — |
title | query | string | — |
bot_username | query | string | — |
promote_domain | query | string | — |
promote_domain_mode | query | string | — |
type | query | string | — |
limit | query | integer | — |
cursor | query | string | — |
offset | query | integer | — |
sortBy | query | string | — |
sortOrder | query | string | — |
X-API-Key | header | string | 是 |
curl -X GET 'https://orbitoads.pro/api/v1/campaigns?account_id=7401&status=Active%2COn+Hold&limit=25&cursor=' \
-H 'X-API-Key: YOUR_ORBITO_KEY'{
"success": true,
"data": [
{
"ad_id": 38017,
"account_id": 7401,
"title": "Conversation club · November",
"text": "See this month’s language club schedule.",
"status": "Active",
"tme_path": null,
"promote_url": "https://school.example/club",
"views": 3200,
"opens": 0,
"clicks": 32,
"actions": 4,
"spent": "4.00",
"budget": "36.00",
"cpm": "1.25",
"cpc": "0.125",
"cpa": "1.00",
"ctr": "1.00",
"cvr": "12.50",
"date": "1793620800",
"group_id": 516,
"status_changed_at": "2026-11-03T12:00:00Z"
}
],
"meta": {
"limit": 25,
"cursor": null,
"next_cursor": null,
"hasMore": false
}
}GET /api/v1/campaigns/{ad_id}
获取单条广告的定向、素材与时段安排。
| 参数 | 位置 | 格式 | 必填 |
|---|---|---|---|
ad_id | path | integer | 是 |
account_id | query | integer | — |
X-API-Key | header | string | 是 |
curl -X GET 'https://orbitoads.pro/api/v1/campaigns/38017?account_id=7401' \
-H 'X-API-Key: YOUR_ORBITO_KEY'{
"success": true,
"data": {
"account_id": 7401,
"ad_id": 38017,
"title": "Conversation club · November",
"text": "See this month’s language club schedule.",
"status": "Active",
"active": true,
"promote_url": "https://school.example/club",
"tme_path": null,
"target_type": "users",
"targets": [],
"cpm": "1.25",
"budget": "36.00",
"spent": "4.00",
"daily_budget": "8.00",
"views": 3200,
"opens": 0,
"clicks": 32,
"actions": 4,
"ctr": "1.00",
"cvr": "12.50",
"cpc": "0.125",
"cpa": "1.00",
"views_per_user": 2,
"schedule": null,
"has_media": false,
"media_type": null,
"button": "learn_more",
"website_name": "Example language school",
"group_id": 516,
"auto_cpm_enabled": false,
"date": "1793620800",
"synced_at": "2026-11-03T12:00:00Z",
"status_changed_at": "2026-11-03T12:00:00Z"
}
}GET /api/v1/campaigns/{ad_id}/history
读取一条广告在日期或小时范围内的汇总指标。
| 参数 | 位置 | 格式 | 必填 |
|---|---|---|---|
ad_id | path | integer | 是 |
account_id | query | integer | — |
period | query | string | — |
startDate | query | string | — |
endDate | query | string | — |
startHour | query | integer | — |
endHour | query | integer | — |
X-API-Key | header | string | 是 |
curl -X GET 'https://orbitoads.pro/api/v1/campaigns/38017/history?account_id=7401&period=7d' \
-H 'X-API-Key: YOUR_ORBITO_KEY'{
"success": true,
"data": {
"views": 3200,
"clicks": 32,
"actions": 4,
"spent": 4,
"ctr": 1,
"cpm": 1.25,
"cpa": 1
},
"meta": {
"adId": 38017,
"accountId": 7401,
"period": "7d"
}
}实施说明
账户与广告标识
联合保存 account_id 和 ad_id。不同账户可能重复使用同一 ad_id。密钥可访问多个账户时请传入 account_id 选定记录。
筛选与状态
筛选条件按 AND 合并,status 可传逗号分隔值。列表默认省略 Deleted,详情仍可返回。active 为期望投放状态,status 为平台实际状态。
操作与字段
GET /api/v1/campaigns GET /api/v1/campaigns/{ad_id} GET /api/v1/campaigns/{ad_id}/history account_id ad_id
- GET /api/v1/campaigns
- GET /api/v1/campaigns/{ad_id}
- GET /api/v1/campaigns/{ad_id}/history
- account_id
- ad_id
请求示例
GET /api/v1/campaigns?account_id={account_id}&status=Active&limit=25&cursor= HTTP/1.1 Host: orbitoads.pro X-API-Key: {key}
结构字段与限制
本表依据公开的 v1 契约。参数与字段名称区分大小写。各操作的 HTTP 状态码分别表示成功、输入校验和访问检查。链接规范给出了完整的请求与响应结构。
协议参考
| 方法 | 路径 | 参数 | 请求内容 | 响应码 |
|---|---|---|---|---|
| GET | /api/v1/campaigns | account_id, status, title, bot_username, promote_domain, promote_domain_mode, type, limit, cursor, offset, sortBy, sortOrder | — | 200, 400, 401, 404, 429 |
| GET | /api/v1/campaigns/{ad_id} | ad_id, account_id | — | 200, 400, 401, 404, 429 |
| GET | /api/v1/campaigns/{ad_id}/history | ad_id, account_id, period, startDate, endDate, startHour, endHour | — | 200, 400, 401, 404 |
来源 · 数据来源
结构字段与限制 · 查询广告活动
| 字段 | 文档取值 |
|---|---|
| account_id + ad_id | integer + integer |
| promote_domain_mode | exact | suffix |
| type | bot | channel | site |
| sortOrder | ASC | DESC |
| status | Active | In Review | Declined | On Hold | Stopped | Paused | Deleted |
来源 · 数据来源
CampaignListItem
| 字段 | 字段类型 |
|---|---|
| ad_id | integer |
| account_id | integer |
| title | string |
| text | string | null |
| status | CampaignStatus |
| tme_path | string | null |
| promote_url | string | null |
| views | integer |
| opens | integer |
| clicks | integer |
| actions | integer |
| spent | Money |
| budget | Money |
| cpm | Money |
| cpc | Money |
| cpa | Money |
| ctr | string | null |
| cvr | string | null |
| date | string | null |
| group_id | integer | null |
| status_changed_at | string | null · date-time |
来源 · 数据来源
Campaign
| 字段 | 字段类型 |
|---|---|
| ad_id | integer |
| account_id | integer |
| title | string |
| text | string | null |
| status | CampaignStatus |
| active | boolean |
| promote_url | string | null |
| tme_path | string | null |
| target_type | channels | bots | search | users | |
| targets | array · [string] |
| cpm | Money |
| budget | Money |
| spent | Money |
| daily_budget | number | string | null |
| views | integer |
| opens | integer |
| clicks | integer |
| actions | integer |
| ctr | string | null |
| cvr | string | null |
| cpc | Money |
| cpa | Money |
| views_per_user | integer | null |
| schedule | Schedule |
| has_media | boolean |
| media_type | image | video | |
| button | string | null |
| website_name | string | null |
| group_id | integer | null |
| auto_cpm_enabled | boolean |
| date | string | null |
| synced_at | string | null · date-time |
| status_changed_at | string | null · date-time |
来源 · 数据来源
CampaignStatus
| 字段 | 字段类型 |
|---|---|
| CampaignStatus | Active | In Review | Declined | On Hold | Stopped | Paused | Deleted |
来源 · 数据来源
参考资料更新日期