You need reliable site traffic stats you can drop into a dashboard or enrichment job this week. By the end of this guide you’ll be able to request traffic metrics (visits, ranks, sources, and more) for any domain using a single authenticated HTTP GET request and wire it into your code in minutes.
What this API returns and why it’s useful
The Traffic Metrics Explorer API provides high-signal web analytics for a given domain: estimated visits, engagement (bounce rate, pages per visit, time on site), global/country/category ranks, top country shares, and traffic source mix. Teams use it to:
- Enrich company profiles with monthly visit estimates and ranking.
- Prioritize sales leads by actual traffic scale and growth pattern.
- Power competitor dashboards with country distribution and acquisition channels.
- Gate features (e.g., partner tiers) by demonstrable traffic levels.
It’s available on Zyla API Hub, which offers one account, one API key, and one subscription model across more than 10,000 public APIs. You can subscribe once and call across categories without juggling multiple providers.
Getting started on Zyla API Hub
To get an API key:
- Open the API listing and start the trial: Start 7-day trial on Traffic Metrics Explorer API.
- Click Subscribe (or Start Free Trial when available). You’ll receive a single API key for all your Zyla APIs.
- Use the key via HTTP header Authorization: Bearer YOUR_API_KEY.
Billing on Zyla is subscription + quota, not pay-per-call. There’s no Free Plan; check the API page for current access options and pricing.
Endpoint you’ll call
The API exposes one endpoint for traffic metrics. It accepts a single required parameter and returns a structured payload with visit and ranking metrics.
Site Traffic Stats
- Method: GET
- URL: https://zylalabs.com/api/5510/traffic-metrics-explorer-api/7147/site-traffic-stats
- Query param:
- domain (required): The domain to analyze (e.g., gmail.com).
- Auth: Authorization: Bearer YOUR_API_KEY
Copy-paste cURL request
Run this as-is, replacing YOUR_API_KEY with your key from Zyla. The domain parameter is required.
curl -s -X GET "https://zylalabs.com/api/5510/traffic-metrics-explorer-api/7147/site-traffic-stats?domain=gmail.com" \
-H "Authorization: Bearer YOUR_API_KEY"
Official sample response
Below is the official response sample. Use it to map out the fields you’ll read in your integration.
{"Version":1,"SiteName":"decorsystem.com.pl","Description":"sztukateria styropianowa wewnętrzna - produkujemy listwy dekoracyjne, listwy sufitowe, listwy ozdobne ścienne, przypodłogowe i inne elementy do wnętrz","TopCountryShares":[{"Country":616,"CountryCode":"PL","Value":0.9719507540741068},{"Country":276,"CountryCode":"DE","Value":0.011927008465685628},{"Country":826,"CountryCode":"GB","Value":0.010493205200990377},{"Country":528,"CountryCode":"NL","Value":0.005629032259217371}],"Title":"sztukateria ścienna, styropianowa, ozdobna, dekoracyjna","Engagments":{"BounceRate":"0.5099347930295581","Month":"11","Year":"2024","PagePerVisit":"3.527907956431343","Visits":"122728","TimeOnSite":"142.85020306566452"},"EstimatedMonthlyVisits":{"2024-09-01":133456,"2024-10-01":145713,"2024-11-01":122728},"GlobalRank":{"Rank":293452},"CountryRank":{"Country":616,"CountryCode":"PL","Rank":5641},"CategoryRank":{"Rank":"58","Category":"Home_and_Garden/Home_and_Garden"},"GlobalCategoryRank":null,"IsSmall":false,"Policy":0,"TrafficSources":{"Social":0.014974693477023336,"Paid Referrals":0.026707830225292793,"Mail":0.0038130298508330866,"Referrals":0.05137472542922812,"Search":0.41403432760255826,"Direct":0.4890953934014385},"Category":"home_and_garden/home_and_garden","LargeScreenshot":"https://site-images.similarcdn.com/image?url=decorsystem.com.pl&t=1&s=1&h=fd4f65c1308020880a5b57e8ad5b067e3df8691fc01c2428322ca684183216e4","IsDataFromGa":false,"Countries":[{"Code":"AF","UrlCode":"afghanistan","Name":"Afghanistan"},{"Code":"AX","UrlCode":"land-islands","Name":"Åland Islands"},{"Code":"AL","UrlCode":"albania","Name":"Albania"},{"Code":"DZ","UrlCode":"algeria","Name":"Algeria"},{"Code":"AS","UrlCode":"american-samoa","Name":"American Samoa"},{"Code":"AD","UrlCode":"andorra","Name":"Andorra"},{"Code":"AO","UrlCode":"angola","Name":"Angola"},{"Code":"AI","UrlCode":"anguilla","Name":"Anguilla"},{"Code":"AQ","UrlCode":"antarctica","Name":"Antarctica"},{"Code":"AG","UrlCode":"antigua-and-barbuda","Name":"Antigua and Barbuda"},{"Code":"AR","UrlCode":"argentina","Name":"Argentina"},{"Code":"AM","UrlCode":"armenia","Name":"Armenia"},{"Code":"AW","UrlCode":"aruba","Name":"Aruba"},{"Code":"AU","UrlCode":"australia","Name":"Australia"},{"Code":"AT","UrlCode":"austria","Name":"Austria"},{"Code":"AZ","UrlCode":"azerbaijan","Name":"Azerbaijan"},{"Code":"BS","UrlCode":"bahamas","Name":"Bahamas"},{"Code":"BH","UrlCode":"bahrain","Name":"Bahrain"},{"Code":"BD","UrlCode":"bangladesh","Name":"Ba…
Key fields you’ll likely use:
- Engagments.Visits: current month’s visits (string numeric). Treat as an integer count.
- EstimatedMonthlyVisits: a map of YYYY-MM-01 to monthly visit estimates. Useful for trend lines.
- GlobalRank.Rank, CountryRank.Rank: ranking integers for global and specific country.
- TopCountryShares: list of country codes with traffic share (0–1 fraction).
- TrafficSources: mix of channels (fractions summing approximately to 1).
- BounceRate, PagePerVisit, TimeOnSite: engagement metrics. Bounce rate and other values are represented as strings; parse to numeric for calculation.
Python example: fetch and normalize core metrics
This script calls the same endpoint, parses numeric strings, and prints a compact summary. Replace YOUR_API_KEY with your key and set the domain you need.
import os
import requests
API_KEY = os.getenv("Zyla_API_Key", "YOUR_API_KEY")
DOMAIN = "gmail.com"
url = "https://zylalabs.com/api/5510/traffic-metrics-explorer-api/7147/site-traffic-stats"
params = {"domain": DOMAIN}
headers = {"Authorization": f"Bearer {API_KEY}"}
resp = requests.get(url, headers=headers, params=params, timeout=30)
resp.raise_for_status()
data = resp.json()
# Helper to coerce string numbers to float
def to_float(x):
try:
return float(x)
except Exception:
return None
# Extract core fields safely
site = data.get("SiteName")
desc = data.get("Description")
eng = data.get("Engagments", {})
visits = eng.get("Visits")
bounce = to_float(eng.get("BounceRate"))
ppv = to_float(eng.get("PagePerVisit"))
tos = to_float(eng.get("TimeOnSite")) # seconds
rank_global = (data.get("GlobalRank") or {}).get("Rank")
country_rank = (data.get("CountryRank") or {}).get("Rank")
country_code = (data.get("CountryRank") or {}).get("CountryCode")
sources = data.get("TrafficSources", {})
search_share = sources.get("Search")
direct_share = sources.get("Direct")
trend = data.get("EstimatedMonthlyVisits", {})
print({
"domain": DOMAIN,
"site": site,
"visits_current_month": int(visits) if isinstance(visits, str) and visits.isdigit() else visits,
"bounce_rate": bounce, # 0-1
"pages_per_visit": ppv,
"avg_time_on_site_sec": tos,
"global_rank": rank_global,
"country_rank": {"code": country_code, "rank": country_rank},
"traffic_sources": {"search": search_share, "direct": direct_share},
"estimated_monthly_visits": trend
})
Implementation tips that save time
- Authentication: always send Authorization: Bearer YOUR_API_KEY. Do not pass API keys in the query string.
- Numeric parsing: several metrics (e.g., BounceRate, PagePerVisit, TimeOnSite, Visits) may be strings. Coerce to float/int before math or sorting.
- Units: TimeOnSite is seconds; TrafficSources and TopCountryShares are fractional shares (0–1). BounceRate is a fraction (0–1).
- Trends: EstimatedMonthlyVisits keys are month-start ISO dates (YYYY-MM-01). Sort keys and plot instead of assuming consecutive order.
- Caching: traffic metrics change on a monthly cadence with incremental updates; cache responses per domain to reduce latency and quota usage.
- Missing fields: not all domains will have all ranks or rich metadata. Always null-check optional objects like GlobalCategoryRank.
- Error handling: handle non-200 responses and timeouts. Retries with backoff help in batch enrichment jobs.
Practical use cases
Lead scoring and routing
Pull Engagments.Visits and GlobalRank for each inbound domain, then route to the right SDR tier. Add TrafficSources.Search to detect SEO-driven companies that may benefit from content partnerships.
Market expansion planning
Use TopCountryShares to compute the top 3 countries by share for competitor sites. Feed CountryRank into a heatmap to highlight strong vs. weak regions.
Partner vetting
Verify minimum traffic thresholds and engagement quality (PagePerVisit, BounceRate) before approving co-marketing or affiliate requests.
Content strategy
Track EstimatedMonthlyVisits trend for your blog and competing blogs. Flatten a rolling 3-month average and alert on ≥15% month-over-month dips or gains.
Calling from AI agents via MCP
If you work inside Claude Code, Cursor, Windsurf, or another MCP-compatible client, you can wire this API into your agent by pointing it at the Zyla MCP endpoint. The same Authorization header and domain parameter apply; the agent will issue the GET request on your behalf.
- MCP endpoint: MCP
- Pass your Zyla key once; your agent can then call the Traffic Metrics Explorer API endpoint using that credential.
- Use the same URL and query parameter shown above; agents typically let you define a tool that performs the GET with runtime-supplied domain.
Field-by-field mapping cheatsheet
- SiteName, Title, Description: identifiers and human-readable labels for UI.
- Engagments:
- Month, Year: strings representing the current aggregation period.
- Visits: current month’s visit estimate.
- PagePerVisit, BounceRate, TimeOnSite: engagement quality signals.
- EstimatedMonthlyVisits: historical visits keyed by month-start date for time-series charts.
- GlobalRank, CountryRank, CategoryRank: ranking contexts for comparison widgets.
- TopCountryShares: breakdown for geo mix pie charts or targeting logic.
- TrafficSources: acquisition channels; values are fractional shares.
Full wiring checklist
- Subscribe on the API listing and fetch your key from Zyla API Hub.
- Call GET https://zylalabs.com/api/5510/traffic-metrics-explorer-api/7147/site-traffic-stats with domain and your Authorization header.
- Parse numeric strings to numbers, store raw JSON for auditability.
- Cache by domain for 24 hours (or your SLA window) to minimize repeat fetches.
- Build UI components:
- Headline: visits (current month), global rank.
- Trend: EstimatedMonthlyVisits sparkline.
- Breakdowns: TopCountryShares and TrafficSources pies.
- Quality: BounceRate, PagePerVisit, TimeOnSite badges.
FAQ
What authentication is required?
Send Authorization: Bearer YOUR_API_KEY in the header for every request.
Which parameters are required?
The endpoint requires one query parameter: domain. Example: ?domain=gmail.com.
How often do metrics update?
Traffic and rankings are monthly aggregates with periodic refreshes. For most apps, daily or weekly caching per domain is sufficient.
Can I get historical data?
Yes, via the EstimatedMonthlyVisits object, which maps month-start dates (YYYY-MM-01) to visit counts.
Is there a free plan?
There is no Free Plan. A 7-day trial is available on the item page; check the listing for current access options and pricing.
Ready to ship? Start your 7-day trial, get your API key, and plug traffic metrics into your product today: Start 7-day trial on Traffic Metrics Explorer API.
Official API response
{"Version":1,"SiteName":"decorsystem.com.pl","Description":"sztukateria styropianowa wewnętrzna - produkujemy listwy dekoracyjne, listwy sufitowe, listwy ozdobne ścienne, przypodłogowe i inne elementy do wnętrz","TopCountryShares":[{"Country":616,"CountryCode":"PL","Value":0.9719507540741068},{"Country":276,"CountryCode":"DE","Value":0.011927008465685628},{"Country":826,"CountryCode":"GB","Value":0.010493205200990377},{"Country":528,"CountryCode":"NL","Value":0.005629032259217371}],"Title":"sztukateria ścienna, styropianowa, ozdobna, dekoracyjna","Engagments":{"BounceRate":"0.5099347930295581","Month":"11","Year":"2024","PagePerVisit":"3.527907956431343","Visits":"122728","TimeOnSite":"142.85020306566452"},"EstimatedMonthlyVisits":{"2024-09-01":133456,"2024-10-01":145713,"2024-11-01":122728},"GlobalRank":{"Rank":293452},"CountryRank":{"Country":616,"CountryCode":"PL","Rank":5641},"CategoryRank":{"Rank":"58","Category":"Home_and_Garden/Home_and_Garden"},"GlobalCategoryRank":null,"IsSmall":false,"Policy":0,"TrafficSources":{"Social":0.014974693477023336,"Paid Referrals":0.026707830225292793,"Mail":0.0038130298508330866,"Referrals":0.05137472542922812,"Search":0.41403432760255826,"Direct":0.4890953934014385},"Category":"home_and_garden/home_and_garden","LargeScreenshot":"https://site-images.similarcdn.com/image?url=decorsystem.com.pl&t=1&s=1&h=fd4f65c1308020880a5b57e8ad5b067e3df8691fc01c2428322ca684183216e4","IsDataFromGa":false,"Countries":[{"Code":"AF","UrlCode":"afghanistan","Name":"Afghanistan"},{"Code":"AX","UrlCode":"land-islands","Name":"Åland Islands"},{"Code":"AL","UrlCode":"albania","Name":"Albania"},{"Code":"DZ","UrlCode":"algeria","Name":"Algeria"},{"Code":"AS","UrlCode":"american-samoa","Name":"American Samoa"},{"Code":"AD","UrlCode":"andorra","Name":"Andorra"},{"Code":"AO","UrlCode":"angola","Name":"Angola"},{"Code":"AI","UrlCode":"anguilla","Name":"Anguilla"},{"Code":"AQ","UrlCode":"antarctica","Name":"Antarctica"},{"Code":"AG","UrlCode":"antigua-and-barbuda","Name":"Antigua and Barbuda"},{"Code":"AR","UrlCode":"argentina","Name":"Argentina"},{"Code":"AM","UrlCode":"armenia","Name":"Armenia"},{"Code":"AW","UrlCode":"aruba","Name":"Aruba"},{"Code":"AU","UrlCode":"australia","Name":"Australia"},{"Code":"AT","UrlCode":"austria","Name":"Austria"},{"Code":"AZ","UrlCode":"azerbaijan","Name":"Azerbaijan"},{"Code":"BS","UrlCode":"bahamas","Name":"Bahamas"},{"Code":"BH","UrlCode":"bahrain","Name":"Bahrain"},{"Code":"BD","UrlCode":"bangladesh","Name":"Ba…
Official API response
{"Version":1,"SiteName":"decorsystem.com.pl","Description":"sztukateria styropianowa wewnętrzna - produkujemy listwy dekoracyjne, listwy sufitowe, listwy ozdobne ścienne, przypodłogowe i inne elementy do wnętrz","TopCountryShares":[{"Country":616,"CountryCode":"PL","Value":0.9719507540741068},{"Country":276,"CountryCode":"DE","Value":0.011927008465685628},{"Country":826,"CountryCode":"GB","Value":0.010493205200990377},{"Country":528,"CountryCode":"NL","Value":0.005629032259217371}],"Title":"sztukateria ścienna, styropianowa, ozdobna, dekoracyjna","Engagments":{"BounceRate":"0.5099347930295581","Month":"11","Year":"2024","PagePerVisit":"3.527907956431343","Visits":"122728","TimeOnSite":"142.85020306566452"},"EstimatedMonthlyVisits":{"2024-09-01":133456,"2024-10-01":145713,"2024-11-01":122728},"GlobalRank":{"Rank":293452},"CountryRank":{"Country":616,"CountryCode":"PL","Rank":5641},"CategoryRank":{"Rank":"58","Category":"Home_and_Garden/Home_and_Garden"},"GlobalCategoryRank":null,"IsSmall":false,"Policy":0,"TrafficSources":{"Social":0.014974693477023336,"Paid Referrals":0.026707830225292793,"Mail":0.0038130298508330866,"Referrals":0.05137472542922812,"Search":0.41403432760255826,"Direct":0.4890953934014385},"Category":"home_and_garden/home_and_garden","LargeScreenshot":"https://site-images.similarcdn.com/image?url=decorsystem.com.pl&t=1&s=1&h=fd4f65c1308020880a5b57e8ad5b067e3df8691fc01c2428322ca684183216e4","IsDataFromGa":false,"Countries":[{"Code":"AF","UrlCode":"afghanistan","Name":"Afghanistan"},{"Code":"AX","UrlCode":"land-islands","Name":"Åland Islands"},{"Code":"AL","UrlCode":"albania","Name":"Albania"},{"Code":"DZ","UrlCode":"algeria","Name":"Algeria"},{"Code":"AS","UrlCode":"american-samoa","Name":"American Samoa"},{"Code":"AD","UrlCode":"andorra","Name":"Andorra"},{"Code":"AO","UrlCode":"angola","Name":"Angola"},{"Code":"AI","UrlCode":"anguilla","Name":"Anguilla"},{"Code":"AQ","UrlCode":"antarctica","Name":"Antarctica"},{"Code":"AG","UrlCode":"antigua-and-barbuda","Name":"Antigua and Barbuda"},{"Code":"AR","UrlCode":"argentina","Name":"Argentina"},{"Code":"AM","UrlCode":"armenia","Name":"Armenia"},{"Code":"AW","UrlCode":"aruba","Name":"Aruba"},{"Code":"AU","UrlCode":"australia","Name":"Australia"},{"Code":"AT","UrlCode":"austria","Name":"Austria"},{"Code":"AZ","UrlCode":"azerbaijan","Name":"Azerbaijan"},{"Code":"BS","UrlCode":"bahamas","Name":"Bahamas"},{"Code":"BH","UrlCode":"bahrain","Name":"Bahrain"},{"Code":"BD","UrlCode":"bangladesh","Name":"Ba…