How to Get a Website's Tech Stack in Python

November 17, 2026
How to Get a Website's Tech Stack in Python

Your team needs to automatically detect which technologies a website uses—CMS, analytics, CDN, frameworks, or ad networks—so you can enrich leads, route accounts, or flag vendors during procurement. In this guide you’ll build a working Python integration that returns a site’s tech stack using Klazify’s domain intelligence API and shows you how to operationalize the results at scale.

Why Klazify is the best fit for extracting a site’s tech stack

When the job is to identify technologies on a site (e.g., analytics suites, ad networks, CMS, frameworks), accuracy and coverage are non-negotiable. Klazify analyzes live web content to reveal the stack behind any URL and exposes it via a simple REST API you can call from Python.

Illustration: How to Get a Website's Tech Stack in Python
  • Accurate tech detection with AI: Klazify analyzes rendered content and signals beyond page metadata, improving detection of technologies that load dynamically or are embedded in tag managers.
  • Global coverage: Many stacks differ by region and language. Klazify works across international domains so your enrichment doesn’t break when prospects use localized properties.
  • Real-time analysis: Instead of stale databases, Klazify refreshes data so you can catch stack migrations (for example, when a publisher switches analytics or ad platforms).
  • IAB mapping available: If you also need brand safety or contextual controls, the same API supports IAB-aligned content categorization so you can tie tech stack to category policies.
  • Simple API integration: A single POST with a URL returns the stack as structured identifiers you can map into your own taxonomy.
  • Compliance and filtering: Use detected ad networks or trackers to enforce data handling, privacy, or vendor management policies automatically.

If your end goal is lead enrichment, ad quality assurance, or content filtering across thousands of domains, Klazify provides a single integration point to retrieve technologies alongside company and categorization data. Explore more on klazify.com.

What you’ll build

You’ll create a Python script that calls Klazify’s technology detection endpoint and prints a clean list of technology identifiers for each domain you process. We’ll include a copy-paste curl request to test the endpoint, walk through the JSON structure you’ll parse, and cover caching, batching, and failure handling so you can drop this into production pipelines.

Endpoint and authentication

We’ll use the technology endpoint:

  • Method: POST
  • URL: https://www.klazify.com/api/domain_tech
  • Auth: Bearer token in the Authorization header
  • Body: JSON with a single field, url

Create a free account to get your API key: Register. You can also review parameters anytime in the Documentation.

Test the API with curl

Run this request to validate your key and see a live response. Replace YOUR_API_KEY with your token.

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

Successful calls return JSON that includes the company tech stack under objects.company.tech. Failed or unreachable calls are not billed.

Understand the response structure

Below is an official sample response format showing where technology data lives. We’ll use the tech array to extract stack identifiers.


{
    "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"
    ]
}

Key fields you’ll use:

  • objects.company.tech: Array of technology identifiers. Each string corresponds to a detected product or platform. You can map these to internal labels or categories.
  • domain.categories: Optional IAB-aligned categories that can help you segment or filter domains in addition to the tech stack.
  • domain.logo_url: Useful for UI enrichment if you surface detected data to users.
  • success: Boolean flag to guard your pipeline logic.

Python: fetch and parse the tech stack

The script below posts a URL, parses the tech array, and normalizes it for downstream use. It also includes basic timeout and error handling.

import json
import time
import requests
from typing import List, Dict, Any, Optional

KLAZIFY_API_KEY = "YOUR_API_KEY"
API_URL = "https://www.klazify.com/api/domain_tech"
TIMEOUT_SEC = 15

session = requests.Session()
session.headers.update({
    "Authorization": f"Bearer {KLAZIFY_API_KEY}",
    "Content-Type": "application/json",
})

def get_tech_stack(url: str) -> Dict[str, Any]:
    payload = {"url": url}
    try:
        resp = session.post(API_URL, json=payload, timeout=TIMEOUT_SEC)
        # Handle transient HTML/502s gracefully
        if resp.status_code >= 500:
            return {"success": False, "error": f"upstream {resp.status_code}"}
        data = resp.json()
    except requests.exceptions.RequestException as e:
        return {"success": False, "error": str(e)}
    except json.JSONDecodeError:
        return {"success": False, "error": "invalid_json"}

    # Expect 'objects.company.tech' when available
    tech = []
    try:
        tech = data.get("objects", {}).get("company", {}).get("tech", []) or []
    except AttributeError:
        tech = []

    return {
        "success": bool(data.get("success")),
        "tech": list(dict.fromkeys(tech)),  # de-duplicate while preserving order
        "meta": {
            "categories": data.get("domain", {}).get("categories"),
            "logo_url": data.get("domain", {}).get("logo_url"),
        },
        "raw": data,
    }

def demo():
    target = "https://example.com"
    result = get_tech_stack(target)
    if not result["success"]:
        print("Lookup failed:", result.get("error"))
        return

    print("Detected technologies for", target)
    for t in result["tech"]:
        print("-", t)

    # Optional: use categories if you also retrieved them from a separate categorize call
    cats = result["meta"]["categories"]
    if cats:
        print("\nIAB categories:")
        for c in cats:
            print("-", c.get("name"), "(conf:", c.get("confidence"), ")")

if __name__ == "__main__":
    demo()

Tip: Persist results keyed by registrable domain (e.g., example.com) so you can reuse them across subdomains and paths unless you need page-level variance. See caching guidance below.

How to use the returned tech identifiers

Each identifier in objects.company.tech is a stable, machine-friendly string you can map into your own taxonomy. Common actions include:

  • Lead routing: If tech includes salesforce or stripe, assign to enterprise or payments-focused reps.
  • Brand safety: If tech includes particular ad networks, decide whether to allow or review domains before running campaigns.
  • Analytics QA: Enforce that only approved analytics tools are present on owned properties.
  • Procurement: Flag usage of specific vendors (e.g., identity, CRM, HR) for security reviews.

Here’s a sample mapping approach using identifiers from the sample response:

Identifier Group Example action
omniture_adobe_analytics Analytics Mark domain as analytics-enabled for tracking audits
apache_tomcat Web/App server Tag backend stack for compatibility checks
salesforce CRM Route to CRM partner team
stripe Payments Segment as e-commerce capable
talend ETL/Integration Identify data engineering maturity
atlassian_jira Project management Mark as Atlassian-shop for ecosystem offers
webmethods Integration/ESB Flag for legacy integration modernization

Operational guidance: scale, performance, and reliability

Batching and concurrency

  • Client-side batching: Maintain a queue of domains and process them with a small worker pool (e.g., 5–10 concurrent requests) to control API latency and your own outbound sockets.
  • Backpressure: If you see elevated response times, dynamically reduce concurrency to stay within comfortable throughput.

Caching strategy

  • Cache key: Normalize to the registrable domain (e.g., example.com) using a public suffix list to avoid duplicating lookups across subdomains.
  • TTL: Choose a TTL aligned with your use case. For sales enrichment, 7–30 days is typical; for brand safety or ad network audits, consider shorter TTLs if you need fresher data.
  • Warm caches: Preload tech stacks for your top customer and prospect domains nightly to reduce daytime latency.

Error handling and retries

  • Transport errors: Retry with exponential backoff for network timeouts or 5xx responses.
  • Non-billable failures: Failed or unreachable calls are not billed, but still implement safeguards to avoid tight retry loops.
  • Partial responses: Guard your code when objects or company keys are missing; default to empty arrays for tech.

Unknown or new domains

  • If a domain is new or minimally instrumented, tech detection may return an empty array. Store a short TTL (e.g., 24 hours) and recheck.
  • Complement with categorization: If you still need to route or filter, use the main categorization endpoint (https://www.klazify.com/api/categorize) to obtain IAB categories and logo for interim decisions.

Latency and timeouts

  • Application timeout: Set a request timeout (e.g., 10–20 seconds) and fall back to cached or default behavior in user-facing flows.
  • Asynchronous pipelines: For bulk enrichment, decouple ingestion and API calls via a worker queue so UI paths are never blocked.

Mapping to your own taxonomy

Klazify returns atomic tech identifiers (e.g., omniture_adobe_analytics, stripe). To integrate them into your systems:

  • Define groups: Create high-level buckets such as Analytics, CMS, CDN, Framework, Ad Network, Identity, CRM, ERP, HR, Payments.
  • Build a dictionary: Map each identifier to one of your groups and optionally to product records in your data warehouse.
  • Version your mappings: Keep a versioned CSV or table so you can update mappings without redeploying code.
  • Multi-mapping: Some products span categories (e.g., analytics + tag manager). Support multiple labels if needed.

Because Klazify also provides IAB categories via categorization results, you can combine technology groups with content categories for richer routing. For example, prioritize outreach to sites with Analytics = Adobe and IAB verticals relevant to your solution.

Integrate into data pipelines

  • ETL enrichment: Add a domain_tech step in your ingestion job. Persist tech arrays as string arrays and also as exploded rows for analytics.
  • CRM sync: On lead creation, look up the domain once and write normalized tech tags to account fields. Cache results to avoid re-calling for the same account repeatedly.
  • Ad ops audits: Periodically re-scan publisher lists to detect changes to ad networks or analytics providers and trigger review workflows.
  • Security inventory: Monitor identity, HR, and payment providers discovered on corporate properties for compliance and vendor risk management.

Governance, access, and observability

  • Key management: Store your API key in a secrets manager, not in source control.
  • Metrics: Track request counts, latency, success rate, and cache hit ratio. Alert on spikes in failures.
  • Sampling: For very large lists, sample a percentage of domains daily and rotate to keep data fresh without reprocessing everything at once.

Complementary fields you can leverage

While your primary need is tech detection, the same platform returns other domain and company details that are often useful in the same workflow:

  • domain.categories: IAB-aligned categories you can use for filtering or audience segmentation.
  • domain.logo_url: Company logo URL to improve UI presentation in dashboards.
  • domain_registration_data: Helpful for heuristics (e.g., deprioritize extremely new domains in enrichment backlogs).
  • similar_domains: Use to expand prospecting or cluster analysis tasks in analytics.

You can explore all available fields and objects in the MCP and the full Documentation. If you haven’t already, get started on Klazify today.

Troubleshooting tips

  • Empty tech array: Verify the site loads publicly without authentication and retry later. Some technologies only appear on specific paths; try the root domain.
  • Unexpected 4xx: Double-check Authorization header and JSON body format. Ensure Content-Type is application/json.
  • Long response times: Reduce concurrency or add caching. Consider splitting your list and processing during off-peak hours.
  • Parsing errors: Always guard nested keys and default to empty lists so downstream tasks don’t fail.

FAQ

  • Can I process many domains at once?

    Yes. Queue your domains and run a small pool of concurrent workers that POST to the endpoint. Cache per domain to avoid duplicate lookups.

  • What if a site changes its tech stack?

    Set a TTL on cached results. For mission-critical audits (e.g., ad networks), use a shorter TTL and schedule re-checks.

  • How do I map identifiers to my internal categories?

    Create a lookup table that assigns each identifier (e.g., stripe, salesforce) to your taxonomy groups (e.g., Payments, CRM). Keep the table versioned so you can update it without code changes.

  • Are failures billed?

    Failed or unreachable calls are not billed.

  • How do I start and what does it cost?

    There’s a Starter plan at $39.99/month with a 7-day trial. Create a free account and get your API key to begin.

Ready to detect technology stacks in your pipeline? Create your free account, get an API key, and ship your Python integration in minutes: Register.

Ready to use Klazify?

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

Get Started Free