Endpoint
Function signature
Path parameters
The unique identifier of the redirect to retrieve time-series data for
Query parameters
Start date for the analytics period in ISO 8601 formatExample:
2024-01-01T00:00:00ZEnd date for the analytics period in ISO 8601 formatExample:
2024-01-31T23:59:59ZTime interval for aggregating hits. Determines the granularity of the returned data.Available values:
hour- Hourly aggregationday- Daily aggregation (default)week- Weekly aggregationmonth- Monthly aggregation
Choose an interval appropriate for your date range. For example, use
hour for same-day analysis, day for weekly/monthly views, and month for yearly overviews.Response
The endpoint returns a time-series array with hit counts for each interval:Example request
Example response
Use cases
- Traffic visualization: Create line charts and graphs showing traffic trends
- Pattern detection: Identify daily, weekly, or seasonal traffic patterns
- Anomaly detection: Spot unusual spikes or drops in traffic
- Capacity planning: Predict future traffic based on historical trends
- Reporting: Generate periodic traffic reports for stakeholders
- A/B testing: Compare traffic before and after redirect changes
Best practices
- Match interval to range: Use hourly intervals for short periods (1-7 days), daily for medium periods (1-3 months), and weekly/monthly for longer periods
- Caching: Time-series data is computationally intensive. Cache results when possible
- Pagination: For very long date ranges, consider breaking requests into smaller chunks
- Timezone awareness: All timestamps are in UTC. Convert to local time in your application if needed
Related endpoints
- Get basic statistics - Summary metrics without time breakdown
- Get hourly traffic - Specialized endpoint for hourly patterns
- Get peak traffic - Identify peak traffic periods