{
"openapi": "3.0.0",
"info": {
"title": "Buy Feed API",
"description": "The Feed API provides the ability to download TSV_GZIP feed files containing eBay items and an hourly snapshot file for a specific category, date, and marketplace.
In addition to the API, there is an open-source Feed SDK written in Java that downloads, combines files into a single file when needed, and unzips the entire feed file. It also lets you specify field filters to curate the items in the file.",
"contact": {
"name": "eBay Inc,"
},
"license": {
"name": "eBay API License Agreement",
"url": "https://go.developer.ebay.com/api-license-agreement"
},
"version": "v1.0.3"
},
"servers": [
{
"url": "https://api.ebay.com{basePath}",
"description": "Production",
"variables": {
"basePath": {
"default": "/buy/feed/v1"
}
}
}
],
"paths": {
"/access": {
"get": {
"tags": [
"access"
],
"description": "The getAccess method retrieves the access rules specific to the application; for example, the feed types to which the application has permissions. An application may be constrained to certain marketplaces, and to specific L1 categories within those marketplaces. You can use this information to apply filters to the getFiles method when obtaining details on accessible downloadable files.
Use the getFeedTypes method to obtain the details about one or more feed types that are available to be downloaded. If no query parameters are used, all possible feed types are returned.
You can filter your search by adding feed_scope and/or marketplace_ids parameters to the URI.For instance, a call using GET https://api.ebay.com/buy/feed/v1/feed_type
will return all available feed files. A call using GET https://api.ebay.com/buy/feed/v1/feed_type?feed_scope=DAILY&marketplace_ids=EBAY_US
will limit the returned list to daily feed files available from the US marketplace.
For a list of supported sites and other restrictions, see API Restrictions.
", "operationId": "getFeedTypes", "parameters": [ { "name": "continuation_token", "in": "query", "description": "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.", "required": false, "schema": { "type": "string" } }, { "name": "feed_scope", "in": "query", "description": "This query parameter specifies the frequency with which the feed file is made available (HOURLY
, DAILY
, WEEKLY
).DAILY
is supported.",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "Specifies the number of records to show in the current response.GET https://api.ebay.com/buy/feed/v1/feedtype?marketplaceids=EBAY_FR,EBAY_AU
.Use the downloadFile method to download a selected TSV_gzip feed file. Use the getFiles methods to obtain the file_id of the specific feed file you require. The feed files are binary gzip files. If the file is larger than 200 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 Retrieving a GZIP feed file.
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.Downloading feed files
Use the getFiles method to obtain the fileId value for the desired feed file.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Range",
"in": "header",
"description": "Indicates where in the full resource this partial chunk of data belongs and the total number of bytes in the file.
Example: bytes=0-102400
.
For more information about using this header, see Retrieving a gzip feed file.",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "X-EBAY-C-MARKETPLACE-ID",
"in": "header",
"description": "Indicates the unique identifier of the eBay marketplace that the feed file belongs to.
Example: X-EBAY-C-MARKETPLACE-ID: EBAY_US
.
See MarketplaceIdEnum for supported values.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/OutputStream"
}
}
}
},
"206": {
"description": "Partial Content",
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/OutputStream"
}
}
}
},
"400": {
"description": "Bad Request",
"x-response-codes": {
"errors": {
"13014": {
"domain": "API_FEED",
"category": "REQUEST",
"description": "Invalid or missing header X-EBAY-C-MARKETPLACE-ID."
},
"13015": {
"domain": "API_FEED",
"category": "REQUEST",
"description": "Range header is required for file size greater than {allowedLength} bytes."
},
"13016": {
"domain": "API_FEED",
"category": "REQUEST",
"description": "The Range request header format is invalid. Format: 'bytes=start position-end position'. For help, see the API Reference documentation for this call."
}
}
}
},
"403": {
"description": "Forbidden",
"x-response-codes": {
"errors": {
"14007": {
"domain": "API_FEED",
"category": "REQUEST",
"description": "Insufficient permissions to download this file. Please check oauth scopes required for this feed type and buy/feed/v1/access for access constraints."
},
"14009": {
"domain": "API_FEED",
"category": "REQUEST",
"description": "Insufficient permissions for the feed type for the specified marketplace. Please contact eBay Technical Support for further assistance."
}
}
}
},
"404": {
"description": "Not Found",
"x-response-codes": {
"errors": {
"14004": {
"domain": "API_FEED",
"category": "REQUEST",
"description": "The specified file Id does not exist for marketplace specified or may have expired. Please check the maximum allowed look back for the feed type and scope."
}
}
}
},
"416": {
"description": "Range Not Satisfiable",
"x-response-codes": {
"errors": {
"13017": {
"domain": "API_FEED",
"category": "REQUEST",
"description": "The Range header is invalid. Please verify that the start and end positions are correct, 'range start-range end' does not exceed the allowed maximum of {allowedLength} bytes and is consistent with the file size."
}
}
}
},
"500": {
"description": "Internal Server Error",
"x-response-codes": {
"errors": {
"13006": {
"domain": "API_FEED",
"category": "APPLICATION",
"description": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance."
}
}
}
}
},
"security": [
{
"api_auth": [
"https://api.ebay.com/oauth/api_scope/buy.item.feed"
]
}
]
}
},
"/file/{file_id}": {
"get": {
"tags": [
"file"
],
"description": "Use the getFile method to fetch the details of a feed file available to download, as specified by the file's file_id.
Details in the response include: the feed's file_id, the date it became available, eBay categories that support the feed, its frequency, the time span it covers, its feed type, its format (currently only TSV is available), its size in bytes, the schema under which it was pulled, and the marketplaces it applies to.
", "operationId": "getFile", "parameters": [ { "name": "file_id", "in": "path", "description": "This path parameter specifies the unique identifier of the feed file that you wish to retrieve.X-EBAY-C-MARKETPLACE-ID: EBAY_US
.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, and eBay L1 category.
For a list of supported sites and other restrictions, see API Restrictions.
", "operationId": "getFiles", "parameters": [ { "name": "category_ids", "in": "query", "description": "This query parameter is used to specify one or more eBay L1 category IDs.HOURLY
, DAILY
, WEEKLY
).DAILY
is supported.",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "feed_type_id",
"in": "query",
"description": "This query parameter specifies the unique identifier for the feed type to be used as a search filter.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.",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "X-EBAY-C-MARKETPLACE-ID",
"in": "header",
"description": "Indicates the unique identifier of the eBay marketplace on which to search for feed files. X-EBAY-C-MARKETPLACE-ID: EBAY_US
.EBAY_US
means the application is constrained to the U.S. marketplace for the listed feed.A key-pair array of values used to define the feed files available to the application."
},
"Error": {
"type": "object",
"properties": {
"category": {
"type": "string",
"description": "Identifies the type of erro."
},
"domain": {
"type": "string",
"description": "Name for the primary system where the error occurred. This is relevant for application errors."
},
"errorId": {
"type": "integer",
"description": "A unique number to identify the error.",
"format": "int32"
},
"inputRefIds": {
"type": "array",
"description": "An array of request elements most closely associated to the error.",
"items": {
"type": "string"
}
},
"longMessage": {
"type": "string",
"description": "A more detailed explanation of the error."
},
"message": {
"type": "string",
"description": "Information on how to correct the problem, in the end user's terms and language where applicable."
},
"outputRefIds": {
"type": "array",
"description": "An array of request elements most closely associated to the error.",
"items": {
"type": "string"
}
},
"parameters": {
"type": "array",
"description": "An array of name/value pairs that describe details the error condition. These are useful when multiple errors are returned.",
"items": {
"$ref": "#/components/schemas/ErrorParameter"
}
},
"subdomain": {
"type": "string",
"description": "Further helps indicate which subsystem the error is coming from. System subcategories include: Initialization, Serialization, Security, Monitoring, Rate Limiting, etc."
}
},
"description": "This type defines the fields that can be returned in an error."
},
"ErrorParameter": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The object of the error."
},
"value": {
"type": "string",
"description": "The value of the object."
}
}
},
"FeedType": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A description of the feed type."
},
"feedTypeId": {
"type": "string",
"description": "The unique identifier of the feed type.
Note: Refer to Supported feed types for additional details."
},
"supportedFeeds": {
"type": "array",
"description": "An array of the feed files of the indicated feed type that are available to be downloaded.",
"items": {
"$ref": "#/components/schemas/SupportedFeed"
}
}
},
"description": "This type is used by the getFeedType and getFeedTypes methods to provide more details about a feed type, including the OAuth scopes required to download the feed files and the constraints on the feed type."
},
"FeedTypeConstraint": {
"type": "object",
"properties": {
"categoryIds": {
"type": "array",
"description": "An array of the eBay categories the application can access in a feed. See the Taxonomy API for details about obtaining a list eBay L1 categories. The category is expressed as the category's categoryId, not its categoryName; e.g., 172008
, not Gift Cards & Coupons
.
If no categoryIds are listed, the application can access all categories in the specified marketplace.",
"items": {
"type": "string"
}
},
"marketplaceId": {
"type": "string",
"description": "This enum value indicates an eBay marketplace for which the application can access feed files for the corresponding feed type
Example: EBAY_US
for the U.S. or EBAY_DE
for Germany. For implementation help, refer to eBay API documentation"
}
},
"description": "This is used to define the eBay marketplaces and eBay L1 categories that support the corresponding feed type"
},
"FeedTypeSearchResponse": {
"type": "object",
"properties": {
"feedTypes": {
"type": "array",
"description": "An array of the feed types that match the search criteria.",
"items": {
"$ref": "#/components/schemas/FeedType"
}
},
"href": {
"type": "string",
"description": "The URL to to the current set of results."
},
"limit": {
"type": "integer",
"description": "The number of records to show in the current response.",
"format": "int32"
},
"next": {
"type": "string",
"description": "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."
},
"total": {
"type": "integer",
"description": "The total number of matches for the search criteria.",
"format": "int32"
}
},
"description": "This type is used by the base response of the getFeedTypes method."
},
"FileMetadata": {
"type": "object",
"properties": {
"access": {
"type": "string",
"description": "Indicates whether the application is permitted to access the feed file. One of ALLOWED
or RESTRICTED
. For implementation help, refer to eBay API documentation"
},
"dimensions": {
"type": "array",
"description": "An array of dimensions supported by the corresponding feed file.
Currently the only dimension available is CATEGORY.
Example:"dimensionKey": "CATEGORY",
"values": ["15032"]",
"items": {
"$ref": "#/components/schemas/Dimension"
}
},
"feedDate": {
"type": "string",
"description": "The date on which the feed was created.
Format: UTC format (yyyy-MM-ddThh:00:00.000Z)
."
},
"feedScope": {
"type": "string",
"description": "Specifies the frequency with which the feed file is made available (HOURLY
, DAILY
, WEEKLY
).
Currently only DAILY
is supported. For implementation help, refer to eBay API documentation"
},
"feedTypeId": {
"type": "string",
"description": "The unique identifier of the feed type.
Note: Refer to Supported feed types for additional details."
},
"fileId": {
"type": "string",
"description": "The file's unique identifier. This fileid is used to select the feed file when using the downloadFile method."
},
"format": {
"type": "string",
"description": "Format of the returned feed file. Currently only TSV is supported. For implementation help, refer to eBay API documentation"
},
"marketplaceId": {
"type": "string",
"description": "The eBay marketplace identifier for the marketplace(s) to which the feed applies.
Example: EBAY_UK
. For implementation help, refer to eBay API documentation"
},
"schemaVersion": {
"type": "string",
"description": "Version of the API schema under which the feed was created."
},
"size": {
"type": "integer",
"description": "Size of the feed file in bytes.",
"format": "int32"
},
"span": {
"description": "The time span between feed files that applies to the feed type (e.g., hourly, daily, weekly). This is returned in hours.
Possible Values: YEAR
, MONTH
, DAY
, HOUR
",
"$ref": "#/components/schemas/TimeDuration"
}
},
"description": "This type is used to provide metadata about each feed file in a getFile or getFiles response."
},
"FileMetadataSearchResponse": {
"type": "object",
"properties": {
"fileMetadata": {
"type": "array",
"description": "An array of metadata values describing the available feed files that match the input criteria.",
"items": {
"$ref": "#/components/schemas/FileMetadata"
}
},
"href": {
"type": "string",
"description": "The URL to to the current set of results."
},
"limit": {
"type": "integer",
"description": "The number of results that will be displayed on each page, as set by the limit URI parameter.
Default: 20",
"format": "int32"
},
"next": {
"type": "string",
"description": "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."
},
"total": {
"type": "integer",
"description": "The total number of matches for the search criteria.",
"format": "int32"
}
},
"description": "This type is used by the base response of the getFiles method."
},
"OutputStream": {
"type": "object",
"description": "The container object for the feed file being downloaded."
},
"SupportedFeed": {
"type": "object",
"properties": {
"authorizationScopes": {
"type": "array",
"description": "The oauth authorization scopes which grant access to the feed files.
Currently the only applicable authorization scope is https://api.ebay.com/oauth/api_scope/buy.item.feed
.
Note: You can view your application's oauth scopes on the Application Keys page.",
"items": {
"type": "string"
}
},
"constraint": {
"description": "This container shows the eBay marketplaces that support the corresponding feed type. If no constraints are returned, all marketplaces are supported.",
"$ref": "#/components/schemas/Constraint"
},
"feedScope": {
"type": "string",
"description": "Specifies the frequency with which the feed file is made available (HOURLY
, DAILY
, WEEKLY
).
Currently only DAILY
is supported. For implementation help, refer to eBay API documentation"
},
"lookBack": {
"description": "How far back from the current time to limit the returned feed files. 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.",
"$ref": "#/components/schemas/TimeDuration"
},
"status": {
"type": "string",
"description": "The status for this feed. One of ACTIVE
, PAUSED
, or DEPRECATED
. For implementation help, refer to eBay API documentation"
},
"supportedSchemas": {
"type": "array",
"description": "An array of the supported Feed API schemas for this feed type.",
"items": {
"$ref": "#/components/schemas/SupportedSchema"
}
}
},
"description": "The object that is returned by a successful getFeedType or getFeedTypes search describing the characteristics of a feed type."
},
"SupportedSchema": {
"type": "object",
"properties": {
"definition": {
"type": "string",
"description": "A list of the fields that will be returned in the feed file.
Note: Refer to Supported feed types to learn about the feed fields that are included in each supported feed type."
},
"deprecated": {
"type": "boolean",
"description": "Indicates whether the schema is still functional or deprecated. One of either true
or false
."
},
"formats": {
"type": "array",
"description": "An list of the available formats in which the schema can be downloaded. Currently only TSV (Tab Separated Values) is supported.",
"items": {
"type": "string",
"description": " For implementation help, refer to eBay API documentation"
}
},
"schemaVersion": {
"type": "string",
"description": "The version of the Feed API schema under which the feed type was created.
Example: 1.0."
}
},
"description": "A Feed API schema version(s) supported by the feed type."
},
"TimeDuration": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"description": "This enumeration value indicates the time unit used for the time period. For implementation help, refer to eBay API documentation"
},
"value": {
"type": "integer",
"description": "The number of units of time in the span.",
"format": "int32"
}
},
"description": "The time span between feed files that applies to the feed type (e.g., hourly, daily, weekly). This is returned in hours."
}
},
"securitySchemes": {
"api_auth": {
"type": "oauth2",
"description": "The security definitions for this API. Please check individual operations for applicable scopes.",
"flows": {
"clientCredentials": {
"tokenUrl": "https://api.ebay.com/identity/v1/oauth2/token",
"scopes": {
"https://api.ebay.com/oauth/api_scope/buy.item.feed": "View curated feeds of eBay items"
}
}
}
}
}
}
}