中介管理
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助 AdMob API,您可以以编程方式管理 AdMob 中介设置。您可以创建和更新中介组、添加广告来源实例,并提供广告单元映射,以实现对多个第三方广告联盟的调用。
您可以通过 AdMob API 和界面执行以下操作。
|
创建 |
修补 |
列表 |
应用 |
|
|
|
广告单元 |
|
|
|
广告单元映射 |
|
|
|
中介组 |
|
|
|
借助 AdMob API,您可以:
- 创建应用,将其关联到应用商店,并添加广告单元。
- 为设置中要包含的所有瀑布流广告来源创建广告单元映射。
- 创建具有地理位置定位和瀑布流广告来源的中介组,并包含相关联的广告单元映射。
- 更新中介组的广告来源、广告单元映射和有效每千次展示费用值。
一个中介组可以包含多个广告来源实例,每个实例都有自己的广告单元映射。例如,中介组 A
可能包含以下代码行:
- 有效每千次展示费用为 10 美元的广告来源
B
和广告单元映射 b
- 广告来源
C
的有效每千次展示费用为 8 美元,广告单元映射为 c
- 有效每千次展示费用为 6 美元的广告来源
D
和广告单元映射 d
对象和地图的层次结构如下:

开始使用
您可以参考以下示例,开始以编程方式创建中介组、组行和映射广告单元:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eThe AdMob API allows programmatic management of your AdMob Mediation setup, including creating and updating mediation groups, adding ad sources, and defining ad unit mappings.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the API to create apps, link them to app stores, add ad units, and establish ad unit mappings for your desired waterfall ad sources.\u003c/p\u003e\n"],["\u003cp\u003eMediation groups enable geo-targeting and management of waterfall ad sources with associated ad unit mappings, including updating ad sources, mappings, and eCPM values.\u003c/p\u003e\n"],["\u003cp\u003eThe API provides access to information on ad sources and adapters, facilitating the creation of ad unit mappings and overall setup for programmatic mediation management.\u003c/p\u003e\n"]]],[],null,["# Mediation management\n\nThe AdMob API lets you manage your AdMob Mediation setup programmatically.\nYou can create and update [mediation\ngroups](/admob/api/v1/mediation-groups), add [ad source\ninstances](/admob/api/v1/ad-sources), and\nprovide the [ad unit\nmappings](/admob/api/v1/ad-unit-mappings) to enable calls\nto multiple [third-party networks](/admob/api/v1/ad-sources-reference).\n\nThe following activities are available through the AdMob API and UI.\n\n| | Create | Patch | List |\n|------------------|--------|-------|------|\n| App | | | |\n| Ad unit | | | |\n| Ad unit mappings | | | |\n| Mediation group | | | |\n\nWith the AdMob API you can:\n\n- Create apps, link them to app stores, and add ad units.\n- Create ad unit mappings for all of the waterfall ad sources you want included in your setup.\n- Create a mediation group with geo targeting and waterfall ad sources with their associated ad unit mappings.\n- Update a mediation group's ad sources, ad unit mappings, and eCPM values.\n\nA mediation group can have many ad source instances, each having their own ad\nunit mapping. For instance, mediation group `A` could have the following lines:\n\n- Ad source `B` with eCPM $10 and ad unit mapping `b`\n- Ad source `C` with eCPM $8 and ad unit mapping `c`\n- Ad source `D` with eCPM $6 and ad unit mapping `d`\n\nThe hierarchy of objects and maps is as follows:\n\nGet started\n-----------\n\nStart creating mediation groups, group lines, and mapping ad units\nprogrammatically with the following examples:\n\n- Complete your [setup](/admob/api/v1/getting-started) to make requests using Curl.\n- Programmatically get information on [ad\n sources](/admob/api/v1/ad-sources) and [adapters](/admob/api/v1/adapters-guide) to [create ad\n unit mappings](/admob/api/v1/ad-unit-mappings).\n- Create [apps and ad units](/admob/api/v1/app-ad-units).\n- Create [mediation\n groups](/admob/api/v1/mediation-groups)."]]