下载地址
https://www.zhengdianxue.com/wp-content/uploads/skills/indiv-benjamin--sanlian-ads-metadata.zip将提示词发送给你的 AI 安装该 skills
请根据 https://skillhub.cn/install/skillhub.md,安装 @indiv-benjamin/sanlian-ads-metadata。Bilibili Sanlian Ads creation configuration lookup (创编配置查询). Use before saving any ad to resolve the selectable values a save request depends on – promotion purposes, promotion content, optimization targets and bid ranges, targeting dimensions, deliverable apps/games/goods/live rooms/B mini apps and mini games, deliverable archives, dynamics, local videos, playables and open-space MIDs, creative placements, landing pages, promotion selling points and archive component settings. Also use the independent Bilibili public archive-information lookup when a user provides a BVID or video URL and needs the matching avid, bvid, UP owner, title, description, cover or page information. Shared by both the legacy three-level structure and creative-driven delivery 2.0. 中文触发词:推广目的、推广内容、优化目标、出价区间、定向、人群包、可投放稿件、BVID、avid、B站视频链接、公开稿件信息、UP主、稿件标题、稿件描述、稿件封面、可投放动态、落地页、推广卖点、应用列表、游戏列表、商品列表、直播间、试玩、创编配置。
阅读全文 (展开查看完整说明)
概述
Bilibili Sanlian Ads — Creation Configuration Lookup (创编配置查询)
Every ad save request is full of IDs and enum values that are only valid for a specific account, promotion purpose, promotion content or placement. This skill is how you obtain them. It is a read-only skill: it resolves what may be selected, and never creates or modifies an ad.
These lookups are shared by both delivery structures. The same endpoints feed legacy campaign/unit/creative saves and creative-driven 2.0 project/media saves. Two exceptions run the other way — the 2.0 template-group endpoints live in bilibili-sanlian-ads-delivery, and legacy creative placement (527) does not apply to 2.0, where placement is expressed through promotion_scene.
Usage Rules
- For MAPI metadata calls, confirm a valid
access_tokenand advertiseraccount_idfirst; usebilibili-sanlian-adswhen either is missing. The public archive-information lookup is independent and needs neither value. - Every MAPI call goes through [
scripts/mapi.sh](scripts/mapi.sh) (on Windows usepy -3 scripts/mapi_client.py) —call <METHOD> <path> [--query-file q.json] [--body-file body.json]. It loads and refreshes the token, attaches the headers described below, enforces Rule 1 pacing, and applies the shared conservative error decision tree. It returns that classification with the raw response; endpoint-specific success and partial-success semantics still come from the reference below. Do not hand-writecurl,requestsorfetchfor a MAPI call, and never fan out across accounts or objects in parallel. - The public archive-information lookup is not MAPI and must not go through
scripts/mapi.sh call, which would attach the advertiser token and refuse the path anyway. Use an ordinary HTTP client againsthttps://api.bilibili.com/x/web-interface/view, with no Bearer token and noX-Call-Source. That host applies risk control: a default scripting User-Agent is rejected with HTTP 412 (request was banned), so send a browser-shapedUser-Agent. Keep long IDs as strings. - MAPI base domain is
https://cm.bilibili.com/takumi/api; MAPI calls useAuthorization: Bearer {access_token},X-Call-Source: sanlian-skillsandX-Sanlian-Skills-Version: 3.0.4. The linked Bilibili public archive-information helper is not MAPI and requires none of those headers. - Query these before composing a save request, not after it fails. A guessed enum or resource ID either fails the save or, worse, saves something the user did not intend.
- Before any ad-creation workflow, open [
references/creation-field-source-map.md](references/creation-field-source-map.md). It maps each selectable save value to a lookup, a previous verified result, explicit user input, or an out-of-scope dependency. Do not compose the final save while any populated value has an unknown source. - Open the matching reference before composing any request. Do not invent parameter names, and do not assume a lookup returns everything — most are filtered by account, promotion purpose, promotion content or placement, and their results change with those inputs.
- Follow the sequential-call and error-stop discipline in
bilibili-sanlian-ads. Query one endpoint at a time, and do not start the next request until the previous one has completed and its response has been checked. - Cache per account and reuse within a task. Promotion purposes, optimization targets, targeting dimensions and placements do not change between two calls a second apart. Re-querying the same lookup in a loop is the most common waste in this skill.
- Never treat an empty result as a reason to fall back to a hard-coded value. Empty means the account cannot use that resource — report that to the user.
When To Use
| Goal | References |
|---|---|
| Decode the registered promotion-purpose, promotion-content and optimization-target enums; do not treat the full registry as an account's selectable set | [1711](references/1711_枚举值.md) |
| Map legacy and 2.0 save fields to their authoritative value source | [Creation field source map](references/creation-field-source-map.md) |
| Campaign promotion purposes | [507](references/507_查询计划可用推广目的.md) |
| Unit promotion content, optimization targets, second-stage bid range | [512](references/512_查询单元可用推广内容.md), [513](references/513_查询单元可选优化目标.md), [522](references/522_优化目标二阶段出价区间.md) |
| Targeting dimensions and their selectable values | [520](references/520_查询单元可选定向维度.md) |
| Promotion objects: apps, listed games, goods, live rooms, live reservations, B mini apps and mini games, WeChat mini programs and mini games | [514](references/514_获取可投放的应用列表.md), [519](references/519_获取上架游戏列表.md), [518](references/518_获取商品列表.md), [515](references/515_获取直播间信息.md), [516](references/516_获取预约直播间信息.md), [517](references/517_根据mid查询直播预约.md), [1697](references/1697_获取可投B小程序_小游戏.md), [22734](references/22734_获取可投微信小程序_小游戏.md) |
| Creative placements (legacy only) | [527](references/527_查询创意可投放位置.md) |
| Deliverable archives and their MIDs, local videos, partner-authorized tasks | [531](references/531_查询可投放稿件.md), [529](references/529_查询可投放稿件视频mid.md), [530](references/530_查询可投放本地视频.md), [536](references/536_查询可投放开放空间mid.md), [538](references/538_查询合伙人授权任务列表.md) |
| Resolve a BVID or Bilibili video URL to avid/bvid, UP owner, title, description, cover and page information | [Bilibili 公开稿件信息查询](references/bilibili_公开稿件信息查询.md) |
| Deliverable dynamics: available MIDs, dynamics under a MID, manually bound, Huahuo commercial | [532](references/532_查询可投放可用动态mid.md), [533](references/533_查询可投放mid下动态.md), [534](references/534_查询可投放手动绑定动态.md), [535](references/535_查询可投放花火商单动态.md) |
| Playable materials | [1829](references/1829_查询可投放试玩素材.md) |
| Landing pages, and paused-ad landing pages | [537](references/537_查询高能建站落地页.md), [1887](references/1887_查询暂停广告落地页.md) |
| Promotion selling points visible to the account, by promotion content or product name | [1942](references/1942_查询可用推广卖点.md) |
| Archive component configuration, live-room game card component | [1722](references/1722_查询稿件配置组件信息.md), [1699](references/1699_查询直播间关联游戏卡组件.md) |
| Material exploration result | [1639](references/1639_查询素材探索结果.md) |
Lookup Order
The lookups form a dependency chain — later ones need values produced by earlier ones. Following the order avoids most save failures.
Confirm the user's business choice at each dependency boundary. Do not prefetch every metadata endpoint “just in case”; query only the branch needed by the confirmed promotion purpose, content, targeting and material type.
- Promotion purpose (507) for the campaign or project.
- Promotion content (512) — depends on the promotion purpose.
- Promotion object — depends on the promotion content: app (514), game (519), goods (518), live room (515), live reservation (516/517), B mini app or mini game (1697), WeChat mini program or mini game (22734).
- Optimization target (513) and, for two-stage bidding, the minimum bid range (522) — both depend on the promotion purpose and content.
- Targeting dimensions (520) for the unit or project.
- Placement: legacy uses creative placement (527); 2.0 uses
promotion_scenefrom the template group endpoints inbilibili-sanlian-ads-delivery. - Deliverable material — archives, dynamics, local videos, playables — filtered by the placement and promotion content chosen above.
- Creative accessories: landing page (537), paused-ad landing page (1887), selling point (1942), archive components (1722).
A resource must be consistent with the placement, template, promotion content, material type and audit requirements. Inconsistency is rejected at save time, or passes save and then fails audit.
Notes That Save A Debugging Cycle
- B mini apps and B mini games come from one endpoint (1697), distinguished by
sort—sort=0for mini apps,sort=2for mini games. There is no separate mini-game endpoint; an older standalone one was retired. - WeChat mini programs and mini games come from 22734, not 1697. One endpoint covers mini games, short dramas, novels and others (
type1–4). It returns account-owned assets by default; passowner_type=2for assets of the account's organization (noteam_idneeded). The two sources are never merged in one call.state=1means online only — it is not audit approval and not a guarantee of deliverability; checkaudit_status. - Selling points (1942) can list every type at once.
content_type=0or omitted returns all types and ignorescontent_id; for one type, pass severalcontent_idvalues comma-separated.product_name_likefilters by product name, andskip_extra_info=trueskips images and tags for a lighter list. - 530
ctime_from/ctime_toare 13-digit millisecond timestamps. A 10-digit seconds value is read as milliseconds, lands in 1970 and returns nothing. The window filters on when this account's archive record was created, not on the returnedvideo.ctime(the MD5-level first-ingest time, which can be months earlier); never build a window fromvideo.ctime. To find one video, preferbvid/aid/keyword. - For
arc_type=7on 531, omittask_idto page through all partner archives authorized to the account. Supply up to 100 comma-separated task IDs only when filtering by task; continue through the returnedtotal_countwithpageandsize. - Archive and local-video lookups also return
media_idfor creative-driven 2.0. On 531 the field is absent when the material is not yet registered; on 530 it is the string"0". Use it when present, otherwise register throughbilibili-sanlian-ads-delivery. video.material_idfrom 530 is not amedia_id. It is the creative-centre material ID, a different ID space. Never substitute one for the other.- Dynamics have four separate sources (532–535) for different origins — available MIDs, dynamics under a MID, manually bound, and Huahuo commercial. They are not interchangeable; pick by where the dynamic came from.
- Content usually has to be authorized before it is deliverable. If an expected archive, dynamic or Huahuo order does not appear in these lookups, the missing piece is normally authorization, not the lookup — see
bilibili-sanlian-ads-assets. - Components must exist before they can be selected. Story components, comment conversion components and native anchors are created in
bilibili-sanlian-ads-assets; 1722 only reports how an archive is currently configured. - Uploading material is a different skill. Use
bilibili-sanlian-ads-materialsto upload or import images and videos. This skill only reports what is already deliverable. - The public archive-information helper is a standalone public-data query. It returns public video identity and descriptive information. It does not require an advertiser account, does not report advertising authorization or deliverability, and must not automatically trigger 531 or any other MAPI call.
Reading Responses And Errors
Business success or failure is carried in the response body, not the HTTP status. On any error or unclear outcome, stop and run the main skill's cold re-check and support-packet workflow. Do not retry with altered parameters or continue to a later lookup to discover what the API wants.
Goods list [518](references/518_获取商品列表.md) returns extra_outer_id (the goods ID recorded in Ali for UDS goods). It uses the same endpoint as goods-management list [643](../bilibili-sanlian-ads-assets/references/643_获取商品列表.md). The current implementation does not filter by extra_outer_id; use supported source, outer_id or item_id filters. For goods creation/editing, route to bilibili-sanlian-ads-assets: source=113 requires non-empty extra_outer_id and url_type=1.
Source Document Index
Synced from mapi/product/docs/开发者中心/MAPI接入/创编配置查询/ and 查询工具/. doc_id matches the article ID on the developer site.
| Source document | Local reference | Endpoint |
|---|---|---|
查询工具/枚举值 (1711) | [references/1711_枚举值.md](references/1711_枚举值.md) | Registered-value reference only; for a save, query 507/512/513 and use the current account's returned values |
查询计划可用推广目的 (507) | [references/507_查询计划可用推广目的.md](references/507_查询计划可用推广目的.md) | …/meta_data/v3/campaign/get_promotion_purpose_type |
查询单元可用推广内容 (512) | [references/512_查询单元可用推广内容.md](references/512_查询单元可用推广内容.md) | …/meta_data/v3/unit/get_promotion_purpose_content |
查询单元可选优化目标 (513) | [references/513_查询单元可选优化目标.md](references/513_查询单元可选优化目标.md) | …/meta_data/v3/unit/get_cpa_target |
优化目标二阶段出价区间 (522) | [references/522_优化目标二阶段出价区间.md](references/522_优化目标二阶段出价区间.md) | …/meta_data/v3/unit/cpa_target/get_min_bid |
查询单元可选定向维度 (520) | [references/520_查询单元可选定向维度.md](references/520_查询单元可选定向维度.md) | …/meta_data/v3/unit/get_target |
获取可投放的应用列表 (514) | [references/514_获取可投放的应用列表.md](references/514_获取可投放的应用列表.md) | …/meta_data/resource/app/drop_box |
获取上架游戏列表 (519) | [references/519_获取上架游戏列表.md](references/519_获取上架游戏列表.md) | …/meta_data/resource/biligame_list |
获取商品列表 (518) | [references/518_获取商品列表.md](references/518_获取商品列表.md) | …/meta_data/v3/unit/get_goods_list |
获取直播间信息 (515) | [references/515_获取直播间信息.md](references/515_获取直播间信息.md) | …/meta_data/unit/live_room |
获取预约直播间信息 (516) | [references/516_获取预约直播间信息.md](references/516_获取预约直播间信息.md) | …/meta_data/unit/live_reserve_id |
根据mid查询直播预约 (517) | [references/517_根据mid查询直播预约.md](references/517_根据mid查询直播预约.md) | …/meta_data/v3/unit/live/reservation/query_by_mid |
获取可投B小程序_小游戏 (1697) | [references/1697_获取可投B小程序_小游戏.md](references/1697_获取可投B小程序_小游戏.md) | …/meta_data/launch/bili/applet/query_all_by_acc (sort=0 apps, sort=2 games) |
查询创意可投放位置 (527) | [references/527_查询创意可投放位置.md](references/527_查询创意可投放位置.md) | …/meta_data/v3/creative/get_location — legacy only |
查询可投放稿件 (531) | [references/531_查询可投放稿件.md](references/531_查询可投放稿件.md) | …/meta_data/v3/archive/get_archive |
查询可投放稿件视频mid (529) | [references/529_查询可投放稿件视频mid.md](references/529_查询可投放稿件视频mid.md) | …/meta_data/v3/archive/get_bili_mid |
获取可投微信小程序_小游戏 (22734) | [references/22734_获取可投微信小程序_小游戏.md](references/22734_获取可投微信小程序_小游戏.md) | …/meta_data/launch/wechat/mini_game (owner_type=1 account, 2 organization) |
查询可投放本地视频 (530) | [references/530_查询可投放本地视频.md](references/530_查询可投放本地视频.md) | …/meta_data/v3/archive/get_video |
查询可投放开放空间mid (536) | [references/536_查询可投放开放空间mid.md](references/536_查询可投放开放空间mid.md) | …/meta_data/corp/mid |
查询合伙人授权任务列表 (538) | [references/538_查询合伙人授权任务列表.md](references/538_查询合伙人授权任务列表.md) | …/meta_data/v3/archive/partner |
查询可投放可用动态mid (532) | [references/532_查询可投放可用动态mid.md](references/532_查询可投放可用动态mid.md) | …/meta_data/v3/dynamic/get_bili_mid |
查询可投放mid下动态 (533) | [references/533_查询可投放mid下动态.md](references/533_查询可投放mid下动态.md) | …/meta_data/v3/dynamic/get_by_mid |
查询可投放手动绑定动态 (534) | [references/534_查询可投放手动绑定动态.md](references/534_查询可投放手动绑定动态.md) | …/meta_data/v3/dynamic/get_by_account |
查询可投放花火商单动态 (535) | [references/535_查询可投放花火商单动态.md](references/535_查询可投放花火商单动态.md) | …/meta_data/v3/dynamic/get_commercial_dynamic |
查询可投放试玩素材 (1829) | [references/1829_查询可投放试玩素材.md](references/1829_查询可投放试玩素材.md) | …/meta_data/v3/resource/playable/list |
查询高能建站落地页 (537) | [references/537_查询高能建站落地页.md](references/537_查询高能建站落地页.md) | …/meta_data/resource/mgk_landing_page/options |
查询暂停广告落地页 (1887) | [references/1887_查询暂停广告落地页.md](references/1887_查询暂停广告落地页.md) | …/meta_data/resource/sanlian/paused |
查询可用推广卖点 (1942) | [references/1942_查询可用推广卖点.md](references/1942_查询可用推广卖点.md) | …/meta_data/launch/promotion_selling_point/drop_list |
查询稿件配置组件信息 (1722) | [references/1722_查询稿件配置组件信息.md](references/1722_查询稿件配置组件信息.md) | …/meta_data/v2/archive_config |
查询直播间关联游戏卡组件 (1699) | [references/1699_查询直播间关联游戏卡组件.md](references/1699_查询直播间关联游戏卡组件.md) | …/cpc/v3/unit/get_live_game_card |
查询素材探索结果 (1639) | [references/1639_查询素材探索结果.md](references/1639_查询素材探索结果.md) | …/cpc/v3/creative/explore/get_result |
Supporting Public Lookup
| Purpose | Local reference | Endpoint |
|---|---|---|
| Resolve a BVID/video URL to avid/bvid, UP owner, title, description, cover and page information | [references/bilibili_公开稿件信息查询.md](references/bilibili_公开稿件信息查询.md) | GET https://api.bilibili.com/x/web-interface/view (public API, not MAPI) |