Skip to main content

GET/negative_keyword

Note: This method is only available for select partners who have been approved for the eBay priority strategy program. For information about how to request access to this program, refer to Priority Strategy Access Requests in the Promoted Listings Playbook. To determine if a seller qualifies for priority strategy, use the getAdvertisingEligibility method in Account API.
This method can be used to retrieve all of the negative keywords for ad groups in priority strategy campaigns that use the Cost Per Click (CPC) funding model.

The results can be filtered using the campaign_ids, ad_group_ids, and negative_keyword_status query parameters.

Call the getCampaigns method to retrieve a list of current campaign IDs for a seller.

Input

Resource URI

GET https://api.ebay.com/sell/marketing/v1/negative_keyword?

This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com root URI with api.sandbox.ebay.com

URI parameters

ParameterTypeDescription
ad_group_idsstringA comma-separated list of ad group IDs.

This query parameter is used if the seller wants to retrieve the negative keywords from one or more specific ad groups. The results might not include these ad group IDs if other search conditions exclude them.

Use the getAdGroups method to retrieve the ad group IDs for a seller.

Required if the search results must be filtered to include negative keywords created at the ad group level.

Occurrence: Conditional

campaign_idsstringThis path parameter specifies the unique eBay-assigned identifier of the ad campaign associated with the negative keywords being retrieved.

This query parameter is used if the seller wants to retrieve the negative keywords from a specific campaign. The results might not include these campaign IDs if other search conditions exclude them.

Note: Currently, only one campaign ID value is supported for each request.

Use the getCampaigns method to retrieve campaign IDs.

Occurrence: Optional

negative_keyword_statusstringA comma-separated list of negative keyword statuses.

This query parameter is used if the seller wants to filter the search results based on one or more negative keyword statuses.

See NegativeKeywordStatusEnum for supported values.

Occurrence: Optional

limitstringThe number of results, from the current result set, to be returned in a single page.

Occurrence: Optional

offsetstringThe number of results that will be skipped in the result set. This is used with the limit field to control the pagination of the output.

For example, if the offset is set to 0 and the limit is set to 10, the method will retrieve items 1 through 10 from the list of items returned. If the offset is set to 10 and the limit is set to 10, the method will retrieve items 11 through 20 from the list of items returned.

Occurrence: Optional

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

All other standard RESTful request headers are optional. For more information on standard RESTful request headers, see the HTTP request headers- opens rest request components page table.

OAuth scope

This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):

https://api.ebay.com/oauth/api_scope/sell.marketing.readonly

https://api.ebay.com/oauth/api_scope/sell.marketing

See OAuth access tokens for more information.

Request payload

This call has no payload.

Request fields

This call has no field definitions.

Output

HTTP response headers

This call has no response headers.

Response payload

Response fields

Output container/fieldTypeDescription
hrefstring

The URI of the current page of results from the result set.

Occurrence: Conditional

limitinteger

The number of items returned on a single page from the result set. This value can be set in the request with the limit query parameter.

Occurrence: Conditional

negativeKeywordsarray of NegativeKeyword

A list of negative keywords returned in the paginated collection.

Occurrence: Conditional

negativeKeywords.adGroupIdstring

An ad group ID that is generated when an ad group is first created and associated with a campaign.

Note: You can call the getAdGroups method to retrieve the ad group IDs for a seller.

Occurrence: Conditional

negativeKeywords.campaignIdstring

A unique eBay-assigned ID for a campaign. This ID is generated when a campaign is created.

Occurrence: Conditional

negativeKeywords.negativeKeywordIdstring

A unique eBay-assigned ID for a negative keyword. This keyword ID will be generated for each successfully created negative keyword.

Occurrence: Always

negativeKeywords.negativeKeywordMatchTypeNegativeKeywordMatchTypeEnum

A field that defines the match type for the negative keyword.

Note: Broad matching of negative keywords is not currently supported.
Valid Values:

  • EXACT
  • PHRASE

Occurrence: Always

negativeKeywords.negativeKeywordStatusNegativeKeywordStatusEnum

A field that defines the status of the negative keyword.

Occurrence: Always

negativeKeywords.negativeKeywordTextstring

The text for the negative keyword.

Occurrence: Always

nextstring

The call URI that can be used to retrieve the next page in the result set. This value is returned only if there is an additional page of results to display from the result set.

Occurrence: Conditional

offsetinteger

The number of results skipped in the result set before listing the first returned result. This value can be set in the request with the offset query parameter.

Default: 0

Note: The items in a paginated result set use a zero-based list, where the first item in the list has an offset of 0.

Occurrence: Conditional

prevstring

The call URI that can be used to retrieve the previous page in the result set. Basically, all of the request parameters will remain the same except the offset value, which will be decreased to retrieve the previous page of results.

Occurrence: Conditional

totalinteger

The total number of result sets in the paginated collection.

Occurrence: Conditional

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200Success
400Bad Request
403Forbidden
404Not Found
409Business error
500Internal Server error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
35001API_MARKETINGAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance.
35029API_MARKETINGREQUESTThe 'limit' has to be greater than zero and less than {maxLimitValue}.
35030API_MARKETINGREQUESTThe 'offset' cannot be less than zero.
35089API_MARKETINGBUSINESSWe are currently testing a premium ads product with a small invite-only group. We will share more information when we are ready to expand.
35129API_MARKETINGBUSINESSThis method is not supported for campaigns with smart targeting type.
36329API_MARKETINGREQUESTThe ad group Id is required.
36347API_MARKETINGREQUESTCurrently only one value is supported for 'campaign_ids'.
36350API_MARKETINGREQUESTThe 'negative_keyword_status' is invalid.

Warnings

This call has no warnings.

Samples

New to making API calls? Please see Making a Call.

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Retrieve Details for Multiple Negative Keywords

This example retrieves the details for multiple negative keywords.

Input

There is no additional input or request payload for this sample.

GEThttps://api.ebay.com/sell/marketing/v1/negative_keyword

Output

If the call is successful, the details for all available negative keywords are returned.

Got thoughts? Click the feedback button – your insights help us improve!