GET/item_group
This method lets you download a TSV_GZIP (tab separated value gzip) Item Group feed file. An item group is an item that has various aspect differences, such as color, size, storage capacity, etc.
There are two types of item group feed files generated:
- A daily Item Group feed file containing the item group variation information associated with items returned in the Item feed file for a specific day, category, and marketplace. (feed_scope =
NEWLY_LISTED
) - A weekly Item Group Bootstrap feed file containing all the item group variation information associated with items returned in the Item Bootstrap feed file for all the items in a specific category. (feed_scope =
ALL_ACTIVE
)
Note: Filters are applied to the feed files. For details, see Feed File Filters. When curating the items returned, be sure to code as if these filters are not applied as they can be changed or removed in the future.
Note:The downloaded file will be gzipped automatically, so there is no reason to supply Accept-Encoding:gzip as a header. If this header is supplied, the downloaded file will be compressed twice, and this has no extra benefit.
The contents of these feed files are based on the contents of the corresponding daily Item or Item Bootstrap feed file. When a new Item or Item Bootstrap feed file is generated, the service reads the file and if an item in the file has a primaryItemGroupId value, which indicates the item is part of an item group, it uses that value to return the item group (parent item) information for that item in the corresponding Item Group or Item Group Bootstrap feed file.
This information includes the name/value pair of the aspects of the items in this group returned in the variesByLocalizedAspects column. For example, if the item was a shirt some of the variation names could be Size, Color, etc. Also the images for the various aspects are returned in the additionalImageUrls column.
The first line in any feed file is the header, which labels the columns and indicates the order of the values on each line. Each header is described in the Response fields section.
Combining the Item Group and Item feed files
The Item Group or Item Group Bootstrap feed file contains details about the item group (parent item), including the item group ID itemGroupId. You match the value of itemGroupId from the Item Group feed file with the value of primaryItemGroupId from the corresponding daily Item or Item Bootstrap feed file.Downloading feed files
Item Group feed files are binary gzip files. If the file is larger than 100 MB, the download must be streamed in chunks. You specify the size of the chunks in bytes using the Range request header. The content-range response header indicates where in the full resource this partial chunk of data belongs and the total number of bytes in the file. For more information about using these headers, see Retrieve a gzip feed file.Note: A successful call will always return a TSV.GZIP file; however, unsuccessful calls generate errors that are returned in JSON format. For documentation purposes, the successful call response is shown below as JSON fields so that the value returned in each column can be explained. The order of the response fields shows the order of the columns in the feed file.
Restrictions
For a list of supported sites and other restrictions, see API Restrictions.Input
Resource URI
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
Parameter | Type | Description |
---|---|---|
feed_scope | string | This query parameter specifies the type of file to return. Valid Values:
|
category_id | string | This query parameter specifies eBay top-level category ID of the items to be returned in the feed file. The list of eBay category IDs changes over time and category IDs are not the same across all the eBay marketplaces. To get a list of the top-level categories for a marketplaces, you can use the Taxonomy API getCategoryTree method. This method retrieves the complete category tree for the marketplace. The top-level categories are identified by the categoryTreeNodeLevel field. For example: "categoryTreeNodeLevel": 1 For details see Get Categories for Buy APIs. Restriction: Must be a top-level category other than Real Estate. Items listed under Real Estate L1 categories are excluded from all feeds in all marketplaces. Occurrence: Required |
date | string | This query parameter specifies the date of the daily Item Group feed file (feed_scope=NEWLY_LISTED ) you want. The date is required only for the daily Item Group feed file. If you specify a date for the Item Group Bootstrap file (feed_scope= The Item Group feed files are generated every day and there are 14 daily files available. There is a 48 hour latency when generating the files. This means on July 10, the latest feed file you can download is July 8. Note: The generated files are stored using MST (US Mountain Standard Time), which is -7 hours UTC time.Format: yyyyMMdd Requirements:
Occurrence: Optional |
HTTP request headers
All requests made to eBay REST operations require you to provide the Authorization
HTTP header for authentication authorization.
The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.
Header | Type | Description |
---|---|---|
Accept | string | The formats that the client accepts for the response. A successful call will always return a TSV.GZIP file; however, unsuccessful calls generate error codes that are returned in JSON format. Default: application/json,text/tab-separated-values Occurrence: Required |
X-EBAY-C-MARKETPLACE-ID | string | The ID of the eBay marketplace where the item is hosted. This value is case sensitive. For example: X-EBAY-C-MARKETPLACE-ID = EBAY_US For a list of supported sites see, API Restrictions. Occurrence: Required |
Range | string | This header specifies the range in bytes of the chunks of the gzip file being returned. Format: bytes=startpos-endpos For example, the following retrieves the first 10 MBs of the feed file. Range bytes=0-10485760 For more information about using this header, see Retrieving a gzip feed file. Maximum: 100 MB (10MB in the Sandbox) Occurrence: Strongly Recommended |
OAuth scope
This request requires an access token created with the client credentials 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/buy.item.feed
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
See HTTP response headers for details.
Header | Meaning |
---|---|
Content-range | The content-range response header indicates where in the full resource this partial chunk of data belongs. It returns the lower and upper values in bytes (specified by the Range header) of the chunk and the total size of the file being downloaded in bytes. Maximum range: 100 MB The following is an example of a content-range response, where 0-10 is the lower and upper limit in bytes and 1000 is the total size of the file in bytes. 0-10/1000 The following example of a content-range response indicates the value of the Range header is invalid and a 416 status code is returned. */1000 For more information and examples, see Retrieving a gzip feed file. |
Last-Modified | Returns the generated date of the feed file, which will be the latest file available. For example: Last-Modified Wed, 21 Oct 2015 07:28:00 GMT |
Response payload
Important: The successful response of this call is always a TSV_GZIP file. However, the response is shown as JSON fields for each column so that the value returned in each column can be explained. The order in which the response fields are listed is the order of the columns in the feed file.
Response fields
Output container/field | Type | Description |
---|---|---|
itemGroups | array of ItemGroup | The container for the array of items groups returned by the getItemGroupFeed method. The data in the file is tab separated and the first row is the header, which labels the columns and indicates the order of the values for each item. The header labels match the fields that are described in the Response fields section. Occurrence: Always |
itemGroups.itemGroupId | string | The unique identifier for the item group. This ID is returned in the primaryItemGroupId column of the Item Feed file. Occurrence: Always |
itemGroups.itemGroupType | string | The item group type. For example: Important! This field no longer returns values and is scheduled for deprecation. Occurrence: Always |
itemGroups.title | string | The seller created title of the item group. This text is an escaped string when special characters are present, using the following rules:
For example Before:
After:
Occurrence: Always |
itemGroups.variesByLocalizedAspects | string | A pipe separated ( Encoded Format: Encoded Example (The delimiters are emphasized): Decoded: Occurrence: Always |
itemGroups.imageUrl | string | The URL to the primary image of the item. The other images of the item group are returned in the additionalImageUrls column. Occurrence: Always |
itemGroups.additionalImageUrls | string | A pipe separated ( Occurrence: Conditional |
itemGroups.imageAlteringProhibited | boolean | A boolean that indicates whether the images can be altered. If the value is Note: Due to image licensing agreements and other legal concerns, modification (including resizing) of some images is strictly prohibited. These images are for display as-is only. Occurrence: Always |
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.
Status | Meaning |
---|---|
200 | Success |
204 | No Content This code is returned when there are no items that meet the criteria for this feed file. See Feed File Filters for details. |
206 | Partial Content |
400 | Bad request |
403 | Forbidden |
404 | Not found |
416 | Range not satisfiable |
500 | Internal server error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
13000 | API_FEED | REQUEST | The request contains data that is invalid. Correct the request and submit the call again. For help, see the API Reference documentation for this call. |
13003 | API_FEED | REQUEST | The 'feed_scope' {feed_scope} submitted is invalid. Valid values: {feedScopes} |
13004 | API_FEED | REQUEST | The 'category_id' {category_id} submitted is invalid. See the API documentation for help on how to find category IDs. |
13005 | API_FEED | REQUEST | The 'date' {feedDate} submitted is invalid. Either the date format is wrong, or the files are not available for the specific date. Valid values: {earliestDate} to {latestDate} in the past. The format is yyyyMMdd. |
13006 | API_FEED | APPLICATION | There was a problem with an eBay internal system or process. Wait a few minutes and retry the call. If that doesn't work, contact eBay Support. |
13007 | API_FEED | REQUEST | The feed file requested cannot be found. It is possible the file requested is in the process of being generated. Either change the date or try the call again later. |
13009 | API_FEED | REQUEST | The mandatory 'feed_scope' query parameter is missing. Valid values: {feedScopes} |
13010 | API_FEED | REQUEST | The mandatory 'category_id' query parameter is missing. |
13011 | API_FEED | REQUEST | The mandatory 'date' query parameter is missing. Valid values: {earliestDate} to {latestDate} days in the past. The format is yyyyMMdd. |
13012 | API_FEED | REQUEST | The marketplace Id {marketplaceId} is invalid. Valid values: {allowedMarketplaces} |
13013 | API_FEED | REQUEST | The mandatory 'X-EBAY-C-MARKETPLACE-ID' header is missing. Valid values: {allowedMarketplaces} |
13014 | API_FEED | REQUEST | The marketplace Id {marketplaceId} is not supported. Valid values: {allowedMarketplaces} |
13015 | API_FEED | REQUEST | The mandatory 'Range' request header is missing. For help, see the API Reference documentation for this call. |
13016 | API_FEED | REQUEST | The 'Range' request header format is invalid. Format: 'bytes=start position-end position'. For help, see the API Reference documentation for this call. |
13017 | API_FEED | REQUEST | The 'Range' header is invalid. Please verify that the start and end positions are correct. For help, see the API Reference documentation for this call. |
13018 | API_FEED | REQUEST | The start position in the range header is invalid. |
13019 | API_FEED | REQUEST | The end position in the range header is invalid. |
13022 | API_FEED | REQUEST | The 'category_id' {category_id} submitted is not supported. |
13023 | API_FEED | BUSINESS | Insufficient permissions to access this API for the marketplace {marketplaceId}. Please contact eBay Technical Support for further assistance. |
13024 | API_FEED | BUSINESS | Insufficient permissions to access this API for the category {category_id}. Please contact eBay Technical Support for further assistance. |
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: Download the Daily Item Group Feed File
This sample returns a GZIP file containing the item group information for items in the Item feed (September 18, 2017 in the Cameras & Photo category) that were associated with an item group.
Input
The inputs are feed_scope=NEWLY_LISTED
and category_id URI parameters.
The request parameters are: Range bytes=0-10485760
and X-EBAY-C-MARKETPLACE-ID EBAY_US
.
For more information about using these headers, see HTTP request headers.
GEThttps://api.ebay.com/buy/feed/v1_beta/item_group?feed_scope=NEWLY_LISTED&category_id=625&date=20180418
Output
If the call is successful, the portion of the file specified by the Range header, is returned. The call returns a 206 HTTP status and the Content-range bytes=0-10485760/251658240
response header.
Sample 2: Download the Weekly Bootstrap Item Group Feed File
This sample returns the latest weekly Item Group Bootstrap feed file. It contains the item group variation information for the items in the corresponding Item Bootstrap feed file that were associated with an item group.
Note: Bootstrap files are generated every Tuesday and the file is available on Wednesday. However, the exact time the file is available can vary so we recommend you download the Bootstrap file on Thursday. The item groups in the file are for the items that were in the specified category on Sunday.
Input
The inputs are feed_scope=ALL_ACTIVE
, category_id, and date URI parameters.
The request parameters are: Range bytes=0-10485760
and X-EBAY-C-MARKETPLACE-ID EBAY_US
.
For more information about using these headers, see HTTP request headers.
GEThttps://api.ebay.com/buy/feed/v1_beta/item_group?feed_scope=ALL_ACTIVE&category_id=625
Output
If the call is successful, the portion of the file specified by the Range header, is returned. The call returns a 206 HTTP status and the Content-range bytes=0-10485760/251658240
response header.
Note: You can use the Feed SDK to download the entire entire file and you can also apply filters.