Skip to main content

GET/traffic_report

This method returns a report that details the user traffic received by a seller's listings.

A traffic report gives sellers the ability to review how often their listings appeared on eBay, how many times their listings are viewed, and how many purchases were made. The report also returns the report's start and end dates, and the date the information was last updated.

For more information, see Traffic report details

Input

Resource URI

GET https://api.ebay.com/sell/analytics/v1/traffic_report?

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
dimensionarray of stringThis query parameter specifies the dimension, or "attribute," that is applied to the report metric.

Valid values: DAY or LISTING

Examples
  • If you specify dimension=DAY and metric=CLICK_THROUGH_RATE, the traffic report contains the number of times an item displayed on a search results page and the buyer clicked through to the View Item page for each day in the date range, as in:
    12-06-17: 32, 12-07-17: 54, ...
  • If you specify dimension=LISTING and metric=LISTING_IMPRESSION_STORE, the traffic report contains the number of times that listing appeared on the seller's store during the specified date range.

    For example, LISTING_IMPRESSION_STORE: 157 means the item appeared 157 times in the store during the date range.
  • If you specify dimension=LISTING without specifying any listing_ids in the parameter filter, the traffic report returned in the response contains a maximum of 200 listings.

Occurrence: Required

metricarray of stringThis query parameter specifies the metrics you want covered in the report.

Note: Unlike names for parameters and enumerated values, metric values are not case sensitive.

Valid values:Specify a comma-separated list of the metrics to include them in the report. See Using different metric parameters for more information including detailed metric descriptions and localized names.

Occurrence: Required

filterarray of FilterFieldThis query parameter refines the information returned in the traffic report.

Note: URL encode all the values you supply in the filter parameter. See URL encoding query parameter values as described in URL parameters.

Configure the following properties of the filter parameter to tune the traffic report to your needs:
  • date_range
    Limits the report to the specified range of dates. This value can be formatted in one of two ways depending on the user's time zone.
    • For America/Los_Angeles time zone, input the date range using YYMMDD format. As this is the default time zone used for timestamps in the report, the time zone does not need to be specified. Enclose the earliest date and end date for the report in brackets ("[ ]"), as follows:

      [YYYYMMDD..YYYYMMDD]

      For example:
      [20240101..20240131]
    • For all other time zones, input the date range using ISO 8601 format, and specify the time zone using a UTC offset. A time zone offset is a positive or negative value that represents the number of hours a time zone is from UTC (see UTC Time Zone Converter for offset values for your time zone). Enclose the earliest date and end date for the report in brackets ("[ ]"), as follows:

      [yyyy-MM-dd'T'HH:mm:ss.SSS+|-hh:mm..yyyy-MM-dd'T'HH:mm:ss.SSS+|-hh:mm]

      For example:
      [2024-01-01T02:00:00.000-05:00..2024-01-31T02:00:00.000-05:00]
      Note: All time values entered in this format will be dropped, and will be replaced with 00:00:00.000 for startDate and 23:59:59.000 for endDate in the response body.
    The maximum range between the start and end dates is 90 days, and the earliest start date you can specify is two years prior to the current date, which is defined as 730 days (365 * 2), not accounting for Leap Year.

    The last date for which traffic data exists is a value called lastUpdatedDate. eBay returns an error if you specify a date range greater than 90 days, or the start date is after the lastUpdatedDate. If the specified end date is beyond the lastUpdatedDate, eBay returns data up to the lastUpdatedDate.

    Required: Always
  • listing_ids
    This filter limits the results to only the supplied list of listingId values.

    Note: If you specify dimension=LISTING without specifying any listing_ids in this parameter, the traffic report returned in the response contains a maximum of 200 listings.
    You can specify to 200 different listingId values. Enclose the list of IDs with curly braces ("{ }"), and separate multiple values with a pipe character ("|").

    This filter only returns data for listings that have been either active or sold in last 90 days, and any unsold listings in the last 30 days. All listings must be the seller's and they must be listed on the marketplace specified by the marketplace_ids filter argument.
  • marketplace_ids
    This filter limits the report to seller data related to only the specified marketplace ID (currently the filter allows only a single marketplace ID). Enclose the marketplace ID in curly braces ("{ }").

    Valid values:
    • EBAY_AU
    • EBAY_DE
    • EBAY_ES
    • EBAY_FR
    • EBAY_GB
    • EBAY_IT
    • EBAY_US
    • EBAY_MOTORS_US

    Required if you set the dimension parameter to DAY.

Example filter parameter
The following example shows how to configure the filter parameter with the marketplace_ids and date_range filters:

filter=marketplace_ids:{EBAY_US},date_range:[20170601..20170828]

Encoding this portion of the query parameter sample yields:

filter=marketplace_ids:%7BEBAY_US%7D,date_range:%5B20230601..20230828%5D


See samples for additional examples.

Occurrence: Required

sortarray of SortFieldThis query parameter sorts the report on the specified metric.

You can only specify a single metric in the sort parameter and the specified metric must be included in the configuration of the report's metric parameter.

Sorting is helpful when you want to review how a specific metric is performing, such as the CLICK_THROUGH_RATE.

Most reports can be sorted in ascending or descending order. Precede the value of a descending-order request with a minus sign ("-"), for example: sort=-CLICK_THROUGH_RATE.

Note: There are a couple of constraints on sorting the report by different metrics:
  • Sorting on the SALES_CONVERSION_RATE metric is not supported
  • The TRANSACTION metric can only be sorted in the descending order (sorting in the ascending order is not supported).

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.analytics.readonly

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
dimensionMetadataarray of Metadata

A complex type containing the header of the report and the type of data containted in the rows of the report.

Occurrence: Always

dimensionMetadata.metadataHeaderMetadataHeader

The container that returns the dimensionKeys and metrics headers for the report.

Occurrence: Always

dimensionMetadata.metadataHeader.keystring

The key value used for the report.

For example: "key": "LISTING_ID"

Occurrence: Always

dimensionMetadata.metadataHeader.metadataKeysarray of Definition

The list of dimension key values used for the report header. Each list element contains the key name, its data type, and its localized name.

For example:

"metadataKeys": [
  "key": "LISTING_TITLE",
  "localizedName": "Listing title",
  "dataType": "STRING"

Occurrence: Always

dimensionMetadata.metadataHeader.metadataKeys.dataTypeDataTypeEnum

Indicates the data type of the returned dimension. For example, if the dimension is day, the data type is DATE.

Occurrence: Always

dimensionMetadata.metadataHeader.metadataKeys.keystring

The value the dimension or metric parameter as submitted in the request.

Occurrence: Always

dimensionMetadata.metadataHeader.metadataKeys.localizedNamestring

The localized name of the metric or dimension (translated into the language specified in the Accept-Language HTTP request header). For example, if Accept-Language is set to de-DE, the value "day" in the dimension container is returned as "tag", and a metric of TRANSACTION is returned as "Transaktionsanzahl".

Occurrence: Always

dimensionMetadata.metadataRecordsarray of MetadataRecord

A list of the individual report records.

Occurrence: Always

dimensionMetadata.metadataRecords.metadataValuesarray of Value

A list of data in a row returned in the traffic report. The data in each of the cells match the labels in headers of the report.

Occurrence: Always

dimensionMetadata.metadataRecords.metadataValues.applicableboolean

If set to true, this flag indicates the value in the value field is valid as computed.

A value of false indicates one or more of the values used to calculate the value was invalid. The occurrence of this is a rare, however consider this case: suppose a buyer navigates to a View Item page at 11:59 pm (the end of the day) and purchases the item at 12:05am the next day. In this case, the item would have been purchased with 0 views for the day.

Occurrence: Always

dimensionMetadata.metadataRecords.metadataValues.valueany

The value of the report data.

Occurrence: Always

dimensionMetadata.metadataRecords.valueValue

The value of the key on which the report is based.

For example, if the key is the listing ID, the value of this container could be:

"value": {
  "value": "142133954229",
  "applicable": true
}

Occurrence: Always

dimensionMetadata.metadataRecords.value.applicableboolean

If set to true, this flag indicates the value in the value field is valid as computed.

A value of false indicates one or more of the values used to calculate the value was invalid. The occurrence of this is a rare, however consider this case: suppose a buyer navigates to a View Item page at 11:59 pm (the end of the day) and purchases the item at 12:05am the next day. In this case, the item would have been purchased with 0 views for the day.

Occurrence: Always

dimensionMetadata.metadataRecords.value.valueany

The value of the report data.

Occurrence: Always

endDatestring



The time stamp is formatted as an ISO 8601 string, which is based on the 24-hour Universal Coordinated Time (UTC) clock.

If you specify an end date that is beyond the lastUpdatedDate value, eBay returns a report that contains data only up to the lastUpdateDate date.

Format: [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss].[sss]Z
Example: 2018-08-20T07:09:00.000Z

Occurrence: Always

headerHeader

A complex type containing the header for the report.

Occurrence: Always

header.dimensionKeysarray of Definition

A list of the dimension or metric keys returned in the report. The values for each are is returned in the associated key fields.

Occurrence: Always

header.dimensionKeys.dataTypeDataTypeEnum

Indicates the data type of the returned dimension. For example, if the dimension is day, the data type is DATE.

Occurrence: Always

header.dimensionKeys.keystring

The value the dimension or metric parameter as submitted in the request.

Occurrence: Always

header.dimensionKeys.localizedNamestring

The localized name of the metric or dimension (translated into the language specified in the Accept-Language HTTP request header). For example, if Accept-Language is set to de-DE, the value "day" in the dimension container is returned as "tag", and a metric of TRANSACTION is returned as "Transaktionsanzahl".

Occurrence: Always

header.metricsarray of Definition

The list of metrics returned in the report. The values for each are is returned in the associated key fields.

Occurrence: Always

header.metrics.dataTypeDataTypeEnum

Indicates the data type of the returned dimension. For example, if the dimension is day, the data type is DATE.

Occurrence: Always

header.metrics.keystring

The value the dimension or metric parameter as submitted in the request.

Occurrence: Always

header.metrics.localizedNamestring

The localized name of the metric or dimension (translated into the language specified in the Accept-Language HTTP request header). For example, if Accept-Language is set to de-DE, the value "day" in the dimension container is returned as "tag", and a metric of TRANSACTION is returned as "Transaktionsanzahl".

Occurrence: Always

lastUpdatedDatestring

The date and time, in ISO 8601 format, that indicates the last time the data returned in the report was updated.

Occurrence: Always

recordsarray of Record

A complex type containing the individual data records for the traffic report.

Occurrence: Always

records.dimensionValuesarray of Value

A list where each element contains either the string DAY (if the dimension is DAY), or the listing ID for which the record's metric data is computed. A second array member, applicable, is always true for dimension values.

Occurrence: Always

records.dimensionValues.applicableboolean

If set to true, this flag indicates the value in the value field is valid as computed.

A value of false indicates one or more of the values used to calculate the value was invalid. The occurrence of this is a rare, however consider this case: suppose a buyer navigates to a View Item page at 11:59 pm (the end of the day) and purchases the item at 12:05am the next day. In this case, the item would have been purchased with 0 views for the day.

Occurrence: Always

records.dimensionValues.valueany

The value of the report data.

Occurrence: Always

records.metricValuesarray of Value

A list where each element contains a value field that indicates the record's value for the metric. Each element also contains an applicable field that indicates the veracity of the computed value.

Note that there are no metric names or IDs associated with the values returned in this array. The metadata to which these values relate can be found in the key values in metadataKeys. The order of the metric values in this array equals the order of the key values in metadataHeader.

Occurrence: Always

records.metricValues.applicableboolean

If set to true, this flag indicates the value in the value field is valid as computed.

A value of false indicates one or more of the values used to calculate the value was invalid. The occurrence of this is a rare, however consider this case: suppose a buyer navigates to a View Item page at 11:59 pm (the end of the day) and purchases the item at 12:05am the next day. In this case, the item would have been purchased with 0 views for the day.

Occurrence: Always

records.metricValues.valueany

The value of the report data.

Occurrence: Always

startDatestring

The start date of the date range used to calculate the report, in ISO 8601 format.

Occurrence: Always

warningsarray of ErrorDetailV3

An array of any process errors or warnings that were generated during the processing of the call processing.

Occurrence: Conditional

warnings.categorystring

Identifies whether the error was in the REQUEST or happened when running the APPLICATION.

Occurrence: Conditional

warnings.domainstring

The primary system where the error occurred. This is relevant for application errors. For Analytics errors, it always has the value API_ANALYTICS.

Occurrence: Conditional

warnings.errorIdinteger

A positive integer that uniquely identifies the specific error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms. Traffic report error IDs range from 50001 to 50500.

Occurrence: Conditional

warnings.inputRefIdsarray of string

Identifies specific request elements associated with the error, if any. inputRefId's response is format specific. For JSON, use JSONPath notation.

Occurrence: Conditional

warnings.longMessagestring

A more detailed explanation of the error than given in the message error field.

Occurrence: Conditional

warnings.messagestring

Information on how to correct the problem, in the end user's terms and language where applicable. Its value is at most 50 characters long. If applicable, the value is localized in the end user's requested locale.

Occurrence: Conditional

warnings.outputRefIdsarray of string

Identifies specific response elements associated with the error, if any. Path format is the same as inputRefId.

Occurrence: Conditional

warnings.parametersarray of ErrorParameterV3

This optional list of name/value pairs that contain context-specific ErrorParameter objects, with each item in the list being a parameter (or input field name) that caused an error condition. Each ErrorParameter object consists of two fields, a name and a value.

Occurrence: Conditional

warnings.parameters.namestring

Name of the entity that threw the error.

Occurrence: Conditional

warnings.parameters.valuestring

A description of the error.

Occurrence: Conditional

warnings.subdomainstring

If present, indicates which subsystem in which the error occurred.

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
500Internal Server Error

Error codes

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

CodeDomainCategoryMeaning
50001API_ANALYTICSREQUESTInvalid dimension specified. For help, see the documentation.
50002API_ANALYTICSREQUESTInvalid metric {metricName} specified. For help, see the documentation.
50003API_ANALYTICSREQUESTInvalid date range. End date must be before or equal to start date.
50004API_ANALYTICSREQUESTInvalid date range. Start date must be before or equal to end date.
50005API_ANALYTICSREQUESTNo filter is specified, which is required. For help, see the documentation.
50006API_ANALYTICSREQUESTThe sort field value {sortField} is not supported.
50008API_ANALYTICSREQUESTThe call requires at least one metric. For help, see the documentation.
50009API_ANALYTICSREQUESTThe call requires at least one URI query parameter. For help, see the documentation.
50013API_ANALYTICSREQUESTInvalid date range format - Start Date. The format is yyyyMMdd.
50014API_ANALYTICSREQUESTInvalid date range format - End Date. The format is yyyyMMdd.
50018API_ANALYTICSREQUESTNeither the start date nor the end date can be in the future.
50021API_ANALYTICSREQUESTInvalid filter field {filterField} specified.
50022API_ANALYTICSREQUESTSpecify at least one marketplace ID.
50023API_ANALYTICSREQUESTThe marketplace ID {marketplaceId} is not supported by this call. For help, see the documentation.
50024API_ANALYTICSREQUESTThe marketplace ID {marketplaceId} is not valid.
50025API_ANALYTICSREQUESTThe start date is too far in the past. The start date must be less than or equal to {maxStartDateInThePast}.
50026API_ANALYTICSREQUESTThe date range is too long. The date range must be less than or equal to {maxDateWindow}.
50027API_ANALYTICSREQUESTThe 'listing_id' value is empty.
50028API_ANALYTICSREQUESTThe maximum number of listing IDs has been exceeded. The maximum number of listing IDs is {maxListingIdsNumber}.
50029API_ANALYTICSREQUESTInvalid listing ID {listingId}.
50030API_ANALYTICSREQUESTData for the listing ID {listingId} could not be found.
50031API_ANALYTICSREQUESTDate range is required.
50032API_ANALYTICSAPPLICATIONWe are unable to process data for accounts, like this one, which have listed in more than a few thousand leaf categories in the past couple years.
50033API_ANALYTICSREQUESTInvalid date range filter format {invalidDateRangeFilter}.
50034API_ANALYTICSREQUESTInvalid listing ids filter format {invalidListingIdsFilter}.
50035API_ANALYTICSREQUESTRequested sort field is not part of the list of metrics requested.
50036API_ANALYTICSREQUEST{sortOrder} sort order is not supported for {sortField} metric.
50037API_ANALYTICSREQUESTThe Metric {metricName} does not have data available for the requested date range.
50050API_ANALYTICSAPPLICATIONWe are doing some maintenance and cannot show all your information right now. We are still tracking everything, and you will see your updated stats soon.
50500API_ANALYTICSAPPLICATIONInternal server error. Wait a few minutes and try the call again. If error persists contact the eBay Developer Program.
50600API_ANALYTICSREQUESTData for the listing Ids {delayedListingIds} is not yet updated to {endDate}

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: Generate Traffic Report by Days

This sample generates the metrics for how often the seller's listings appeared in the search results page and the seller's store, and the sales conversion rate for each date in the date range. It also limits the report to the seller's listings on the eBay US site.

Input

The input fields are marketplace_ids, date_range, dimension, and metric fields.

GEThttps://api.ebay.com/sell/analytics/v1/traffic_report?filter=marketplace_ids:%7BEBAY_US%7D,date_range:%5B20160601..20160828%5D&dimension=DAY&metric=LISTING_IMPRESSION_SEARCH_RESULTS_PAGE,LISTING_IMPRESSION_STORE,SALES_CONVERSION_RATE

Output

The output contains the metrics (metrics.key) and the records container. Each record contains the aggregate records.dimensionValues.value, which is the date, and the metric value (metricValues.value) of the metric.

Sample 2: Generate Traffic Report by Listing

This sample generates the metrics for how often the seller's listings appeared in the search results page and the seller's store, and the sales conversion rate for each listing within the date range. It also limits the report to the seller's listing on the eBay US site and sorts the LISTING_IMPRESSION_STORE metric in ascending order.

Input

The input fields are marketplace_ids, date_range, dimension, and metric fields.

GEThttps://api.ebay.com/sell/analytics/v1/traffic_report?filter=marketplace_ids:%7BEBAY_US%7D,date_range:%5B20161007..20161009%5D&dimension=LISTING&metric=LISTING_IMPRESSION_SEARCH_RESULTS_PAGE,LISTING_IMPRESSION_STORE,SALES_CONVERSION_RATE&sort=LISTING_IMPRESSION_STORE

Output

The output contains the metrics (metrics.key), and the records container (records). Each record contains the aggregate records.dimensionValues.value, which is the listing Id, and the metric value (metricValues.value) of the metric.

It also includes the metadata (metadataKeys.key) and metadata records container (metadataRecords). Each of these records contain the metadataRecords.value, which is the listing Id and the (metadataRecords.metadataValues.value), which in this case, the listing title.