開発者ガイドの概要

Amazon Ads APIの概要

広告グループの除外キーワード

警告

これらのエンドポイントは、2023年6月30日に廃止されます。今後は、スポンサープロダクト広告バージョン3除外キーワードをご利用ください。詳細については、廃止予定のページをご覧ください。

広告グループレベルの除外キーワードの作成、読み取り、更新、削除に使用されます。次の 表は、サービスの管理対象リソースによってサポートされる URL空間とHTTPメソッドに関するサービスの動作を示しています。

メソッド URL ユースケース
GET /negativeKeywords/{keywordId} IDを指定して、広告グループレベルの除外キーワードを取得します
GET /negativeKeywords/extended/{keywordId} IDを指定して、広告グループレベルの除外キーワードとその他のプロパティを取得します
POST /negativeKeywords 広告グループレベルの除外キーワードを1つ以上作成します
PUT /negativeKeywords 広告グループレベルの除外キーワードを1つ以上更新します
DELETE /negativeKeywords/{keywordId} 広告グループレベルの除外キーワードを1つだけ非表示にします。非表示にされたエンティティを再度有効化することはできません。詳細については、開発者メモをご覧ください。
GET /negativeKeywords?startIndex={startIndex}&count={count}&campaignType={campaignType}&matchTypeFilter={matchTypeFilter}&keywordText={keywordText}&state={stateFilter}&campaignIdFilter={campaignIdFilter}&adGroupIdFilter={adGroupIdFilter} 指定された条件に基づいて、広告グループレベルの除外キーワードのリストを返します
GET /negativeKeywords/extended?startIndex={startIndex}&count={count}&campaignType={campaignType}&matchTypeFilter={matchTypeFilter}&keywordText={keywordText}&stateFilter={stateFilter}&campaignIdFilter={campaignIdFilter}&adGroupIdFilter={adGroupIdFilter} 指定された条件に基づいて、広告グループレベルの除外キーワードとその他のプロパティのリストを返します

操作

getNegativeKeyword

GET /negativeKeywords/{keywordId}

IDを指定して、除外キーワードを取得します。この呼び出しは、最小限のキーワードフィールドを 返しますが、 getNegativeKeywordExよりも効率的であることに注意してください。

パラメーター

パラメーター名 タイプ 説明
keywordId string リクエストされたキーワードのID

レスポンス

ステータスコード レスポンスオブジェクト
200 - success NegativeKeyword
401 - unauthorized Error
404 - keyword not found Error

getNegativeKeywordEx

GET /negativeKeywords/extended/{keywordId}

IDを指定して、除外キーワードとその拡張フィールドを取得します。この呼び出しは、 キーワードフィールドをすべて(配信 ステータスおよびその他の読み取り専用フィールドを含む)返しますが、 getNegativeKeywordよりも非効率であることに注意してください。

パラメーター

パラメーター名 タイプ 指定対象 説明
keywordId string URLパス リクエストされたキーワードのID

レスポンス

ステータスコード レスポンスオブジェクト
200 - success NegativeKeywordEx
401 - unauthorized Error
404 - keyword not found Error

createNegativeKeywords

POST /negativeKeywords

除外キーワードを1件以上作成します。正常に作成されたキーワードには、 固有のkeywordIdが割り当てられます。

パラメーター

タイプ 指定対象 説明
NegativeKeywordのリスト 本文 作成する最大1000件の除外キーワードを含むリスト。キーワードの作成に必要なフィールドは、campaignIdadGroupIdkeywordTextmatchTypestateです。

レスポンス

ステータスコード レスポンスオブジェクト
207 - multi-status 入力と同じ順序を反映するNegativeKeywordResponseのリスト
401 - unauthorized Error

updateNegativeKeywords

PUT /negativeKeywords

除外キーワードを1件以上更新します。キーワードは、 keywordIdを使用して指定されます。

パラメーター

タイプ 指定対象 説明
Keywordのリスト 本文 keywordIdおよび変更される変更可能フィールドを含む、最大1000個の更新のリスト。変更可能フィールド:state

レスポンス

ステータスコード レスポンスオブジェクト
207 – multi-response 入力と同じ順序を反映するNegativeKeywordResponseのリスト
401 - unauthorized Error

archiveNegativeKeyword

DELETE /negativeKeywords/{keywordId}

除外キーワードのステータスを非表示に設定します。ステータスの更新によってもこの同じ操作を 実行できますが、完全を期すために含めています。 非表示にされたエンティティを再度有効化することはできません。詳細については、開発者メモ をご覧ください。

パラメーター

パラメーター名 タイプ 指定対象 説明
keywordId string URLパス 非表示にするキーワードのID。

レスポンス

ステータスコード レスポンスオブジェクト
200 - success NegativeKeywordResponse
401 - unauthorized Error
404 - keyword not found Error

listNegativeKeywords

GET /negativeKeywords/                                                     
    ?startIndex={startIndex}              
    &count={count}                        
    &campaignType={campaignType}          
    &matchTypeFilter={matchTypeFilter}    
    &keywordText={keywordText}            
    &stateFilter={stateFilter}            
    &campaignIdFilter={campaignIdFilter}  
    &adGroupIdFilter={adGroupIdFilter}

オプションの条件を満たす除外キーワードのリストを取得します。

パラメーター

パラメーター名 タイプ 指定対象 説明
startIndex integer URLクエリ オプション。結果セットのインデックスが0のレコードオフセット。デフォルトは0です。
count integer URLクエリ オプション。ページングされたレスポンスに含めるレコードの数。デフォルトで、最大ページサイズに設定されます。
campaignType string URLクエリ オプション。指定されたタイプのキャンペーンに属するキーワードに関する結果のみを返します。指定できるのはsponsoredProductsのみです。
matchTypeFilter string URLクエリ オプション。カンマ区切りリストで指定されたマッチタイプのキーワードに関する結果のみを返します。有効な値は、negativePhrasenegativeExactです。
keywordText string URLクエリ オプション。指定されたkeywordTextを持つキーワードに関する結果のみを返します。
stateFilter string URLクエリ オプション。カンマ区切りリストで指定された状態のキーワードに関する結果のみを返します。指定できるのはenabledpausedarchivedのいずれかです。デフォルトの動作では、これらすべてが含められます。
campaignIdFilter string URLクエリ オプション。カンマ区切りリストで指定されたキャンペーン内のキーワードに関する結果のみを返します。
adGroupIdFilter string URLクエリ オプション。カンマ区切りリストで指定された広告グループ内のキーワードに関する結果のみを返します。

レスポンス

ステータスコード レスポンスオブジェクト
200 - success NegativeKeywordのリスト
401 - unauthorized Error

listNegativeKeywordsEx

GET /negativeKeywords/extended                                             
    ?startIndex={startIndex}                                                   
    &count={count}                        
    &campaignType={campaignType}          
    &matchTypeFilter={matchTypeFilter}    
    &keywordText={keywordText}            
    &stateFilter={stateFilter}            
    &campaignIdFilter={campaignIdFilter}  
    &adGroupIdFilter={adGroupIdFilter}

オプションの条件を満たす拡張フィールドを持つ除外キーワードのリストを 取得します。

パラメーター

パラメーター名 タイプ 指定対象 説明
startIndex integer URLクエリ オプション。結果セットのインデックスが0のレコードオフセット。デフォルトは0です。
count integer URLクエリ オプション。ページングされたレスポンスに含めるレコードの数。デフォルトで、最大ページサイズに設定されます。
campaignType string URLクエリ オプション。指定されたタイプのキャンペーンに属するキーワードに関する結果のみを返します。指定できるのはsponsoredProductsのみです。
matchTypeFilter string URLクエリ オプション。カンマ区切りリストで指定されたマッチタイプのキーワードに関する結果のみを返します。有効な値は、negativePhrasenegativeExactです。
keywordText string URLクエリ オプション。指定されたkeywordTextを持つキーワードに関する結果のみを返します。
stateFilter string URLクエリ オプション。カンマ区切りリストで指定された状態のキーワードに関する結果のみを返します。指定できるのはenabledpausedarchivedのいずれかです。デフォルトの動作では、これらすべてが含められます。
campaignIdFilter string URLクエリ オプション。カンマ区切りリストで指定されたキャンペーン内のキーワードに関する結果のみを返します。
adGroupIdFilter string URLクエリ オプション。カンマ区切りリストで指定された広告グループ内のキーワードに関する結果のみを返します。

レスポンス

ステータスコード レスポンスオブジェクト
200 - success NegativeKeywordExのリスト
401 - unauthorized Error

リソースの表現

NegativeKeyword

{
    "title": "NegativeKeyword",
    "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"
        },
        "adGroupId": {
            "description": "The ID of the ad group to which this keyword belongs",
            "type": "number"
        },
        "state": {
            "description": "Advertiser-specified state of the keyword",
            "type": "string",
            "oneOf": ["enabled", "paused", "archived"]
        },
        "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"]
        }
    }
}

NegativeKeywordEx

{
    "title": "NegativeKeywordEx",
    "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"
        },
        "adGroupId": {
            "description": "The ID of the ad group to which this keyword belongs",
            "type": "number"
        },
        "state": {
            "description": "Advertiser-specified state of the keyword",
            "type": "string",
            "oneOf": ["enabled", "paused", "archived"]
        },
        "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 keyword was created as epoch time in milliseconds",
            "type": "number"
        },
        "lastUpdatedDate": {
            "description": "The date the keyword 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_ARCHIVED", "TARGETING_CLAUSE_STATUS_LIVE"]
        }
    }
}

NegativeKeywordResponse

{
    "title": "NegativeKeywordResponse",
    "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"
       }
    }
}

エラー

開発者メモで説明されているエラーレスポンスオブジェクト形式をご覧ください。