Metadata-Version: 2.4
Name: techstackdetect
Version: 1.1.0
Summary: Detect the technology stack of any website — 5,000+ technologies, confidence scores
Home-page: https://rapidapi.com/TechStackDetect/api/techstackdetect1
Author: TechStackDetect
Keywords: tech stack detection api website technology fingerprinting
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-python
Dynamic: summary

# TechStackDetect Python SDK

Detect the technology stack of any website in one API call.

- **5,000+ technology signatures** across 48 categories
- **Confidence scores** (0.0–1.0) for each detection
- **Zero dependencies** — pure Python stdlib
- **Free tier** available on RapidAPI

## Installation

```bash
pip install techstackdetect
```

## Quick Start

```python
from techstackdetect import TechStackDetect

client = TechStackDetect(api_key="YOUR_RAPIDAPI_KEY")

result = client.detect("https://stripe.com")

for tech in result.technologies:
    print(f"{tech.name} ({tech.category}) — {tech.confidence:.0%}")
# AWS CloudFront (cdn) — 95%
# Fastly (cdn) — 95%
# HSTS (security) — 90%
# Varnish (cache) — 75%
```

Get your API key: [RapidAPI → TechStackDetect](https://rapidapi.com/TechStackDetect/api/techstackdetect1)

## Usage Examples

### Check if a site uses a specific technology

```python
result = client.detect("https://shopify.com")

if result.has("Shopify"):
    print("This site uses Shopify!")

if result.has("React"):
    print("React detected!")
```

### Filter by category

```python
result = client.detect("https://notion.so")

analytics = result.by_category("analytics")
hosting = result.by_category("hosting")
frontend = result.by_category("frontend")

print("Analytics tools:", [t.name for t in analytics])
print("Hosting:", [t.name for t in hosting])
```

### Batch processing for lead enrichment (native /batch endpoint)

```python
leads = [
    "https://woocommerce.com",
    "https://shopify.com",
    "https://ghost.org",
    # ... up to any number of URLs; automatically chunked into 50/request
]

results = client.detect_batch(leads)

for url, result in results:
    if isinstance(result, Exception):
        print(f"{url}: ERROR - {result}")
    else:
        cms = result.by_category("cms")
        ecom = result.by_category("ecommerce")
        print(f"{url}: CMS={[t.name for t in cms]}, ecommerce={[t.name for t in ecom]}")
```

### Browse all supported technologies

```python
# List all ecommerce platforms we can detect
ecom = client.technologies(category="ecommerce")
print(f"Ecommerce platforms: {len(ecom)}")
print([t['name'] for t in ecom[:10]])
# ['BigCommerce', 'Magento', 'OpenCart', 'PrestaShop', 'Shopify', ...]

# List all 5,225 technologies
all_techs = client.technologies()
print(f"Total: {len(all_techs)}")
```

### CRM enrichment workflow

```python
def enrich_lead(website_url):
    result = client.detect(website_url)
    return {
        "url": result.url,
        "cms": next((t.name for t in result.by_category("cms")), None),
        "ecommerce": next((t.name for t in result.by_category("ecommerce")), None),
        "frontend": [t.name for t in result.by_category("frontend")],
        "analytics": [t.name for t in result.by_category("analytics")],
        "hosting": [t.name for t in result.by_category("hosting")],
        "tech_count": len(result.technologies),
    }

print(enrich_lead("https://stripe.com"))
```

## API Reference

### `TechStackDetect(api_key, timeout=30)`

Create a client instance.

### `client.detect(url, force_refresh=False) → DetectionResult`

Detect technologies for a single URL.

### `client.detect_batch(urls, force_refresh=False, chunk_size=50) → list`

Detect technologies for multiple URLs using the native `/batch` endpoint (parallel server-side processing).
Automatically chunks large lists into batches of up to 50 URLs.
Returns list of `(url, DetectionResult | Exception)` tuples.

### `client.technologies(category=None) → list`

List all 5,000+ supported technologies, optionally filtered by category.
Available categories: `frontend`, `cms`, `ecommerce`, `analytics`, `cdn`, `hosting`,
`backend`, `server`, `security`, `marketing`, `support`, `payment`, `ui`, `monitoring`, etc.

Detect technologies for multiple URLs with optional rate limiting.

### `DetectionResult`

| Attribute | Type | Description |
|-----------|------|-------------|
| `url` | str | The analyzed URL |
| `technologies` | List[Technology] | Detected technologies, sorted by confidence |
| `cached` | bool | Whether result came from cache |

Methods: `.has(name)`, `.by_category(cat)`, `.names()`, `.top(n)`

### `Technology`

| Attribute | Type | Description |
|-----------|------|-------------|
| `name` | str | Technology name |
| `category` | str | Category (e.g. "frontend", "cms", "hosting") |
| `confidence` | float | Detection confidence 0.0–1.0 |
| `version` | str\|None | Version number if detected |

## Categories

`frontend` · `backend` · `cms` · `ecommerce` · `hosting` · `cdn` · `analytics` · `monitoring` · `marketing` · `security` · `database` · `cache` · `authentication` · `seo` · `server` · `javascript-frameworks` · `wordpress-plugins` · and 30+ more

## License

MIT — free to use in any project.
