Request Report

This endpoint enables you to make a Batch API request, initiating the batch job.

Request:

Body Params

PropertyDescriptionType
report_queryReport query parameters.ReportQuery
delivery_informationDelivery information parameters.DeliveryInformation

ReportQuery Object

PropertyDescriptionType
tablesList of tables to query.List[TableQuery]

TableQuery Object

PropertyDescriptionType
vtableMandatory. Select the table you would like to query from.String
granularityMandatory. Select the data granularity. Can be 'daily', 'weekly' or 'monthly'.String
filtersA list of filters applied to the table.QueryFilter (described below)
metricsA list of metrics representing the columns in your report.List[String]
start_dateSpecifies the start date. Use the format YYYY-MM for monthly granularity, and YYYY-MM-DD for weekly or daily granularity.String
end_dateSpecifies the end date. Use the format YYYY-MM for monthly granularity, and YYYY-MM-DD for weekly or daily granularity.String
latestOptional. When enabled, it overrides the end_date with the last available date.Boolean
all_historyOptional. When enabled, it overrides the end_date with the last available date and the start_date with the first available date.Boolean
window_sizeOptional. Sets the start_date by subtracting the specified window from the end_date. The window can be specified using "d" for days, "m" for months, and "y" for years. For example, "3m" will subtract 3 months from the end_date to determine the start_date.String
pagingSet pagination configuration.PagingConfig

QueryFilter Object

📘

Note:

Different filters are available for each table and can be selected accordingly. The applicable filters for a specific table can be found under 'table_filters' in the discovery endpoint for the requested table.

PagingConfig Object

PropertyDescriptionType
limitOptional. default value varies per "vtable".Integer
offsetOptional. default is 0. Set the offset.Integer
sortOptional. Set the metric you want the report to be sorted upon. by default takes the first metric specified.String
sort_ascOptional. default is False. Decides if to sort ascending or descending.String

DeliveryInformation Object

PropertyDescriptionType
delivery_methodSet the Delivery Method.Enum[download_link, bucket_access,snowflake]
response_formatMandatory only for "download_link" and "bucket_access" delivery methods. Set the File format of the generated report.Enum[json,csv,parquet,orc]
webhook_urlOptional. Set a webhook url to trigger when the report status is changed.String
delivery_method_paramsOptional. only relevant for delivery methods - "snowflake" and "bucket_access". Set delivery method configurations.DeliveryMethodPropsRequest

DeliveryMethodPropsRequest Object

PropertyDescriptionType
integration_nameOptional. Only relevant in case of multiple set integrations.String
table_nameOptional. if set pushes the data into a specific table.String
retention_daysOptional. Specifies how long data is retained, with a default of 30 days. Can be set to 1, 30, 60, 180, or 365 days.Integer
num_of_filesOptional. Relevant only for delivery_method "bucket_access". Sets the number of generated files. must be greater then zero.String
write_modeOptional. Accepted value: 'overwrite' - used when working with an S3 table to replace data for specific dates.String

Example:

vtable: "traffic_and_engagement"

Table URL: https://api.similarweb.com/batch/v4/request-report

Primary Keys: domains, countries

Language
Credentials
Header
Click Try It! to start a request and see the response here!