Website Traffic API: Get Monthly Visits

October 15, 2026
Website Traffic API: Get Monthly Visits

You need to identify a domain’s monthly visits to power decisions like: blocking low-quality inventory, enriching a signup with traffic context, or auditing where your ads actually run. By the end of this guide you’ll call a single API to fetch monthly visits, ranks, engagement, traffic sources, and country-level breakdowns — and know exactly how to plug the response into your data pipeline at scale.

Why Klazify is the best fit for getting monthly visits you can act on

If your goal is to measure and act on website traffic, you also need reliable context. Klazify couples traffic intelligence with precise website categorization and domain signals so engineering teams can integrate one source for both “how big” and “what is it.” Here’s what that means for a Website Traffic API focused on monthly visits:

Illustration: Website Traffic API: Get Monthly Visits
  • Accurate website categorization using AI: Klazify’s models analyze full-page content, not just metadata. When you pull monthly visits, you also get reliable IAB categories so you can segment traffic by industry and policy (e.g., content filtering, brand safety).
  • Global coverage: Traffic metrics and categories adapt to sites in multiple languages, which is important when you’re normalizing monthly visits across international inventories or accounts.
  • Real-time classification: Categories and signals refresh off live content, keeping your traffic-based decisions aligned with current site focus rather than stale lists.
  • Industry-level categories (IAB): You can map monthly visits to IAB-aligned categories used in ad tech, audience targeting, and brand safety, simplifying downstream joins.
  • Simple API integration: A single REST endpoint returns traffic intelligence — global rank, country rank, category rank, monthly visits, engagement, traffic sources, and top countries — ready for streaming or batch workflows.
  • Compliance and filtering: Combine traffic volume with IAB categories to block, allow, or throttle based on both size and content type, improving ad placement audits and content controls.

What you can build with monthly visits and ranks

  • Brand safety and ad placement audits: Verify that campaigns run on domains that meet a minimum monthly visits threshold and appear in allowed IAB categories.
  • Lead enrichment: Enrich signups or CRM records with monthly visits to prioritize outreach and tailor pitch based on audience scale and engagement depth.
  • Content filtering: Use category_rank and IAB categories to enforce policies; use monthly_visits to spot unusually small or suspicious sites before allowing them on a network.
  • Analytics and scoring: Create composite domain authority scores that blend monthly_visits, global_rank, engagement, and traffic_sources share for modeling.

Traffic intelligence endpoint and request

Use the domain traffic intelligence endpoint with a POST body that includes the URL to analyze. Authentication uses a standard Bearer token. Failed or unreachable calls are not billed.

curl -X POST "https://www.klazify.com/api/domain_traffic_intelligence" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://cbsnews.com"}'

Fields you will parse in your pipeline include:

  • global_rank: Global traffic rank across all domains.
  • country_rank: Rank within the top country for the domain.
  • category_rank: Rank within the site’s primary IAB-aligned category.
  • monthly_visits: Estimated monthly visit volume.
  • engagement: Visit-level metrics (e.g., visit duration, bounce indicators) useful for quality scoring.
  • traffic_sources: Distribution of major acquisition channels.
  • top_countries: Country breakdown, typically country code and share/visits.

For exact field names and structures, see the Documentation.

Official sample response (categorization) and how to combine with traffic

Below is the official sample response from the categorization endpoint. Keep it as-is when testing parsing logic. You’ll commonly call both endpoints in production: use categorize to get IAB taxonomy and company context, and domain_traffic_intelligence to get monthly visits and ranks; then join results by domain.


{
"domain": {
"categories": [
{
"confidence": 0.92,
"name": "/Computers & Electronics/Consumer Electronics",
"IAB-632-596": "Consumer Electronics/Technology & Computing/Consumer Electronics"
},
{
"confidence": 0.89,
"name": "/Internet & Telecom/Mobile & Wireless/Mobile Phones"
}
],
"social_media": null,
"logo_url": "https://klazify.s3.amazonaws.com/2110787991611585019600ed5fb1d1300.04730104.png"
},
"success": true,
"objects": {
"company": {
"url": "https://www.apple.com/",
"name": "Apple",
"city": "Cupertino",
"stateCode": "CA",
"countryCode": "US",
"employeesRange": "100K+",
"revenue": 274515000000,
"raised": null,
"tags": [
"E-commerce",
"Consumer Electronics",
"Mobile",
"B2C"
],
"tech": [
"omniture_adobe_analytics",
"atlassian_confluence",
"successfactors",
"apache_apex",
"talend",
"oracle_peoplesoft",
"salesforce",
"stripe",
"dell_boomi_atomsphere",
"gigya",
"sage_50cloud",
"quickbooks",
"webmethods",
"apache_tomcat",
"alteryx",
"tibco_rendezvous",
"atlassian_jira",
"..."
]
}
},
"domain_registration_data": {
"domain_age_date": "1987-02-19",
"domain_age_days_ago": "13026",
"domain_expiration_date": "2030-02-20",
"domain_expiration_days_left": "123"
},
"similar_domains": [
"bestbuy.com",
"icloud.com",
"microsoft.com",
"macrumors.com",
"google.com",
"samsung.com",
"twitter.com",
"hp.com",
"bhphotovideo.com",
"dell.com"
]
}

How you’ll use these fields with traffic:

  • domain.categories: Determine the primary IAB category, then look up category_rank from the traffic response to compare a site against peers in the same vertical.
  • objects.company fields: Enrich your CRM or inventory with company name, location, and tech tags for segmentation alongside monthly_visits.
  • domain_registration_data: Use domain age in scoring logic with global_rank and engagement to flag newly registered, low-traffic domains.
  • similar_domains: Expand analysis by fetching traffic stats for a cluster of related sites.

End-to-end example: fetch traffic and wire into a pipeline

Python example

This example calls the domain traffic endpoint, reads the traffic fields you need, and shows how to cache results per domain to reduce repeat calls. Adjust exception handling to your framework.

import os
import time
import requests

API_KEY = os.getenv("KLAZIFY_API_KEY", "YOUR_API_KEY")
API_URL = "https://www.klazify.com/api/domain_traffic_intelligence"

# Simple in-memory cache for demo; replace with Redis or your datastore
cache = {}
CACHE_TTL_SECS = 24 * 3600 # cache traffic by domain for 24h

def get_domain_traffic(url):
now = time.time()
if url in cache:
entry = cache[url]
if now - entry["ts"] < CACHE_TTL_SECS:
return entry["data"]

resp = requests.post(
API_URL,
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
json={"url": url},
timeout=20,
)
# Failed or unreachable calls are not billed
resp.raise_for_status()
data = resp.json()

cache[url] = {"ts": now, "data": data}
return data

def to_record(url):
data = get_domain_traffic(url)

# Defensive access: tolerate missing fields for new/unknown domains
global_rank = data.get("global_rank")
country_rank = data.get("country_rank")
category_rank = data.get("category_rank")
monthly_visits = data.get("monthly_visits")
engagement = data.get("engagement", {}) # dict (e.g., avg_duration, pages_per_visit)
traffic_sources = data.get("traffic_sources", {}) # dict of shares
top_countries = data.get("top_countries", []) # list of {country_code, share/visits}

return {
"url": url,
"global_rank": global_rank,
"country_rank": country_rank,
"category_rank": category_rank,
"monthly_visits": monthly_visits,
"engagement": engagement,
"traffic_sources": traffic_sources,
"top_countries": top_countries,
"fetched_at": int(time.time()),
}

if __name__ == "__main__":
record = to_record("https://example.com")
# Example downstream usage: filter, route, or log
print(record)

Notes for production:

  • Batching: Send one POST per domain. For large batches, parallelize with worker pools while respecting rate limits described in the Documentation.
  • Retry/backoff: Network hiccups should be retried with exponential backoff. Failed or unreachable calls are not billed.
  • Caching: Cache by normalized domain (e.g., scheme-less, lowercased) to minimize duplicate calls. Use TTLs aligned with how often you need fresh traffic.
  • Unknown/new domains: Some fields may be null or absent for newly seen domains. Always code defensively and backfill later runs.

How to act on global_rank, monthly_visits, and category_rank

After parsing, you’ll typically build policy checks or scoring. A few practical examples:

  • Blocklist by scale: Block domains with monthly_visits below your threshold.
  • Quality routing: If engagement shows short visits, route the domain to lower-cost tiers even if monthly_visits is high.
  • Category-based audits: Use IAB category from the categorize endpoint and pair it with category_rank to ensure your placements are within top-tier properties in that vertical.
  • Geo targeting: Use top_countries to match buy/sell markets, or exclude domains with low share in your focus countries.

Mapping traffic metrics to your internal taxonomy

Most teams maintain an internal classification for policy and analytics. Here’s how to align Klazify data to your own model:

  • Categories: Map Klazify’s IAB category path to your standardized taxonomy keys; store the raw category string for traceability.
  • Ranks: Normalize global_rank, country_rank, and category_rank into quantiles or buckets (e.g., 1–1000, 1001–10k) to simplify downstream rule logic.
  • Visits: Keep monthly_visits as a numeric field; derive scaled fields like log10(monthly_visits) to reduce skew in models.
  • Engagement: Split out engagement subfields into columns; missing values should default to null and be excluded from strict rules.
  • Traffic sources: Convert source shares into feature vectors for your ML models; store as percentages in [0,1] to keep consistent units.

Comparing the traffic fields you’ll use

Field What it means Common uses Handling tips
global_rank Domain’s global traffic rank across all sites Score inventory, prioritize audits, define tiers Lower is stronger; bucket into rank ranges
country_rank Rank in a primary market Geo targeting, sales territory planning Pair with top_countries to confirm relevant market
category_rank Rank within the site’s main IAB-aligned category Vertical-specific benchmarking, allow/deny rules Requires category from categorize endpoint for context
monthly_visits Estimated monthly visits Eligibility thresholds, lead scoring, modeling Cache per domain; expect periodic fluctuation
engagement Visit quality metrics (e.g., duration, depth) Quality routing, content performance checks Some domains may have limited coverage
traffic_sources Acquisition channel shares Source mix analysis, fraud heuristics Normalize to percentages in [0,1]
top_countries Country-level traffic distribution Geo alignment for campaigns and sales Use ISO country codes for consistent joins

Joining categorization, company data, and traffic

Most production pipelines combine multiple outputs from Klazify. A simple pattern:

  1. Normalize input: Lowercase, remove tracking params, and keep canonical domain form.
  2. Call categorize: Get categories, company fields, logo_url, and related signals. Cache for 7–30 days depending on policy sensitivity.
  3. Call domain_traffic_intelligence: Get global_rank, country_rank, category_rank, monthly_visits, engagement, traffic_sources, and top_countries. Cache for 1–7 days depending on freshness requirements.
  4. Join by canonical domain: Merge both responses into a single record passed downstream.
  5. Apply policy: Use category + rank + visits to enforce allow/deny and to route inventory or leads.

Operational details that save time

  • Batching and rate limits: Use controlled concurrency (e.g., 5–20 workers) based on your account’s guidance in the Documentation. Throttle on HTTP 429 or vendor-specified headers if present.
  • Caching per domain: Cache traffic results per domain for a fixed TTL to reduce calls and stabilize metrics; keep a separate TTL for categorization versus traffic.
  • Handling unknown or new domains: Expect partial data; design nullable fields and delayed decisions. Re-check after a backoff window to allow fresh crawling/aggregation.
  • Normalization: Store both the raw API response (as JSON) and your normalized fields; this helps with audits and future reprocessing.
  • Observability: Log request IDs, latency, and error codes. Failed or unreachable calls are not billed, but still log them to trigger retries and dashboards.

Getting started and next steps

You can integrate the traffic endpoint in minutes. Create a free account, grab your key, and post your first domain to fetch monthly visits and ranks. The Starter plan is $39.99/mo with a 7-day trial, which is enough to validate your pipeline end to end.

Register • Documentation • MCP

FAQ

How often should I refresh monthly_visits?
It depends on your decision window. Many teams cache traffic intelligence per domain for 1–7 days. Refresh more frequently for ad placement audits; less frequently for CRM enrichment.

Can I align category_rank with my internal categories?
Yes. First map the IAB category from the categorize endpoint to your internal taxonomy. Then align category_rank to that mapping so you’re comparing ranks within the correct vertical.

What happens if a domain has partial data?
Fields like engagement or top_countries may be missing for new or low-signal domains. Code defensively with defaults and recheck after a backoff period. Failed or unreachable calls are not billed.

How do I handle large backfills?
Run parallel workers with rate limiting and domain-level caching. Persist raw JSON and normalized fields so retries don’t duplicate work.

Where can I find all available fields and structures?
See the full schema, endpoints, and examples in the Documentation.

Ready to fetch monthly visits, ranks, and engagement for your domains? Create your account and start integrating today: Register. Visit the homepage to learn more about domain intelligence and categorization at https://www.klazify.com.

Ready to use Klazify?

Start classifying websites, enriching company data, and exploring web intelligence.

Get Started Free