キャンペーンの除外キーワード
警告
これらのエンドポイントは、2023年6月30日に廃止されます。以降は、スポンサープロダクト広告バージョン3キャンペーン除外キーワードをご利用ください。詳細については、廃止予定のページをご覧ください。
広告キャンペーンレベルの除外キーワードの作成、読み取り、更新、削除に使用されます。次の表は、サービス管理リソースによってサポートされるURLスペースとHTTPメソッドに応じたサービスの動作を示しています。
メソッド |
URL |
ユースケース |
GET |
/campaignNegativeKeywords/{keywordId} |
IDを指定して、キャンペーンレベルの除外キーワードを取得します |
GET |
/campaignNegativeKeywords/extended/{keywordId} |
IDを指定して、キャンペーンレベルの除外キーワードとその他のプロパティを取得します |
POST |
/campaignNegativeKeywords |
キャンペーンレベルの除外キーワードを1つ以上作成します |
PUT |
/campaignNegativeKeywords |
キャンペーンレベルの除外キーワードを1つ以上更新します |
DELETE |
/campaignNegativeKeywords/{keywordId} |
キャンペーンレベルの除外キーワードを1つ削除します |
GET |
/campaignNegativeKeywords ?startIndex={startIndex} &count={count} &campaignType={campaignType} &matchTypeFilter={matchTypeFilter} &keywordText={keywordText} &campaignIdFilter={campaignIdFilter} |
指定された条件に基づいて、キャンペーンレベルの除外キーワードのリストを返します |
GET |
/campaignNegativeKeywords/extended ?startIndex={startIndex} &count={count} &campaignType={campaignType} &matchTypeFilter={matchTypeFilter} &keywordText={keywordText} &campaignIdFilter={campaignIdFilter} |
指定された条件に基づいて、キャンペーンレベルの除外キーワードとその他のプロパティのリストを返します |
操作
getCampaignNegativeKeyword
GET /campaignNegativeKeywords/{keywordId}
IDを指定して、キャンペーンの除外キーワードを取得します。この呼び出しは、最小限のキーワードフィールドを
返しますが、
getCampaignNegativeKeywordEx
より効率的です。
パラメーター
パラメーター名 |
タイプ |
説明 |
keywordId |
string |
リクエストされたキーワードのID |
レスポンス
getCampaignNegativeKeywordEx
GET /campaignNegativeKeywords/extended/{keywordId}
IDを指定して、キャンペーンの除外キーワードとその拡張フィールドを取得します。
この呼び出しは、キーワードフィールドをすべて
(配信ステータスおよびその他の読み取り専用フィールドを含む)返しますが、
getCampaignNegativeKeyword
より非効率です。
パラメーター
パラメーター名 |
タイプ |
指定対象 |
説明 |
keywordId |
string |
URLパス |
リクエストされたキーワードのID |
レスポンス
createCampaignNegativeKeywords
POST /campaignNegativeKeywords
キャンペーンの除外キーワードを1つ以上作成します。正常に作成された
キーワードには、固有のkeywordId
が割り当てられます。
パラメーター
タイプ |
指定対象 |
説明 |
CampaignNegativeKeyword のリスト |
本文 |
作成する最大1,000件のキャンペーンの除外キーワードのリスト。キーワードの作成に必要なフィールドは、campaignId 、keywordText 、matchType 、state です。 |
レスポンス
updateCampaignNegativeKeywords
PUT /campaignNegativeKeywords
キャンペーンの除外キーワードを1つ以上更新します。キーワードは、
keywordId
を使用して識別されます。
パラメーター
レスポンス
removeCampaignNegativeKeyword
DELETE /campaignNegativeKeywords/{keywordId}
キャンペーンの除外キーワードのステータスを削除済みに設定します。ステータスの更新によってもこの同じ
操作を実行できますが、
完全を期すために含めています。
注: 広告グループレベルのキーワード(入札可能キーワードと除外キーワードの両方)では
一時停止ステータスと非表示ステータスに対応していますが、キャンペーンの除外キーワードでは
有効ステータスまたは削除済みステータスのみに対応しています。削除済みステータスは、
キャンペーンの除外キーワードが完全に削除されることを示します。削除されたエンティティをIDを指定して取得すると、
404エラーになります。
パラメーター
パラメーター名 |
タイプ |
指定対象 |
説明 |
keywordId |
string |
URLパス |
削除するキーワードのID |
レスポンス
listCampaignNegativeKeywords
GET /campaignNegativeKeywords/
?startIndex={startIndex}
&count={count}
&campaignType={campaignType}
&matchTypeFilter={matchTypeFilter}
&keywordText={keywordText}
&campaignIdFilter={campaignIdFilter}
オプションの条件を満たす除外キーワードのリストを取得します。
パラメーター
パラメーター名 |
タイプ |
指定対象 |
説明 |
startIndex |
integer |
URLクエリ |
オプション。結果セットのインデックスが0のレコードオフセット。デフォルトは0です。 |
count |
integer |
URLクエリ |
オプション。ページングされたレスポンスに含めるレコードの数。デフォルトで、最大ページサイズに設定されます。 |
campaignType |
string |
URLクエリ |
オプション。指定されたタイプのキャンペーンに属するキーワードに関する結果のみを返します。指定できるのはsponsoredProducts のみです。 |
matchTypeFilter |
string |
URLクエリ |
オプション。カンマ区切りリストで指定されたマッチタイプのキーワードに関する結果のみを返します。有効な値は、negativePhrase 、negativeExact です。 |
keywordText |
string |
URLクエリ |
オプション。指定されたkeywordText を持つキーワードに関する結果のみを返します。 |
campaignIdFilter |
string |
URLクエリ |
オプション。カンマ区切りリストで指定されたキャンペーン内のキーワードに関する結果のみを返します。 |
レスポンス
listCampaignNegativeKeywordsEx
GET /campaignNegativeKeywords/extended
?startIndex={startIndex}
&count={count}
&matchTypeFilter={matchTypeFilter}
&keywordText={keywordText}
&campaignIdFilter={campaignIdFilter}
オプションの条件を満たす拡張フィールドを持つキャンペーンの除外キーワードのリストを
取得します。
パラメーター
パラメーター名 |
タイプ |
指定対象 |
説明 |
startIndex |
integer |
URLクエリ |
オプション。結果セットのインデックスが0のレコードオフセット。デフォルトは0です。 |
count |
integer |
URLクエリ |
オプション。ページングされたレスポンスに含めるレコードの数。デフォルトで、最大ページサイズに設定されます。 |
campaignType |
string |
URLクエリ |
オプション。指定されたタイプのキャンペーンに属するキーワードに関する結果のみを返します。指定できるのはsponsoredProducts のみです。 |
matchTypeFilter |
string |
URLクエリ |
オプション。カンマ区切りリストで指定されたマッチタイプのキーワードに関する結果のみを返します。有効な値は、negativePhrase 、negativeExact です。 |
keywordText |
string |
URLクエリ |
オプション。指定されたkeywordText を持つキーワードに関する結果のみを返します。 |
campaignIdFilter |
string |
URLクエリ |
オプション。カンマ区切りリストで指定されたキャンペーン内のキーワードに関する結果のみを返します。 |
レスポンス
リソースの表現
CampaignNegativeKeyword
{
"title": "CampaignNegativeKeyword",
"type": "object",
"properties": {
"keywordId": {
"description": "The ID of the keyword",
"type": "number"
},
"campaignId": {
"description": "The ID of the campaign to which this keyword belongs",
"type": "number"
},
"state": {
"description": "Advertiser-specified state of the keyword",
"type": "string",
"oneOf": ["enabled", "deleted"]
},
"keywordText": {
"description": "The expression to match against search queries",
"type": "string"
},
"matchType": {
"description": "The match type used to match the keyword to search query",
"type": "string",
"oneOf": ["negativeExact", "negativePhrase"]
}
}
}
CampaignNegativeKeywordEx
{
"title": "CampaignNegativeKeywordEx",
"type": "object",
"properties": {
"keywordId": {
"description": "The ID of the keyword",
"type": "number"
},
"campaignId": {
"description": "The ID of the campaign to which this keyword belongs",
"type": "number"
},
"state": {
"description": "Advertiser-specified state of the keyword",
"type": "string",
"oneOf": ["enabled", "deleted"]
},
"keywordText": {
"description": "The expression to match against search queries",
"type": "string"
},
"matchType": {
"description": "The match type used to match the keyword to search query",
"type": "string",
"oneOf": ["negativeExact", "negativePhrase"]
},
"creationDate": {
"description": "The date the ad group was created as epoch time in milliseconds",
"type": "number"
},
"lastUpdatedDate": {
"description": "The date the ad group was last updated as epoch time in milliseconds",
"type": "number"
},
"servingStatus": {
"description": "The computed status, accounting for out of budget, policy violations, etc.See developer notes for more information.",
"type": "string",
"oneOf": ["TARGETING_CLAUSE_STATUS_LIVE"]
}
}
}
CampaignNegativeKeywordResponse
{
"title": "CampaignNegativeKeywordResponse",
"type": "object",
"properties": {
"keywordId": {
"description": "The ID of the keyword that was created/updated, if successful",
"type": "number"
},
"code": {
"description": "An enumerated success or error code for machine use.",
"type": "string"
},
"details": {
"description": "A human-readable description of the error, if unsuccessful",
"type": "string"
}
}
}
エラー
開発者メモで解説されているエラーオブジェクトの戻り値形式をご覧ください。