Negative Keywords
Deprecated since version 4.0.2.
Warning
There is a new version 3 of Sponsored Product API, please check the `migration guide`_.
- class ad_api.api.sp.NegativeKeywords(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, proxies=None, verify=True, timeout=None, debug=False, access_token=None)
- create_negative_keywords(self, \*\*kwargs) ApiResponse:
Creates one or more campaign negative keywords.
body: | REQUIRED {‘description’: ‘An array of keyword objects.}’
‘campaignId’: number, {‘description’: ‘The identifer of the campaign to which the keyword is associated.’}‘adGroupId’: number, {‘description’: ‘The identifier of the ad group to which this keyword is associated.’}‘state’: string, {‘description’: ‘The current resource state.’ , ‘Enum’: ‘[ enabled ]’}‘keywordText’: string, {‘description’: ‘The text of the expression to match against a search query.’}‘matchType’: string, {‘description’: ‘The type of match.’ , ‘Enum’: ‘[ negativeExact, negativePhrase ]’}Returns:
ApiResponse
- delete_negative_keyword(self, keywordId, \*\*kwargs) ApiResponse
Archives a campaign negative keyword.
path keywordId:number | Required. The identifier of an existing keyword.
Returns:
ApiResponse
- edit_negative_keywords(self, \*\*kwargs) ApiResponse:
Updates one or more campaign negative keywords.
body: | REQUIRED {‘description’: ‘An array of campaign negative keywords with updated values.’}
‘keywordId’: number, {‘description’: ‘The identifer of the campaign to which the keyword is associated.’}‘state’: string, {‘description’: ‘The current resource state.’ , ‘Enum’: ‘[ enabled, paused, archived ]’}Returns:
ApiResponse
- get_negative_keyword(self, keywordId, \*\*kwargs) ApiResponse
Gets a campaign negative keyword specified by identifier.
path keywordId:number | Required. The identifier of an existing keyword.
Returns:
ApiResponse
- get_negative_keyword_extended(self, keywordId, \*\*kwargs) ApiResponse
Gets a campaign negative keyword that has extended data fields.
path keywordId:number | Required. The identifier of an existing keyword.
Returns:
ApiResponse
- list_negative_keywords(self, \*\*kwargs) ApiResponse
Gets a list of negative keyword objects.
query startIndex:integer | Optional. 0-indexed record offset for the result set. Default value : 0
query count:integer | Optional. Number of records to include in the paged response. Defaults to max page size.
query matchTypeFilter:string | Optional. Restricts results to keywords with match types within the specified comma-separated list. Available values : negativePhrase, negativeExact.
query keywordText:string | Optional. Restricts results to keywords that match the specified text exactly.
query stateFilter:string | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, archived.
query campaignIdFilter:string | Optional. A comma-delimited list of campaign identifiers.
query adGroupIdFilter:string | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
query keywordIdFilter:string | Optional. Restricts results to keywords associated with campaigns specified by identifier in the comma-delimited list..
Returns:
ApiResponse
- list_negative_keywords_extended(self, \*\*kwargs) ApiResponse
Gets a list of negative keywords that have extended data fields.
query startIndex:integer | Optional. 0-indexed record offset for the result set. Default value : 0
query count:integer | Optional. Number of records to include in the paged response. Defaults to max page size.
query matchTypeFilter:string | Optional. Restricts results to keywords with match types within the specified comma-separated list. Available values : negativePhrase, negativeExact.
query keywordText:string | Optional. Restricts results to keywords that match the specified text exactly.
query stateFilter:string | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, archived.
query campaignIdFilter:string | Optional. A comma-delimited list of campaign identifiers.
query adGroupIdFilter:string | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
query keywordIdFilter:string | Optional. Restricts results to keywords associated with campaigns specified by identifier in the comma-delimited list.
Returns:
ApiResponse
Campaigns explanation goes here.