@google-ads/admanager

中文文档
0.15.0发布于 2026/10/09Apache-2.0TypeScriptCommonJS近 30 天下载 3.8万

Google Ad Manager API client for Node.js

原始使用文档
文档目录8 节
  1. Quickstart
  2. Before you begin
  3. Installing the client library
  4. Samples
  5. Supported Node.js Versions
  6. Versioning
  7. Contributing
  8. License

Google Cloud Platform logo

Google Ad Manager API: Nodejs Client

This library is considered to be in preview. This means it is still a work-in-progress and under active development. Any release is subject to backwards-incompatible changes at any time.

npm version

Google Ad Manager API client for Node.js

A comprehensive list of changes in each version may be found in the CHANGELOG.

Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.

Table of contents:

Quickstart

Before you begin

  1. Select or create a Cloud Platform project.
  2. Enable billing for your project.
  3. Enable the Google Ad Manager API API.
  4. Set up authentication so you can access the API from your local workstation.

Installing the client library

npm install @google-ads/admanager

Samples

Samples are in the samples/ directory. Each sample's README.md has instructions for running its sample.

SampleSource Code
create ad breaksource code
delete ad breaksource code
get ad breaksource code
list ad breakssource code
update ad breaksource code
batch allow ad review center adssource code
batch block ad review center adssource code
search ad review center adssource code
batch activate ad unitssource code
batch archive ad unitssource code
batch create ad unitssource code
batch deactivate ad unitssource code
batch update ad unitssource code
create ad unitsource code
get ad unitsource code
list ad unit sizessource code
list ad unitssource code
update ad unitsource code
batch archive applicationssource code
batch create applicationssource code
batch unarchive applicationssource code
batch update applicationssource code
create applicationsource code
get applicationsource code
list applicationssource code
update applicationsource code
get audience segmentsource code
list audience segmentssource code
get bandwidth groupsource code
list bandwidth groupssource code
get browser languagesource code
list browser languagessource code
get browsersource code
list browserssource code
batch activate cms metadata keyssource code
batch deactivate cms metadata keyssource code
get cms metadata keysource code
list cms metadata keyssource code
batch activate cms metadata valuessource code
batch deactivate cms metadata valuessource code
get cms metadata valuesource code
list cms metadata valuessource code
get companysource code
list companiessource code
batch create contactssource code
batch update contactssource code
create contactsource code
get contactsource code
list contactssource code
update contactsource code
get content bundlesource code
list content bundlessource code
get content labelsource code
list content labelssource code
get contentsource code
list contentsource code
get creative templatesource code
list creative templatessource code
batch activate custom fieldssource code
batch create custom fieldssource code
batch deactivate custom fieldssource code
batch update custom fieldssource code
create custom fieldsource code
get custom fieldsource code
list custom fieldssource code
update custom fieldsource code
batch activate custom targeting keyssource code
batch create custom targeting keyssource code
batch deactivate custom targeting keyssource code
batch update custom targeting keyssource code
create custom targeting keysource code
get custom targeting keysource code
list custom targeting keyssource code
update custom targeting keysource code
get custom targeting valuesource code
list custom targeting valuessource code
get device capabilitysource code
list device capabilitiessource code
get device categorysource code
list device categoriessource code
get device manufacturersource code
list device manufacturerssource code
batch create entity signals mappingssource code
batch update entity signals mappingssource code
create entity signals mappingsource code
get entity signals mappingsource code
list entity signals mappingssource code
update entity signals mappingsource code
get geo targetsource code
list geo targetssource code
batch activate labelssource code
batch create labelssource code
batch deactivate labelssource code
batch update labelssource code
create labelsource code
get labelsource code
list labelssource code
update labelsource code
get line itemsource code
list line itemssource code
get linked devicesource code
list linked devicessource code
fetch mcm earningssource code
get mobile carriersource code
list mobile carrierssource code
get mobile devicesource code
list mobile devicessource code
get mobile device submodelsource code
list mobile device submodelssource code
get networksource code
list networkssource code
get operating systemsource code
list operating systemssource code
get operating system versionsource code
list operating system versionssource code
get ordersource code
list orderssource code
batch activate placementssource code
batch archive placementssource code
batch create placementssource code
batch deactivate placementssource code
batch update placementssource code
create placementsource code
get placementsource code
list placementssource code
update placementsource code
create private auction dealsource code
get private auction dealsource code
list private auction dealssource code
update private auction dealsource code
create private auctionsource code
get private auctionsource code
list private auctionssource code
update private auctionsource code
get programmatic buyersource code
list programmatic buyerssource code
create reportsource code
fetch report result rowssource code
get reportsource code
list reportssource code
run reportsource code
update reportsource code
get rich media ads companysource code
list rich media ads companiessource code
get rolesource code
list rolessource code
batch create sitessource code
batch deactivate sitessource code
batch submit sites for approvalsource code
batch update sitessource code
create sitesource code
get sitesource code
list sitessource code
update sitesource code
get taxonomy categorysource code
list taxonomy categoriessource code
batch activate teamssource code
batch create teamssource code
batch deactivate teamssource code
batch update teamssource code
create teamsource code
get teamsource code
list teamssource code
update teamsource code
get usersource code

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update as soon as possible to an actively supported LTS version.

Google's client libraries support legacy versions of Node.js runtimes on a best-efforts basis with the following warnings:

  • Legacy versions are not tested in continuous integration.
  • Some security patches and features cannot be backported.
  • Dependencies cannot be kept up-to-date.

Client libraries targeting some end-of-life versions of Node.js are available, and can be installed through npm dist-tags. The dist-tags follow the naming convention legacy-(version). For example, npm install @google-ads/admanager@legacy-8 installs client libraries for versions compatible with Node.js 8.

Versioning

This library follows Semantic Versioning.

More Information: Google Cloud Platform Launch Stages

Contributing

Contributions welcome! See the Contributing Guide.

Please note that this README.md and a variety of configuration files in this repository (including .nycrc and tsconfig.json) are generated from a central template.

License

Apache Version 2.0

See LICENSE

版本与发布记录

@google-ads/admanager 共发布 19 个版本,首次发布于 2024/12/19;过去 12 个月发布了 12 个版本。

版本发布日期距今
0.15.0latest2026/10/091 个月前
0.14.12026/09/291 个月前
0.14.02026/09/231 个月前
0.13.02026/09/162 个月前
0.12.02026/09/092 个月前
0.11.02026/09/032 个月前

其他发布通道:legacy-18 → 0.8.0。

关于 @google-ads/admanager 的常见问题

@google-ads/admanager 是什么?

Google Ad Manager API client for Node.js

如何安装 @google-ads/admanager?

在项目目录运行 npm install @google-ads/admanager,或使用 pnpm add / yarn add / bun add。

@google-ads/admanager 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@google-ads/admanager 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@google-ads/admanager 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@google-ads/admanager 可以商用吗?

@google-ads/admanager 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@google-ads/admanager 的下载量有多少?

根据 npm 官方下载统计,@google-ads/admanager 在 2026/10/17 – 2026/11/15 这 30 天内被下载 37,757 次,日均约 1,259 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@google-ads/admanager 还在维护吗?

最新版本 0.15.0 发布于 2026/10/09(1 个月前);至今共发布 19 个版本,其中过去 12 个月发布了 12 个;首次发布于 2024/12/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。