Skip to main content
GET
/
export
Export Statistics
curl --request GET \
  --url https://spoo.me/api/v1/export \
  --header 'Authorization: Bearer <token>'
"<string>"

Authorizations

Authorization
string
header
required

API key in format: spoo_. Use in Authorization header as 'Bearer spoo_'

Query Parameters

format
enum<string>
required

Export file format

Available options:
csv,
xlsx,
json,
xml
scope
enum<string>
required

Statistics scope: 'all' (authenticated only) or 'anon' (public access)

Available options:
all,
anon
short_code
string

URL alias (required when scope=anon)

start_date
string

ISO 8601 datetime or Unix timestamp (default: 7 days ago)

end_date
string

ISO 8601 datetime or Unix timestamp (default: now)

timezone
string
default:UTC

IANA timezone for output formatting (default: UTC)

group_by
string
default:time

Comma-separated dimensions: time, browser, os, country, city, referrer, short_code

metrics
string
default:clicks,unique_clicks

Comma-separated metrics: clicks, unique_clicks

filters
string

JSON string containing dimension filters. Format: {"dimension": ["value1", "value2"]}

Available filter dimensions:

  • browser - Filter by browser name
  • os - Filter by operating system
  • country - Filter by country code
  • city - Filter by city name
  • referrer - Filter by referrer URL
  • short_code - Filter by URL alias (not allowed with scope=anon)

Examples:

  • {"browser": ["Chrome", "Firefox"]}
  • {"country": ["US", "CA"], "browser": ["Chrome"]}
  • {"short_code": ["link1", "link2"]} (scope=all only)
browser
string

Comma-separated browser names (alternative to filters parameter)

os
string

Comma-separated OS names (alternative to filters parameter)

country
string

Comma-separated country codes (alternative to filters parameter)

city
string

Comma-separated city names (alternative to filters parameter)

referrer
string

Comma-separated referrer URLs (alternative to filters parameter)

Response

Export file generated successfully

The response is of type file.