# Site Contact, Social, Tech Stack & AI Markdown Extractor (`dappled_saucepan/site-intel-markdown-extractor`) Actor

Crawls public websites respectfully (robots.txt aware) and extracts emails, phones, WhatsApp/Telegram links, social profiles, JSON-LD, tech stack fingerprints, and clean LLM-ready Markdown.

- **URL**: https://apify.com/dappled_saucepan/site-intel-markdown-extractor.md
- **Developed by:** [ZY](https://apify.com/dappled_saucepan) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 domain extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Website Contact, Tech Stack & AI RAG Markdown Extractor

A lightweight, **zero headless browser** **website scraper**, **B2B contact finder**, and **lead enrichment** Apify Actor. Acts as a fast, deterministic **BuiltWith alternative** and **AI RAG Markdown** converter—crawling public sites respectfully (`robots.txt`-compliant, SSRF-safe, zero anti-bot evasion) in pure HTTP/Python.

### Key Capabilities

- **B2B Contact Finder & Lead Enrichment:** Deduplicated emails (filtering asset filenames and placeholder domains) plus normalized phone numbers (`tel:`, international `+60`/E.164, local formats).
- **Messaging & Social Profiles:** WhatsApp (`wa.me`, `api.whatsapp.com`), Telegram (`t.me`), Line, LinkedIn, X/Twitter, Instagram, Facebook, TikTok, YouTube, and GitHub.
- **Tech Stack Detection (BuiltWith Alternative):** Detects Shopify, WooCommerce, WordPress, Webflow, Wix, Next.js, Astro, Stripe, Google Tag Manager, Google Analytics, Meta Pixel, and Cloudflare without launching Chromium.
- **Structured Metadata:** `application/ld+json` Schema.org blocks, `<title>`, meta description, and `<html lang>`.
- **Clean AI RAG Markdown:** Strips `<script>`, `<style>`, `<nav>`, `<footer>`, and `<aside>` while preserving `#`/`##`/`###` headings, lists, and links for LLM/RAG ingestion.

### Pricing & Value

Transparent **Pay-Per-Event (PPE)** pricing with **zero headless browser** compute overhead:

- **`$0.005` per Actor run start**
- **`$0.003` per domain extracted**

### Sample Output JSON

```json
{
  "domain": "mycalc-hub.pages.dev",
  "url": "https://mycalc-hub.pages.dev",
  "title": "MyCalc Hub — Free Financial & Lifestyle Calculators",
  "description": "Fast, privacy-first calculators for tax, loan, and savings planning.",
  "language": "en",
  "pagesCrawled": 5,
  "emails": ["hello@mycalc-hub.pages.dev"],
  "phones": [],
  "socials": {
    "github": ["https://github.com/mycalc-hub"]
  },
  "messaging": {},
  "techStack": ["Cloudflare"],
  "jsonLd": [
    {
      "@context": "https://schema.org",
      "@type": "WebSite",
      "name": "MyCalc Hub"
    }
  ],
  "pages": [
    {
      "url": "https://mycalc-hub.pages.dev",
      "title": "MyCalc Hub — Free Financial & Lifestyle Calculators",
      "emails": ["hello@mycalc-hub.pages.dev"],
      "phones": [],
      "markdown": "# MyCalc Hub\n\nFast, privacy-first calculators..."
    }
  ],
  "errors": []
}
```

### API & n8n Automation Integration

#### `curl` Sync Run

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~site-intel-markdown-extractor/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [{ "url": "https://mycalc-hub.pages.dev" }],
    "maxPagesPerDomain": 5,
    "includeMarkdown": true
  }'
```

#### n8n HTTP Request Node

- **Method:** `POST`
- **URL:** `https://api.apify.com/v2/acts/YOUR_USERNAME~site-intel-markdown-extractor/run-sync-get-dataset-items`
- **Authentication:** Query Auth (`token` = `YOUR_APIFY_TOKEN`)
- **Send Body (JSON):**

```json
{
  "startUrls": [{ "url": "{{ $json.websiteUrl }}" }],
  "maxPagesPerDomain": 5,
  "includeMarkdown": true,
  "respectRobotsTxt": true
}
```

### Local Testing

```bash
python3 -m unittest discover -s tests -v
```

Run locally with a sample `input.json`:

```bash
echo '{"startUrls": [{"url": "https://mycalc-hub.pages.dev"}], "maxPagesPerDomain": 3}' > input.json
python3 -m src.main
```

# Actor input Schema

## `startUrls` (type: `array`):

List of public website URLs to inspect.

## `maxPagesPerDomain` (type: `integer`):

Maximum number of internal pages to crawl per domain (prioritizing contact, about, pricing, and legal pages).

## `includeMarkdown` (type: `boolean`):

Convert page body content into clean Markdown suitable for LLM/RAG ingestion.

## `respectRobotsTxt` (type: `boolean`):

Enforce site robots.txt crawl directives.

## `requestTimeoutSecs` (type: `integer`):

HTTP timeout per page request.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://mycalc-hub.pages.dev"
    }
  ],
  "maxPagesPerDomain": 5,
  "includeMarkdown": true,
  "respectRobotsTxt": true,
  "requestTimeoutSecs": 15
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://mycalc-hub.pages.dev"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dappled_saucepan/site-intel-markdown-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "startUrls": [{ "url": "https://mycalc-hub.pages.dev" }] }

# Run the Actor and wait for it to finish
run = client.actor("dappled_saucepan/site-intel-markdown-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://mycalc-hub.pages.dev"
    }
  ]
}' |
apify call dappled_saucepan/site-intel-markdown-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dappled_saucepan/site-intel-markdown-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rOhFZZzbb2hx74dGY/builds/5g7MQVJ3P9xYrCxJX/openapi.json
