Metadata-Version: 2.4
Name: resilientlink
Version: 1.0.0
Summary: Official Python SDK for the ResilientLink Web Scraping API
Home-page: https://github.com/silentgodenterprise/resilientlink-pip
Author: Silent God Enterprise
Author-email: resilientlink@silentgode.com
Keywords: resilientlink scraper web-scraping api sdk
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.7
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-python
Dynamic: summary

# ResilientLink Python SDK

Official Python client for the [ResilientLink](https://resilientlink.silentgode.com) Web Scraping API.

## Installation

```bash
pip install resilientlink
```

## Quick Start

```python
from resilientlink import ResilientLink

client = ResilientLink(api_key="YOUR_API_KEY")

result = client.scrape("https://example.com")
print(result["data"]["title"])        # "Example Domain"
print(result["data"]["description"])  # meta description
print(result["data"]["image"])        # OG image URL
```

## Options

```python
result = client.scrape(
    "https://example.com",
    return_html=True,             # include raw HTML
    screenshot=True,              # base64 PNG (paid plans)
    pdf=True,                     # base64 PDF (paid plans)
    bypass_cache=True,            # force fresh scrape
    wait_for_selector="#app",     # wait for CSS selector
    wait_ms=2000,                 # wait 2s before scraping
    custom_headers={"Accept-Language": "en-US"},
    timeout=30,                   # seconds
)
```

## Response

```python
{
    "success": True,
    "cached": False,
    "tier": "tier",
    "responseTime": 412,
    "data": {
        "url": "...", "title": "...", "description": "...",
        "image": "...", "domain": "...",
        "og": {"title": "...", "description": "...", "image": "..."},
        "content": {"wordCount": 423, "readTimeMinutes": 2, ...},
        "seo": {"keywords": "...", "robots": "...", ...},
        "scrapedAt": "2026-..."
    }
}
```

## Error Handling

```python
from resilientlink import ResilientLink, ResilientLinkError

client = ResilientLink(api_key="YOUR_API_KEY")

try:
    result = client.scrape("https://example.com")
except ResilientLinkError as e:
    print(e)             # human-readable message
    print(e.status_code) # 429 = rate limit, 401 = bad key, 451 = blocked
```

## Get Your API Key

Sign up at [resilientlink](https://resilientlink.silentgode.com) → Dashboard → API Key.
