Metadata-Version: 2.5
Name: webmetadata-extractor
Version: 0.1.0
Summary: Python client for the Web Metadata, OpenGraph & Contact Extractor API (SEO audit, contacts, tech stack, security headers, AI-ready Markdown from any URL)
Project-URL: Homepage, https://github.com/JosejuX/rapidapi-metadata-extractor
Project-URL: Documentation, https://github.com/JosejuX/rapidapi-metadata-extractor#readme
Project-URL: RapidAPI Listing, https://rapidapi.com/josejuanjocoding/api/web-metadata-and-contact-extractor
Project-URL: Live Demo, https://rapidapi-metadata-extractor.onrender.com
Project-URL: Issues, https://github.com/JosejuX/rapidapi-metadata-extractor/issues
Author-email: Juanjo <josejuanjo.coding@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: contact-extractor,llm,metadata-extractor,opengraph,rag,rapidapi,seo-audit,web-scraping
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: requests>=2.28
Provides-Extra: async
Requires-Dist: httpx>=0.24; extra == 'async'
Provides-Extra: dev
Requires-Dist: httpx>=0.24; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: responses>=0.23; extra == 'dev'
Description-Content-Type: text/markdown

# webmetadata-extractor

Python client for the [Web Metadata, OpenGraph & Contact Extractor API](https://rapidapi.com/josejuanjocoding/api/web-metadata-and-contact-extractor) — turn any URL into structured web intelligence in a single fast call: SEO/OpenGraph metadata, public contact details, social profiles, tech-stack fingerprinting, Schema.org product data, a 14-point SEO audit, a graded security-headers audit, and AI/LLM-ready Markdown.

```bash
pip install webmetadata-extractor

# for the async client:
pip install "webmetadata-extractor[async]"
```

## Quick start

Get a free API key on [RapidAPI](https://rapidapi.com/josejuanjocoding/api/web-metadata-and-contact-extractor) (1,000 requests/month, no credit card required).

```python
from webmetadata_extractor import WebMetadataClient

client = WebMetadataClient(api_key="YOUR_RAPIDAPI_KEY")

data = client.extract("https://github.com")
print(data["title"], data["og_image"])

contacts = client.contacts("https://example.com")
print(contacts["emails"], contacts["social_links"])

audit = client.seo_audit("https://example.com")
print(audit["seo_score_percentage"], audit["warnings"])
```

### Async

```python
import asyncio
from webmetadata_extractor import AsyncWebMetadataClient

async def main():
    async with AsyncWebMetadataClient(api_key="YOUR_RAPIDAPI_KEY") as client:
        data = await client.extract("https://github.com")
        print(data["title"])

asyncio.run(main())
```

### Self-hosting

The [backend is open source](https://github.com/JosejuX/rapidapi-metadata-extractor) (MIT) and can be self-hosted. Point the client at your own deployment and skip the RapidAPI key:

```python
client = WebMetadataClient(api_key=None, base_url="http://localhost:8000")
```

## Methods

| Method | Endpoint | Returns |
|---|---|---|
| `extract(url, fields=None)` | `GET /api/v1/extract` | Full payload — everything below in one call, or a subset via `fields=` |
| `link_preview(url)` | `GET /api/v1/link-preview` | Title, description, OG image, favicon, site name |
| `contacts(url)` | `GET /api/v1/contacts` | Public emails, phone numbers, social profile links |
| `tech_stack(url)` | `GET /api/v1/tech-stack` | Framework/CMS detection, 40+ signatures, confidence scores |
| `schema(url)` | `GET /api/v1/schema` | Schema.org JSON-LD: products, articles, events, organizations |
| `security(url, include_tls_details=False)` | `GET /api/v1/security` | Graded security-headers audit + optional live TLS inspection |
| `markdown(url)` | `GET /api/v1/markdown` | Clean, AI/LLM-ready Markdown of the page content |
| `seo_audit(url)` | `GET /api/v1/seo-audit` | 14-point SEO score, warnings, readability metrics |
| `links(url)` | `GET /api/v1/links` | Internal vs. external hyperlinks (up to 100) |
| `batch(urls)` | `POST /api/v1/batch` | Link-preview extraction over up to 10 URLs at once |
| `domain(url)` | `GET /api/v1/domain` | DNS + WHOIS intelligence, no page fetch |

Every method raises `WebMetadataAPIError` (with `.status_code` and `.body`) on a non-2xx response.

## Links

- [Live interactive demo](https://rapidapi-metadata-extractor.onrender.com) — paste a URL, no signup
- [Full API documentation](https://github.com/JosejuX/rapidapi-metadata-extractor)
- [RapidAPI listing](https://rapidapi.com/josejuanjocoding/api/web-metadata-and-contact-extractor)

## License

MIT
