How to Get a Website's Global Rank
You need to programmatically look up any website’s global rank and traffic profile so you can decide what to block or allow, enrich a signup or lead with traffic insights, or audit where your ads actually run. By the end of this guide, you’ll plug Klazify’s traffic intelligence endpoint into your pipeline, request a site’s global rank, and operationalize the result with caching, batching, and fallback strategies.
Why Klazify is the best API to retrieve and act on global website rank
Global traffic rank is only useful if it’s accurate, fresh, and easy to wire into your stack. Klazify was built to classify and analyze domains at scale, so you can trust rank and engagement signals when you need to block, score, or enrich domains.
- Accurate website categorization using AI: Global rank makes the most sense when paired with category. Klazify analyzes full-site content (not just metadata) to map domains into precise IAB-aligned categories, helping you interpret rank in context (e.g., a news site vs. a niche forum).
- Global coverage: Multi-language analysis lets you evaluate rank and traffic for international properties you encounter in global ad ops, cybersecurity, or enrichment workflows.
- Real-time classification: Domains evolve quickly. Klazify emphasizes up-to-date analysis, so rank and category signals reflect current reality rather than a stale snapshot.
- Industry-level categories: IAB taxonomy support means you can align traffic rank with standardized ad tech categories for targeting, brand safety, and compliance.
- Simple API integration: REST endpoints with JSON responses let you drop rank and category checks directly into your data pipeline or scoring service with minimal glue code.
- Superior compliance and filtering: When the job is to block or whitelist websites, pairing global rank with category and engagement helps you set confident, automated rules.
Explore the platform anytime at klazify.com, and create a free account to try the API in minutes: Register.
What you’ll build: fetch a site’s global rank and traffic profile
You will call Klazify’s domain traffic intelligence endpoint to obtain fields such as global_rank, country_rank, category_rank, monthly_visits, engagement, traffic_sources, and top_countries. You’ll parse those fields and apply consistent business rules: block very low-traffic domains from ad placements, prioritize high-traffic leads for sales, or flag spikes in engagement for investigation.
Endpoint:
- POST https://www.klazify.com/api/domain_traffic_intelligence
Authentication:
- Authorization: Bearer YOUR_API_KEY
- Content-Type: application/json
Request body:
- {"url":"https://example.com"}
Copy-paste cURL to get global rank
Run this request in your terminal to fetch the rank and traffic profile. The example URL is only in this cURL block; swap it with any site you need to evaluate.
curl -s -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"}'
Notes:
- Replace YOUR_API_KEY with your token from your dashboard. If you don’t have one yet, you can Register now. Starter is $39.99/mo with a 7-day trial. Failed or unreachable calls are not billed.
- Use fully qualified URLs (https://...) for the most consistent results.
Python example: parse rank, monthly visits, engagement, and top countries
This Python snippet demonstrates how to call the endpoint, handle timeouts, and read the fields you’ll use in your rules. It does not assume a specific shape beyond the field names referenced below, so you can adapt the parsing to your application.
import os
import json
import time
import requests
API_KEY = os.getenv("KLAZIFY_API_KEY", "YOUR_API_KEY")
API_URL = "https://www.klazify.com/api/domain_traffic_intelligence"
def fetch_traffic(url, timeout=15):
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}
payload = {"url": url}
resp = requests.post(API_URL, headers=headers, json=payload, timeout=timeout)
resp.raise_for_status()
return resp.json()
def score_domain(traffic):
# Safely access keys; default to None to avoid KeyErrors
global_rank = traffic.get("global_rank")
country_rank = traffic.get("country_rank")
category_rank = traffic.get("category_rank")
monthly_visits = traffic.get("monthly_visits")
engagement = traffic.get("engagement") # e.g., time_on_site, bounce_rate, pages_per_visit
traffic_sources = traffic.get("traffic_sources") # e.g., direct, search, social, referrals
top_countries = traffic.get("top_countries") # e.g., [{"country_code": "US", "share": 0.45}, ...]
# Example logic: prefer sites with top-100k global rank and meaningful monthly visits
rank_ok = (isinstance(global_rank, int) and global_rank > 0 and global_rank <= 100000)
visits_ok = (isinstance(monthly_visits, (int, float)) and monthly_visits >= 100000)
# Optional: check engagement or specific geos
us_share = 0.0
if isinstance(top_countries, list):
for c in top_countries:
if c.get("country_code") == "US":
us_share = float(c.get("share", 0.0))
break
return {
"rank_ok": rank_ok,
"visits_ok": visits_ok,
"us_share": us_share,
"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,
}
if __name__ == "__main__":
domain_url = "https://example.com"
try:
traffic = fetch_traffic(domain_url)
decision = score_domain(traffic)
print(json.dumps(decision, indent=2))
except requests.HTTPError as e:
# Non-2xx responses are not billed if the call fails or is unreachable
print("HTTP error:", e)
except requests.RequestException as e:
print("Network error:", e)
How to use the fields:
- global_rank: Use as a high-level popularity proxy. Lower is better. Decide rank cutoffs for allowlists, ad eligibility, or prioritization.
- country_rank: Identify local leaders. Useful for geo-targeted campaigns and region-specific scoring.
- category_rank: Compare a site only against its peers (e.g., news vs. ecommerce) rather than the entire web.
- monthly_visits: Scale-based thresholding for lead enrichment, vendor selection, or ad placement minimums.
- engagement: Optional signals such as time_on_site, bounce_rate, pages_per_visit help refine quality filters.
- traffic_sources: Distinguish organic-heavy sites from paid-traffic-heavy sites; adjust scoring or QA accordingly.
- top_countries: Align with your target markets; route non-core-geo sites differently.
Official categorization response example you can reuse downstream
Klazify exposes multiple endpoints. When you need both traffic and category for a decision (e.g., “only accept sites ranked under 100k and within IAB News categories”), you can pair traffic intelligence with the categorization output. Below is the official sample categorization JSON. Use the category and tags to contextualize rank.
{
"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"
]
}
What to use here:
- domain.categories: IAB-aligned category names to contextualize rank thresholds by vertical.
- domain.logo_url: Logo enrichment for UI or CRM.
- objects.company fields (name, location, tags, tech): Enrich your entities alongside rank to drive scoring rules or routing.
- domain_registration_data: Optional trust heuristics (e.g., very new domains plus low traffic rank may be riskier).
- similar_domains: Helpful for lookalike checks or competitive analysis.
You can combine the traffic intelligence output with the categorize endpoint’s category signals to build nuanced allow/deny lists or enrichment profiles. Read more in the Documentation.
Field-by-field: turning rank into decisions
| Field | Meaning | Common actions |
|---|---|---|
| global_rank | Overall popularity index across the web; lower is more popular. | Set top-N cutoffs (e.g., allowlist top 100k) or weight scores. |
| country_rank | Popularity within a specific country. | Geo-targeting and compliance checks; region-first routing. |
| category_rank | Popularity relative to peers in the same category. | Evaluate leaders within verticals; normalize cross-category comparisons. |
| monthly_visits | Estimated scale for monthly traffic. | Minimum traffic thresholds; lead prioritization based on scale. |
| engagement | Behavioral metrics like time on site, pages per visit, bounce rate. | Quality filters; deprioritize thin or bouncy sites. |
| traffic_sources | Distribution of traffic by source (e.g., direct, search, social). | Assess acquisition quality; flag heavy paid-only patterns for review. |
| top_countries | Top geographies by share of traffic. | Match to your target markets; regional routing or eligibility. |
Operational guidance: batching, caching, and taxonomy mapping
Batching at scale
- Deduplicate inputs per run to avoid re-requesting the same domain.
- Group calls in parallel within your application’s concurrency and your plan’s practical throughput. If your job queue is bursty, consider a token bucket or worker pool to smooth spikes.
- On transient failures, retry with exponential backoff and jitter. Failed or unreachable calls are not billed.
Cache and expiry
- Cache traffic intelligence results per domain. A 7–30 day TTL is a common starting point for rank/traffic signals; shorten if your use case needs fresher signals (e.g., ad ops) and lengthen if you run nightly enrichment.
- Store both the normalized domain (e.g., registrable domain) and the input URL to avoid duplicate lookups. Consider canonicalizing “www.” vs. apex domains.
Handling unknown or new domains
- If a domain is very new or has limited visibility, you may receive sparse traffic fields. Fall back to category data via the main categorization endpoint to avoid blocking legitimate new sites by default.
- Queue unknowns for recheck after a delay (e.g., 7 days) before final disposition.
Mapping to your taxonomy
- Klazify maps to IAB taxonomy, which is widely used in ad tech. If you maintain a custom taxonomy, create a static mapping table from IAB nodes to your categories.
- Combine category_rank with your taxonomy weights to maintain consistent thresholds across diverse verticals.
Data governance and auditability
- Persist the raw JSON response alongside your normalized fields to support audits and troubleshooting.
- Version your business rules (cutoffs for rank, visit thresholds, engagement minimums) and keep a changelog for reproducibility.
Putting it together: pipeline patterns that ship
- Ad placement safety: Before bidding or placing, fetch global_rank and category_rank. If global_rank is above your threshold or category is disallowed, skip the placement.
- Signup enrichment: At user registration, lookup the domain in near-real-time. Use monthly_visits and top_countries to route the lead, and category_rank to assign to the right segment.
- Security triage: For outbound traffic, if a destination is low traffic (high global_rank) and recently registered, flag for additional checks. Cache the decision to minimize latency on subsequent requests.
- Analytics QA: Use traffic_sources to detect anomalies, e.g., sudden swings to paid traffic for a partner domain; alert if engagement drops below your quality threshold.
If you’re building a multi-endpoint workflow (traffic + categorization + logos/company data), the MCP resource and the full Documentation explain structures and fields across endpoints. You can always start from the homepage at klazify.com for an overview.
Error handling, latency, and monitoring
- Timeouts: Set client-side timeouts (10–20s typical) to bound latency. For batch jobs, you can extend timeouts when network conditions vary.
- Retries: Use exponential backoff for network errors or 5xx responses. Mark final failures as “retry later” in your queue; remember that failed/unreachable calls are not billed.
- Observability: Log request IDs, input URL, response status, and a hash of the JSON body. Track your cache hit ratio and average response time to spot regressions.
Governance of thresholds and SLAs with your stakeholders
- Define business thresholds with product and ops: e.g., allowlist top 100k globally, require 100k+ monthly visits, or target category_rank top 5% in your vertical.
- Version these thresholds in code or config and expose them to data/ops via feature flags for safe iteration.
- Backfill historical data where needed so you can evaluate the impact of new thresholds before rollout.
Common implementation patterns for scale and cost
- Front a persistent store: Save traffic responses keyed by domain with TTL. Lookup the store first; if stale or missing, hit the API.
- Bulk jobs during off-peak hours: Revalidate your top domains nightly or weekly. Spread your workload to keep latency low for real-time paths.
- Idempotency: For rebuilds or replays, ensure your job IDs or dedup logic prevents duplicate API calls on the same input set.
FAQ
-
Can I request traffic intelligence for a full URL, not just the root domain?
Yes. Provide a fully qualified URL in the JSON body. For consistency in caching, you may want to normalize to the registrable domain, then store both the original URL and the domain. -
How often should I refresh global rank and monthly visits?
Most teams start with a 7–30 day TTL depending on sensitivity. Ad ops or brand safety workflows may refresh more frequently; CRM enrichment and analytics often refresh monthly. -
What if a site has sparse or no traffic data?
Handle null or missing fields gracefully and fall back to categorization and domain registration data. Queue a recheck later so new or niche sites aren’t permanently penalized. -
How do I align IAB categories with our internal taxonomy?
Create a mapping table from IAB category names to your internal segments. Keep it versioned; you can then use category_rank thresholds within each mapped bucket. -
Are failed requests charged?
Failed or unreachable calls are not billed. Implement retries with backoff and monitor error rates.
Start fetching global ranks and traffic profiles now. Create your API key with a 7-day trial on the Starter plan ($39.99/mo), wire the POST request into your pipeline, and ship your first decision rule today: Register.
Ready to use Klazify?
Start classifying websites, enriching company data, and exploring web intelligence.
Get Started Free