Open navigation

How to use dynamic date ranges with JSON/CSV/XML data

If the source URL of your custom JSON/CSV/XML data supports start and end dates in its request URL, you can set up dynamic date selections to your Google Sheets or Looker Studio (formerly Data Studio) report using Supermetrics.

Before you begin

To set up dynamic date ranges with custom JSON/CSV/XML data, the request URL for the data should support date ranges. If you are unsure whether date ranges are supported, see the appropriate product or API documentation for what is allowed in the URL request.


URL setup

In your source URL, find the locations where start and end dates are defined. You can set up dynamic date ranges by using placeholder strings instead of hardcoded dates. 

Make sure the date format matches what the service is expecting. For example, if the date is expected in YYYY-MM-DD, then you would use #sdate# and #edate#. Here are all the available formats for start dates and end dates:

Required date formatPlaceholder text

Start date, y-m-d format


Start date, ymd format


Start date, unix timestamp format


End date, y-m-d format


End date, ymd format#edate_ymd#
End date, unix timestamp format



Original request URL:

Modified URL with date placeholders:


Looker Studio Google Sheets
  1. Log in to Looker Studio
  2. Create a new data source file or edit an existing one with the JSON/CSV/XML by Supermetrics data source.
  3. In the Parameters view, paste the request URL with the date placeholders to the Source URL or Google Drive path field.
  4. Connect or reconnect the data source.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.