2025 年 9 月 8 日以降、すべての新しい広告申込情報で、欧州連合(EU)の政治広告を配信するかどうかを宣言する必要があります。宣言が提供されていないディスプレイ&ビデオ 360 API と SDF のアップロードは失敗します。統合を更新してこの宣言を行う方法について詳しくは、
非推奨のページをご覧ください。
使ってみる
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Display & Video 360 API は、ディスプレイ&ビデオ 360 プラットフォームのプログラマティック インターフェースです。Display & Video 360 API を使用すると、ディスプレイ&ビデオ 360 の複雑なワークフローを自動化できます。Display & Video 360 API で実行できるタスクの例を次に示します。
このガイドでは、Display & Video 360 API の使用を開始する方法について説明します。
前提条件
Display & Video 360 API を使用するには、次の手順が必要です。
Google アカウントが必要です。Google API Console でプロジェクトを作成するには、Google アカウントが必要です。すでにアカウントをお持ちの場合は、準備が整っています。テスト用に別の Google アカウントを取得することもできます。
ディスプレイ&ビデオ 360 へのアクセス権が必要です。API を使用するには、ディスプレイ&ビデオ 360 プロダクトへのアクセス権が必要です。組織ですでにディスプレイ&ビデオ 360 の契約を締結している場合は、Google アカウントに適切な権限を持つユーザー プロフィールが作成されていることを確認してください。そうでない場合は、Google のセールスチームにお問い合わせください。
ディスプレイ&ビデオ 360 を試してみることをおすすめします。この API ドキュメントは、ディスプレイ&ビデオ 360 を使用したことがあること、ウェブ プログラミングの概念とウェブ用のデータ形式に精通していることを前提としています。ディスプレイ&ビデオ 360 を初めて使用する場合は、コードを作成する前にウェブ UI をお試しください。
プロジェクトを選択
Google API Console でプロジェクトを作成または選択して API を有効にする必要があります。
新しいプロジェクトを作成するか、既存のプロジェクトを使用できます。
新しいプロジェクトを作成
Google API Console の手順に沿ってプロジェクトを作成し、Display & Video 360 API を自動的に有効にします。
既存のプロジェクトを使用する
既存のプロジェクトで Display & Video 360 API を手動で有効にする方法は次のとおりです。
プロジェクトで API を有効にする手順は、次のとおりです。
- Google API コンソールで API ライブラリを開きます。プロンプトが表示されたら、既存のプロジェクトのいずれかを選択するか、新しいプロジェクトを作成します。API ライブラリには、利用できるすべての API がプロダクト ファミリーと人気度によって分類され、表示されます。
- 有効にする API がリストで見当たらない場合は、検索して見つけます。
- 有効にする API を選択し、[有効にする] ボタンをクリックします。
- プロンプトが表示されたら、請求機能を有効にします。
- プロンプトが表示されたら、API の利用規約に同意します。
認証情報を生成する
ディスプレイ&ビデオ 360 API へのすべてのリクエストは認証を受ける必要があります。認証の概要については、Google に対してアプリケーションを認証および識別する方法をご覧ください。
以下の手順に沿って、OAuth 2.0 クライアント ID を作成します。この ID はインストール型アプリケーションのフローで使用します。サービス アカウントのフローで使用する認証情報の生成手順については、サービス アカウントのガイドをご覧ください。
手順に沿って Google API Console プロジェクトを設定します。
- API コンソールで [認証情報] ページを開きます。
[認証情報を作成] > [OAuth クライアント ID] をクリックします。
プロンプトが表示されたら、最も該当するアプリケーションの種類を選択します。このガイドで提供されている Java と Python のコード スニペットはデスクトップ アプリを前提としていますが、PHP のコード スニペットはウェブ アプリケーションを前提としています。
必要な追加情報を入力します。
- 初めてクライアント ID を作成する場合は、アプリケーション タイプを選択できるほか、[同意画面を設定] ボタンをクリックして独自の同意画面を設定することもできます。最初に同意画面を設定すると、その後設定を求められることはなくなります。この情報はいつでも更新できます。
[作成] をクリックします。
手順を完了すると、OAuth 2.0 クライアント ID とクライアント シークレットが表示されます。これらを JSON 形式でダウンロードして保存しておけば、後で使用できます。
OAuth 2.0 を認証に使用すると、アプリケーションのユーザーはユーザー同意画面で提示される利用規約に同意した後に認証されます。
次の手順で、プロジェクトの同意画面を設定します。
- Google API Console で [同意画面] ページを開きます。プロンプトが表示されたら、プロジェクトのいずれかを選択するか、新しいプロジェクトを作成します。
- フォームに記入して [保存] をクリックします。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-31 UTC。
[null,null,["最終更新日 2025-08-31 UTC。"],[[["\u003cp\u003eThe Display & Video 360 API allows programmatic access to automate complex workflows within the Display & Video 360 platform, including tasks like creative management, line item targeting, and structured data file generation.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the API, ensure you have a Google Account, access to Display & Video 360, and familiarize yourself with the platform's web UI.\u003c/p\u003e\n"],["\u003cp\u003eYou need to create or select a Google API Console project and enable the Display & Video 360 API to start using it.\u003c/p\u003e\n"],["\u003cp\u003eGenerate OAuth 2.0 credentials for authorization, following the guide for either installed application or service account flow depending on your needs.\u003c/p\u003e\n"],["\u003cp\u003eConfigure a user consent screen for your project within the Google API Console to handle user authentication when using OAuth 2.0.\u003c/p\u003e\n"]]],["The Display & Video 360 API automates tasks like uploading creatives, managing line items and targeting, and generating Structured Data Files. To begin, users need a Google Account and Display & Video 360 access, alongside experience with the platform. They must create or select a project in the Google API Console and enable the API. Credentials, specifically an OAuth 2.0 client ID, must be generated, and the user consent screen must be configured to enable application authorization.\n"],null,["The Display \\& Video 360 API is the programmatic interface for the Display \\& Video 360\nplatform. You can use the Display \\& Video 360 API to automate complex\nDisplay \\& Video 360 workflows. Here are some examples of tasks you can do with the\nDisplay \\& Video 360 API:\n\n- [Upload and build\n creatives.](/display-video/api/guides/creating-creatives/overview)\n- [Manage line items and their\n targeting.](/display-video/api/guides/managing-line-items/overview)\n- [Generate and download Structured Data\n Files.](/display-video/api/guides/downloading-sdfs/create)\n\nThis guide describes how to get started with the Display \\& Video 360 API.\n\nPrerequisites\n\nBefore using the Display \\& Video 360 API, you must do the following:\n\n1. **You must have a Google Account.** You need a\n [Google Account](//www.google.com/accounts/NewAccount) in order to [create a project](#create_project)\n in the Google API Console. If you already have an\n account, then you're all set. You may also want a separate Google Account for\n testing purposes.\n\n2. **You must have access to Display \\& Video 360.** You need access to the\n Display \\& Video 360 product in order to work with the API. If your\n organization already has a Display \\& Video 360 contract, ensure a\n [user profile](//support.google.com/displayvideo/answer/2723011) with appropriate permissions has been\n created for your Google Account(s). If not,\n [contact our sales team](//marketingplatform.google.com/about/display-video-360/) for more information.\n\n3. **You should try out Display \\& Video 360.** This API documentation assumes\n that you've used Display \\& Video 360, and that you're familiar with web\n programming concepts and web data formats. If you haven't used\n Display \\& Video 360, then try out the [web UI](https://displayvideo.google.com/) before\n starting to code.\n\nChoose a project\n\nYou need to [create\nor select a project in the Google API Console and enable the API](https://console.cloud.google.com/start/api?id=displayvideo.googleapis.com&credential=client_key).\n\nYou can create a new project, or use an existing one.\n\nCreate a new project\n\nFollow the steps in the [Google API Console](https://console.cloud.google.com/start/api?id=displayvideo.googleapis.com&credential=client_key)\nto create a project and enable the Display \\& Video 360 API automatically.\n\nUse an existing project\n\nHere's how to manually activate the Display \\& Video 360 API for an existing project.\n\nTo enable an API for your project, do the following:\n\n1. [Open the API Library](https://console.cloud.google.com/apis/library) in the Google API Console. If prompted, select a project or create a new one. The API Library lists all available APIs, grouped by product family and popularity.\n2. If the API you want to enable isn't visible in the list, use search to find it.\n3. Select the API you want to enable, then click the **Enable** button.\n4. If prompted, enable billing.\n5. If prompted, accept the API's Terms of Service.\n\nGenerate credentials\n\nAll requests you make to the Display \\& Video 360 API must be authorized. For a brief\noverview of authorization, read about how to [authorize and identify your\napplication to Google](/display-video/api/guides/how-tos/authorizing).\n\nThe following instructions guide you through the process of creating an OAuth\n2.0 client ID to use with the [installed application\nflow](/identity/protocols/OAuth2InstalledApp). For instructions on generating credentials for use\nwith the service account flow, refer to the [Service Accounts](/display-video/api/guides/how-tos/service-account)\nguide.\n\n1. Follow the steps to [configure a Google API Console project](#create_project).\n\n\n2. Open the [Credentials page](https://console.cloud.google.com/apis/credentials) in the API Console.\n3. Click **Create credentials** \\\u003e **OAuth client ID**.\n\n4. Select the most applicable application type when prompted. The Java and\n Python code snippets offered in these guides assume a **Desktop app** , while\n the PHP code snippets assume a **Web application**.\n\n5. Enter any additional required information.\n\n - If this is your first time creating a client ID, besides being able to select your application type, you can configure your consent screen by clicking the **Configure consent screen** button. You won't get a prompt to configure your consent screen again after you do it the first time, although this information can be updated at any time.\n6. Click **Create**.\n\nWhen done, you'll be presented with an OAuth 2.0 client ID and client\nsecret, which you can download in JSON format and save for later use.\n\nConfigure the user consent screen\n\nWhen you use OAuth 2.0 for authentication, your users are authenticated after\nthey agree to terms presented to them on a user consent screen.\n\n\nTo set up your project's consent screen, do the following:\n\n1. Open the [Consent Screen page](https://console.cloud.google.com/apis/credentials/consent) in the Google API Console. If prompted, select a project or create a new one.\n2. Fill out the form and click **Save**."]]