GET/file
The getFiles method provides a list of the feed files available for download.
Details for each feed returned include the date the feed was generated, the frequency with which it is pulled, its feed type, its fileId, its format (currently only TSV is supported), the eBay marketplaces it applies to, the schema version under which it was generated, its size in bytes, and the time span it covers (in hours).
You can limit your search results by feed type, marketplace, scope, eBay L1 category, and how far back in time from the present the feed was made available. Set the look_back field to control exactly how many feeds from the past are retrieved.
Restrictions
For a list of supported sites and other restrictions, see API Restrictions.
Input
Resource URI
This method is not supported in Sandbox environment.
URI parameters
Parameter | Type | Description |
---|---|---|
feed_type_id | string | This query parameter specifies the unique identifier for the feed type to be used as a search filter. Use the getFeedTypes method to identify available feed types. Note: Refer to Supported feed types to learn more about the feed types supported by the Feed API. Occurrence: Required |
feed_scope | string | This query parameter specifies the frequency with which the feed file is made available (HOURLY , DAILY , WEEKLY ).Note: Currently only DAILY and HOURLY are supported. Occurrence: Optional |
category_ids | string | This query parameter is used to specify one or more eBay L1 category IDs. If this filter is used, only feed files that are supported for the specified category (or categories) will be returned in the response. Each category ID value must be delimited by a comma. For details, see Get Categories for Buy APIs. Max: 20 values Occurrence: Optional |
look_back | string | This filter controls how far back from the current time to limit the returned feed files and is specified in minutes. The returned feed files will be those generated between the current time and the look-back time. Example: A value of 120 will limit the returned feed files to those generated in the past 2 hours (120 minutes). If 3 feed files have been generated in the past 2 hours, those 3 files will be returned. A feed file generated 4 hours earlier will not be returned.Important! Unless the look_back filter is used, available files generated approximately within the last 48 hours are returned in the response. The look_back filter can be used to increase or decrease this time frame. The maximum (minutes) value set for this parameter should not exceed the lookBack threshold for the feed type returned in getFeedType/getFeedTypes. Occurrence: Optional |
limit | string | Indicates the number of records to show in the response. Default: 20 Minimum: 20 Maximum: 100 Occurrence: Optional |
continuation_token | string | The server returns this token to the web client when the responses received require multiple pages to display. The web client sends this token back to the server to get the next page of results. 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 |
---|---|---|
X-EBAY-C-MARKETPLACE-ID | string | Indicates the unique identifier of the eBay marketplace on which to search for feed files. Example: X-EBAY-C-MARKETPLACE-ID: EBAY_US .See MarketplaceIdEnum for supported values. Occurrence: Required |
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
This call has no response headers.
Response payload
Response fields
Output container/field | Type | Description |
---|---|---|
fileMetadata | array of FileMetadata | An array of metadata values describing the available feed files that match the input criteria. Occurrence: Always |
fileMetadata.access | AccessEnum | Indicates whether the application is permitted to access the feed file. One of Occurrence: Always |
fileMetadata.dimensions | array of Dimension | An array of dimensions supported by the corresponding feed file. Occurrence: Always |
fileMetadata.dimensions.dimensionKey | DimensionKeyEnum | The key element for a value in the dimensions array, paired with its value(s). Currently, only CATEGORY (available L1 category) is available. Occurrence: Always |
fileMetadata.dimensions.values | array of string | The dimension value(s) paired with the dimensionKey in the dimensions array. Currently, the only supported dimension is CATEGORY, so the values in this array will be L1 eBay categories.” Occurrence: Always |
fileMetadata.feedDate | string | The date on which the feed was created. Occurrence: Always |
fileMetadata.feedScope | FeedScopeEnum | Specifies the frequency with which the feed file is made available ( Occurrence: Always |
fileMetadata.feedTypeId | string | The unique identifier of the feed type. Occurrence: Always |
fileMetadata.fileId | string | The file's unique identifier. This fileid is used to select the feed file when using the downloadFile method. Occurrence: Always |
fileMetadata.format | FormatEnum | Format of the returned feed file. Currently only TSV is supported. Occurrence: Always |
fileMetadata.marketplaceId | MarketplaceIdEnum | The eBay marketplace identifier for the marketplace(s) to which the feed applies. Occurrence: Always |
fileMetadata.schemaVersion | string | Version of the API schema under which the feed was created. Occurrence: Always |
fileMetadata.size | integer | Size of the feed file in bytes. Occurrence: Always |
fileMetadata.span | TimeDuration | The time span between feed files that applies to the feed type (e.g., hourly, daily, weekly). Occurrence: Always |
fileMetadata.span.unit | TimeDurationUnitEnum | This enumeration value indicates the time unit used for the time period. Occurrence: Always |
fileMetadata.span.value | integer | The number of units of time in the span. Occurrence: Always |
href | string | The URL to to the current set of results. Occurrence: Always |
limit | integer | The number of results that will be displayed on each page, as set by the limit URI parameter. Occurrence: Always |
next | string | You can use this URL to retrieve the next page of results beyond those displayed on the page if there are more results that match the search criteria. Occurrence: Conditional |
total | integer | The total number of matches for the search criteria. 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 | OK |
400 | Bad Request |
403 | Forbidden |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
13003 | API_FEED | REQUEST | Invalid 'feed_scope'. Valid values: [HOURLY,DAILY,WEEKLY] |
13006 | API_FEED | APPLICATION | There was a problem with an eBay internal system or process. Contact eBay developer support for assistance. |
13014 | API_FEED | REQUEST | Invalid or missing header X-EBAY-C-MARKETPLACE-ID. |
14001 | API_FEED | REQUEST | Invalid limit. Supported ranges 20 - 100. |
14002 | API_FEED | REQUEST | Invalid or expired continuation token. |
14005 | API_FEED | REQUEST | Maximum number of category_ids exceeded.Limit: 20. |
14006 | API_FEED | REQUEST | Invalid look back period for the feedType and feedScope.Please refer to documentation. |
14008 | API_FEED | REQUEST | Invalid or missing feed type Id. |
14009 | API_FEED | REQUEST | Insufficient permissions for the feed type for the specified marketplace. 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: Retrieve a list of all available CURATED_ITEM_FEED feed files
The getFiles method can be used to retrieve a list of all feed files of a specified type available for download. In this sample, all CURATED_ITEM_FEED
feed files available for download are returned.
Input
The feed_type_id query parameter is used to limit the response to only return CURATED_ITEM_FEED
type feed files.
Important: Unfiltered lists can be extremely large; it is best to filter by at least feed type.
GEThttps://api.ebay.com/buy/feed/v1/file?feed_type_id=CURATED_ITEM_FEED
Output
A single file, EPN-CURATED_ITEM_FEED.txt.gz
, is available for download. It is a daily curated feed restricted to L1 category 6000
in the US marketplace.
Sample 2: Retrieve a list of all available PRODUCT_FEED feed files
The getFiles method can be used to retrieve a list of all feed files of a specified type available for download. In this sample, all PRODUCT_FEED
feed files available for download are returned.
Input
The feed_type_id query parameter is used to limit the response to only return PRODUCT_FEED
type feed files.
Important: Unfiltered lists can be extremely large; it is best to filter by at least feed type.
GEThttps://api.ebay.com/buy/feed/v1/file?feed_type_id=PRODUCT_FEED
Output
A single file, EPN-PRODUCT_FEED.txt.gz
, is available for download. It is a daily curated feed restricted to L1 category 267
in the US marketplace.
Sample 3: Retrieve a list of all available PROMOTION feed files
The getFiles method can be used to retrieve a list of all feed files of a specified type available for download. In this sample, all PROMOTION
feed files available for download are returned.
Input
The feed_type_id query parameter is used to limit the response to only return PROMOTION
type feed files.
Important: Unfiltered lists can be extremely large; it is best to filter by at least feed type.
GEThttps://api.ebay.com/buy/feed/v1/file?feed_type_id=PROMOTION
Output
A single file, EPN-PROMOTION.txt.gz
, is available for download. It is a hourly curated feed restricted to L1 category 267
in the US marketplace.