# Domain-Scoped Site Crawler for Markdown Datasets (`vexaloom-labs/domain-scoped-site-crawler-for-markdown-datasets`) Actor

Crawl a website from one or more start URLs, staying on the same domain, and get back clean Markdown, text, or HTML per page with title, description, and crawl depth. Built for feeding LLM, RAG, or knowledge-base pipelines.

- **URL**: https://apify.com/vexaloom-labs/domain-scoped-site-crawler-for-markdown-datasets.md
- **Developed by:** [vexaloom-labs](https://apify.com/vexaloom-labs) (community)
- **Categories:** AI, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Domain-Scoped Site Crawler for Markdown Datasets

Give it one or more start URLs and it crawls the site the way a documentation index should be crawled: it follows same-domain links, isolates the main content of every page, and returns clean **Markdown**, **text**, or **HTML** alongside per-page metadata — title, description, author, publish dates, canonical URL, links, and image URLs. Built for LLM training sets, RAG pipelines, knowledge bases, and content migrations.

### What this actor does

- **Fetches pages with the right engine automatically.** Every page starts with fast raw HTTP; hosts that reject plain clients get a browser TLS fingerprint (`curl_cffi`), and pages that render only with JavaScript are loaded in a headless browser — no engine choice needed.
- **Finds more pages.** Follows links up to your depth limit, and can also enqueue URLs from `sitemap.xml` / robots.txt sitemaps and from `/llms.txt`.
- **Respects robots.txt** by default: discovered URLs that the site disallows are skipped (start URLs are always crawled).
- **Extracts the meaningful content.** An extraction cascade (Trafilatura → Readability → basic cleanup) removes navigation, footers, sidebars, ads, and cookie dialogs, while preserving headings, tables, lists, code blocks, and links.
- **Prepares content for RAG.** Every record carries an approximate token count, and you can switch on heading-aware `chunks` (code blocks and tables never split, context-preserving overlap) that drop straight into an embedding pipeline.
- **Returns rich metadata per page**: canonical URL, author, published/modified dates, keywords, OpenGraph, JSON-LD, image URLs, page links, word count, and a content hash.
- **Handles PDFs**: when a crawled URL serves a PDF, its text is extracted into the record as a file row — never raw binary.
- **Stores Markdown and plain-text files**: pages served as `text/markdown` or plain text (for example the `.md`/`.txt` files listed in an `llms.txt`) are stored with their content in `text` and `markdown`, and their links are followed when depth allows.
- **Skips non-pages cleanly**: RSS/XML feeds, JSON, images, archives and other binary responses are skipped with a reason (see `storeSkippedUrls`).
- **Supports incremental re-crawls**: `crawlOnlyPagesChangedSince` produces a delta of changed pages using HTTP validators, sitemap `lastmod`, and content hashes.
- **Cuts crawl waste**: canonical duplicates are skipped, pages are pushed as they finish, retries and waits are bounded per URL, and an adaptive per-domain pacer slows down (bounded) only when a host actually throttles.
- **Handles late and lazy content**: a bounded wait after load lets client-rendered pages finish, and pages that declare lazy images or infinite scroll are scrolled automatically (bounded) so that content is captured.
- **Optional screenshots**: every stored page can be rendered in the browser and captured as a full-page JPEG with a public URL.
- **Optional request headers**: send extra headers (e.g. a token for a public API or a specific User-Agent) on every request; cookie and transport headers are refused, so the actor stays cookieless.
- **Works cookieless** for any public website — no logins, no API keys.

### Output per page

Every record is pushed with empty values omitted (no `null`, no empty strings). A page record contains:

| Field | Description |
|---|---|
| `url` | URL that was requested |
| `loadedUrl` | Final URL after redirects |
| `title` | OpenGraph title, JSON-LD headline, or `<title>` |
| `description` | Meta description / OpenGraph description |
| `languageCode` | Language from `lang`, OpenGraph locale, or hreflang |
| `author` | JSON-LD author, meta author, citation author, or byline |
| `publishedDate` | Normalized ISO date: JSON-LD `datePublished`, `article:published_time`, `citation_date`, or `<time datetime>` |
| `modifiedDate` | Normalized ISO date: JSON-LD `dateModified`, `article:modified_time`, or `last-modified` |
| `canonicalUrl` | `<link rel="canonical">`, `og:url`, or JSON-LD URL |
| `keywords` | Meta keywords or JSON-LD keywords, as an array |
| `imageUrls` | Every image URL found (OpenGraph, Twitter, `<img>`), absolute and unique |
| `links` | Every link found on the page, absolute and unique |
| `openGraph` | Raw `og:*` and `twitter:*` meta tags as an object |
| `jsonLd` | Parsed `application/ld+json` blocks (including `@graph`) |
| `text` | Clean plain text of the page content |
| `markdown` | Content as Markdown (only when `outputFormat` is `markdown`) |
| `html` | Cleaned content HTML (only when `outputFormat` is `html`) |
| `wordCount` | Word count of `text` |
| `tokenCount` | Approximate LLM tokens in the returned content (characters ÷ 4) |
| `chunks` | Heading-aware Markdown pieces for embeddings (only with `chunkMarkdown`); each has `index`, `text`, `charCount`, and `headingPath` when the piece sits under headings |
| `screenshot` | Public URL of the page's full-page JPEG (only with `takeScreenshots`) |
| `contentHash` | SHA-256 of the normalized text — use it to detect unchanged pages |
| `depth` | Crawl depth (`0` = start URL) |
| `httpStatusCode` | HTTP status of the response |
| `loadedTime` | ISO 8601 UTC timestamp when the page was fetched |
| `referrerUrl` | URL of the page that linked here (start URLs have none) |
| `recordType` | `page` for HTML pages, `file` for extracted documents |
| `fileType` | `pdf` on file records |
| `pageCount` | Number of pages, on PDF records |

#### Example output row (truncated)

```json
{
    "url": "https://example.com/blog/release-notes",
    "loadedUrl": "https://example.com/blog/release-notes",
    "title": "Release notes — Example",
    "description": "What changed in the latest release.",
    "author": "Jane Developer",
    "publishedDate": "2026-09-12T00:00:00Z",
    "canonicalUrl": "https://example.com/blog/release-notes",
    "languageCode": "en",
    "imageUrls": ["https://example.com/media/hero.png"],
    "links": ["https://example.com/blog", "https://example.com/download"],
    "text": "What changed in the latest release...",
    "markdown": "## What changed\n\n- Faster startup\n",
    "depth": 1,
    "httpStatusCode": 200,
    "loadedTime": "2026-10-16T12:00:05.123Z",
    "referrerUrl": "https://example.com/blog",
    "wordCount": 412,
    "contentHash": "8f2c1d…",
    "recordType": "page"
}
```

PDF record example:

```json
{
    "url": "https://example.com/whitepaper.pdf",
    "loadededUrl": "https://example.com/whitepaper.pdf",
    "title": "Whitepaper 2026",
    "text": "Executive summary ...",
    "fileType": "pdf",
    "recordType": "file",
    "wordCount": 5321
}
```

### Input

Picking a fetch engine, parallelism, timeouts, retries, rate limits, and proxies are auto-decided per page and per domain — no tuning needed.

| Field | Type | Default | Description |
|---|---|---|---|
| `startUrls` | array | – | Pages where the crawl begins. Required. Accepts URL objects or plain URL strings. |
| `maxCrawlDepth` | integer | `10` | How many links deep to follow (`0` = start URLs only). |
| `maxCrawlPages` | integer | `20` | Total pages and files to store; the crawl stops at this limit. |
| `useSitemaps` | boolean | `false` | Enqueue URLs from robots.txt sitemaps and `/sitemap.xml` (sitemap indexes are followed). |
| `useLlmsTxt` | boolean | `false` | Enqueue the files linked from `/llms.txt`. |
| `respectRobotsTxtFile` | boolean | `true` | Skip discovered URLs disallowed by robots.txt. Start URLs are always crawled. |
| `crawlOnlyPagesChangedSince` | string | – | Date (`YYYY-MM-DD` or full ISO) for incremental crawls; pages unchanged since then are not stored and the output is a delta. |
| `includeUrlGlobs` | array | `[]` | Only crawl discovered URLs matching these glob patterns. |
| `excludeUrlGlobs` | array | `[]` | Skip discovered URLs matching these glob patterns. |
| `includeUrlRegexps` | array | `[]` | Only crawl discovered URLs matching at least one regex. |
| `excludeUrlRegexps` | array | `[]` | Skip discovered URLs matching any regex. |
| `keepUrlFragments` | boolean | `false` | Treat `#fragment` variants as separate pages (useful for fragment-routed SPAs). |
| `ignoreCanonicalUrl` | boolean | `false` | When off, a page whose canonical URL was already crawled is skipped as a duplicate. |
| `outputFormat` | string | `markdown` | `markdown`, `text`, or `html`. |
| `htmlTransformer` | string | `auto` | `auto` picks Trafilatura or Readability per page; `trafilatura`, `readability`, `basic`, and `none` force a strategy. |
| `includeImages` | boolean | `false` | Add image references to Markdown (`imageUrls` is filled regardless). |
| `keepElementsCssSelector` | string | – | Keep only matching elements before extraction (e.g. `article, main`). |
| `removeElementsCssSelector` | string | – | Remove matching elements before extraction (e.g. `.sidebar, .ad`). |
| `parsePdfText` | boolean | `true` | Extract text from linked PDFs into file records instead of skipping them. |
| `chunkMarkdown` | boolean | `false` | Emit a `chunks` array per page for RAG/embeddings. |
| `chunkMaxChars` | integer | `2000` | Target chunk size in characters (200–10000); code blocks and tables stay whole. |
| `chunkOverlapChars` | integer | `200` | Overlap between consecutive chunks (0–1000). |
| `takeScreenshots` | boolean | `false` | Render every stored page in the browser, store a full-page JPEG, and return its URL in `screenshot`. |
| `customHttpHeaders` | array | `[]` | Extra request headers as `{"key", "value"}` pairs, applied to every engine. Cookie/transport headers are refused. |
| `clickElementsCssSelector` | string | – | Click these elements first (e.g. `[aria-expanded="false"]`) to expand collapsed content. |
| `storeSkippedUrls` | boolean | `false` | Save a `SKIPPED_URLS` key-value record with skipped URLs grouped by reason. |

#### Examples

Crawl a documentation site to Markdown with metadata:

```json
{
    "startUrls": [{ "url": "https://docs.example.com" }],
    "maxCrawlPages": 500,
    "maxCrawlDepth": 5,
    "outputFormat": "markdown"
}
```

Only one section of a site, using glob and regex filters:

```json
{
    "startUrls": [{ "url": "https://example.com" }],
    "includeUrlGlobs": ["https://example.com/docs/*"],
    "excludeUrlRegexps": ["/v[0-9]+/", "/changelog/"]
}
```

Weekly incremental re-crawl (delta of changed pages):

```json
{
    "startUrls": [{ "url": "https://example.com/blog" }],
    "useSitemaps": true,
    "crawlOnlyPagesChangedSince": "2026-10-01"
}
```

Find pages through the sitemap only, without following links:

```json
{
    "startUrls": [{ "url": "https://example.com" }],
    "useSitemaps": true,
    "maxCrawlDepth": 0,
    "maxCrawlPages": 2000
}
```

Crawl a documentation site straight into embedding-ready chunks:

```json
{
    "startUrls": [{ "url": "https://docs.example.com" }],
    "maxCrawlPages": 500,
    "chunkMarkdown": true,
    "chunkMaxChars": 1500,
    "chunkOverlapChars": 200
}
```

### Use cases

- **LLM training and fine-tuning data** — turn documentation, blogs, and help centers into structured Markdown with source metadata
- **RAG pipelines and semantic search** — per-page content with optional heading-aware `chunks` and `tokenCount`, plus canonical URLs, dates, and hashes for clean indexing and re-indexing
- **Knowledge-base and chatbot grounding** — keep a site's content current with scheduled incremental crawls
- **Content migration and archival** — export a whole site to Markdown while keeping authorship and publication dates
- **Competitive and market research** — compare content across sites with consistent fields per page

### FAQ

**Do I need to choose a crawler engine?**
No. The actor starts every page with fast raw HTTP, retries blocked hosts with a browser TLS fingerprint (`curl_cffi`), and loads pages that render only with JavaScript in a headless browser. Parallelism, timeouts, retries, and pacing are also chosen automatically per page and per domain, so the input surface only contains options that change which data you get.

**How does the extraction cascade pick content?**
With `htmlTransformer` set to `auto`, the actor runs Trafilatura and Readability on each page, keeps the candidate that preserves the most structure (headings, tables, lists, images), and falls back to full basic-cleaned content when both would drop most of the page. Use `none` to keep the page almost untouched.

**Does it respect robots.txt?**
Yes, `respectRobotsTxtFile` is on by default: discovered URLs that robots.txt disallows are skipped and listed under the `robots` skip reason. Start URLs are always crawled. Crawl-delay directives are not applied; the adaptive per-domain pacer keeps request rates polite automatically.

**How do sitemaps work?**
With `useSitemaps` enabled, the actor reads the `Sitemap:` entries from robots.txt and `/sitemap.xml`, follows sitemap indexes, and enqueues matching same-domain URLs at depth 1. Combined with `maxCrawlDepth: 0` this crawls exactly the sitemap's URL set.

**What happens with JavaScript-heavy sites?**
Pages whose raw HTML is an empty SPA shell are automatically rendered in a headless browser. After load the actor waits a bounded couple of seconds for late content, waits again briefly if the DOM still looks empty, and scrolls (bounded) only when the page declares lazy images or infinite scroll, so client-rendered and lazy content is captured. `clickElementsCssSelector` expands collapsed sections when you need it.

**What happens with PDFs, feeds, and other files?**
PDFs are converted to text and stored as `recordType: "file"` rows with `fileType: "pdf"`. Markdown and plain-text files (`text/markdown`, `text/plain`) are stored as pages with their raw content in `text`/`markdown` (JSON/XML payloads served as text are still skipped). RSS/XML feeds, JSON, and binary responses (images, archives) are not stored as pages; each skip is counted and visible in the run log, and in the `SKIPPED_URLS` record when `storeSkippedUrls` is enabled.

**How do incremental crawls work?**
Set `crawlOnlyPagesChangedSince` to a date. The actor keeps ETag/Last-Modified validators and content hashes in a persistent key-value store, filters sitemap entries by `lastmod`, and stores only pages that changed — the output is a delta, not a full snapshot. Keep previous results if you need the complete site.

**How does chunking work?**
With `chunkMarkdown` on, each page also gets a `chunks` array: heading-aware Markdown pieces up to `chunkMaxChars` characters (200–10000) with `chunkOverlapChars` (0–1000) of overlap so context survives the boundaries. Code fences and tables are never split, every piece knows its `headingPath` (`Guide > Install > Linux`) and `charCount`, and the pieces are in reading order. `tokenCount` on the page is an approximation (characters ÷ 4) — good for budgeting, not a tokenizer.

**Can I take screenshots?**
Yes, with `takeScreenshots`. Every stored page is rendered in the headless browser and gets a full-page JPEG (quality 80) in the run's key-value store; the record's `screenshot` field is its public URL. Expect roughly 0.3–1 MB and a fraction of a second per page; the bytes are held only until the page is pushed.

**Can I send custom headers?**
`customHttpHeaders` accepts a list of `{"key", "value"}` pairs and applies them to page requests and to robots.txt/sitemap/llms.txt lookups on every engine — useful for public APIs that want a token or sites that ask for a contact User-Agent. Cookie and transport/framing headers (`Cookie`, `Host`, `Content-Length`, `Connection`, ...) are refused on purpose: the actor never carries logins.

**What happens when a site throttles the crawl?**
The actor watches each domain: after connection timeouts or 429/503 responses it halves the parallel requests for that domain (down to 1) and adds a small delay (up to 2 seconds), then heals as pages succeed again. Throttled pages are requeued a bounded number of times, so a hostile host can't stall the run.

**Which fields are filled for every page?**
Content-derived fields (`url`, `loadedUrl`, `depth`, `httpStatusCode`, `loadedTime`, `recordType`, and one of `text`/`markdown`/`html`) are always present. Metadata fields (`author`, `publishedDate`, `keywords`, and so on) appear only when the page declares them, and empty values are never pushed.

**When do results appear in the dataset?**
Pages are pushed as soon as they finish, so you can watch results grow while the crawl is running. If a run is interrupted, everything already stored is kept.

**Are image and link URLs usable directly?**
`imageUrls` and `links` contain absolute `http(s)` URLs exactly as the page declares them. No rehosting is done.

**Can it crawl pages behind a login?**
No. The actor only works with publicly accessible pages and never requires credentials.

**What is out of scope?**
Login-protected content and AI summaries are intentionally not implemented — crawling behind a login needs credentials this actor refuses to require, and summaries need an external LLM key. Chunking and token counting are built in (`chunkMarkdown`, `tokenCount`); for anything more, the dataset stays atomic per page with a `contentHash` you can diff.

**Are the links in Markdown absolute?**
Yes. Relative links and images are resolved against the page URL before converting to Markdown.

**Is this affiliated with the websites it crawls?**
No. This is an independent, third-party actor that crawls publicly accessible pages; it isn't operated by or affiliated with any site it's pointed at. Check the target site's terms before scraping.

# Actor input Schema

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

One or more URLs to start crawling from. The crawler follows links found on these pages and stays on the domain of the first start URL.

## `maxCrawlDepth` (type: `integer`):

How many links deep to follow from the start URLs. 0 means only the start URLs are crawled.

## `maxCrawlPages` (type: `integer`):

Maximum number of pages (and files) to store. The crawl stops when this limit is reached.

## `useSitemaps` (type: `boolean`):

Look for sitemaps (from robots.txt and /sitemap.xml) and enqueue the URLs they list. Finds pages that are not linked from the start URLs.

## `useLlmsTxt` (type: `boolean`):

Look for /llms.txt at the start URL domains and enqueue the files listed there (common on documentation sites).

## `respectRobotsTxtFile` (type: `boolean`):

Skip discovered pages that the site's robots.txt disallows. Start URLs are always crawled.

## `crawlOnlyPagesChangedSince` (type: `string`):

Optional date (YYYY-MM-DD or full ISO date-time). Crawls only pages that may have changed since then and outputs a delta. Leave empty to crawl everything.

## `includeUrlGlobs` (type: `array`):

Only crawl discovered URLs matching these glob patterns (e.g. https://example.com/docs/\*). Leave empty to allow everything on the domain.

## `excludeUrlGlobs` (type: `array`):

Skip discovered URLs matching any of these glob patterns (e.g. *login*, \*.pdf).

## `includeUrlRegexps` (type: `array`):

Only crawl discovered URLs matching at least one of these regular expressions. Combined with glob patterns (both must pass when both are set).

## `excludeUrlRegexps` (type: `array`):

Skip discovered URLs matching any of these regular expressions.

## `keepUrlFragments` (type: `boolean`):

Treat URLs that differ only in #fragment as different pages. Enable for single-page sites that use fragments as routes.

## `ignoreCanonicalUrl` (type: `boolean`):

When disabled, pages whose canonical URL points to a page that was already crawled are skipped as duplicates.

## `outputFormat` (type: `string`):

How page content is returned. Markdown keeps headings, lists, tables, and links — best for LLMs and RAG.

## `htmlTransformer` (type: `string`):

How the main content is isolated from navigation, footers, ads, and cookie banners.

## `includeImages` (type: `boolean`):

Add image references to the markdown field. Image URLs are always collected in the imageUrls field.

## `chunkMarkdown` (type: `boolean`):

Emit a chunks array per page — heading-aware Markdown pieces ready for embeddings. Code blocks and tables are never split, each piece carries its heading path and character count, and consecutive pieces overlap so context is kept at the boundaries.

## `chunkMaxChars` (type: `integer`):

Target size of each chunk when chunkMarkdown is on. Code blocks and tables stay whole even when larger than this.

## `chunkOverlapChars` (type: `integer`):

Approximate overlap between consecutive chunks when chunkMarkdown is on, so context is not lost at chunk boundaries.

## `keepElementsCssSelector` (type: `string`):

Keep only the elements matching this CSS selector (e.g. article, main .content) before extraction. Leave empty to use the whole page.

## `removeElementsCssSelector` (type: `string`):

Remove elements matching this CSS selector (e.g. .sidebar, .ad, nav) before extraction.

## `parsePdfText` (type: `boolean`):

When a crawled URL serves a PDF, extract its text into the text field as a file record instead of skipping it.

## `clickElementsCssSelector` (type: `string`):

Click elements matching this CSS selector (e.g. \[aria-expanded="false"]) before extraction to expand collapsed content.

## `takeScreenshots` (type: `boolean`):

Render every stored page in the browser and capture a full-page JPEG (quality 80) of it, putting its public URL in the screenshot field. Screenshots are held in memory until pushed and add roughly 0.3-1 MB and a fraction of a second per page; screenshot capture always runs after the page is rendered.

## `customHttpHeaders` (type: `array`):

Extra request headers for all engines and discovery requests, as a list of {"key", "value"} pairs (e.g. an Authorization token or a specific User-Agent for sites that ask for one). Transport/framing and cookie headers (Host, Cookie, Content-Length, Connection, ...) are rejected so the actor stays cookieless.

## `storeSkippedUrls` (type: `boolean`):

Save a SKIPPED_URLS record to the key-value store listing skipped URLs grouped by reason (robots, blocked, non-HTML, errors, duplicates).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://docs.apify.com"
    }
  ],
  "maxCrawlDepth": 1,
  "maxCrawlPages": 3,
  "useSitemaps": false,
  "useLlmsTxt": false,
  "respectRobotsTxtFile": true,
  "crawlOnlyPagesChangedSince": "",
  "includeUrlGlobs": [],
  "excludeUrlGlobs": [],
  "includeUrlRegexps": [],
  "excludeUrlRegexps": [],
  "keepUrlFragments": false,
  "ignoreCanonicalUrl": false,
  "outputFormat": "markdown",
  "htmlTransformer": "auto",
  "includeImages": false,
  "chunkMarkdown": false,
  "chunkMaxChars": 2000,
  "chunkOverlapChars": 200,
  "keepElementsCssSelector": "",
  "removeElementsCssSelector": "",
  "parsePdfText": true,
  "clickElementsCssSelector": "",
  "takeScreenshots": false,
  "customHttpHeaders": [],
  "storeSkippedUrls": false
}
```

# Actor output Schema

## `pages` (type: `string`):

Dataset containing all crawled pages and extracted files.

# 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://docs.apify.com"
        }
    ],
    "maxCrawlDepth": 1,
    "maxCrawlPages": 3,
    "useSitemaps": false,
    "useLlmsTxt": false,
    "respectRobotsTxtFile": true,
    "crawlOnlyPagesChangedSince": "",
    "includeUrlGlobs": [],
    "excludeUrlGlobs": [],
    "includeUrlRegexps": [],
    "excludeUrlRegexps": [],
    "keepUrlFragments": false,
    "ignoreCanonicalUrl": false,
    "outputFormat": "markdown",
    "htmlTransformer": "auto",
    "includeImages": false,
    "chunkMarkdown": false,
    "chunkMaxChars": 2000,
    "chunkOverlapChars": 200,
    "keepElementsCssSelector": "",
    "removeElementsCssSelector": "",
    "parsePdfText": true,
    "clickElementsCssSelector": "",
    "takeScreenshots": false,
    "customHttpHeaders": [],
    "storeSkippedUrls": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("vexaloom-labs/domain-scoped-site-crawler-for-markdown-datasets").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://docs.apify.com" }],
    "maxCrawlDepth": 1,
    "maxCrawlPages": 3,
    "useSitemaps": False,
    "useLlmsTxt": False,
    "respectRobotsTxtFile": True,
    "crawlOnlyPagesChangedSince": "",
    "includeUrlGlobs": [],
    "excludeUrlGlobs": [],
    "includeUrlRegexps": [],
    "excludeUrlRegexps": [],
    "keepUrlFragments": False,
    "ignoreCanonicalUrl": False,
    "outputFormat": "markdown",
    "htmlTransformer": "auto",
    "includeImages": False,
    "chunkMarkdown": False,
    "chunkMaxChars": 2000,
    "chunkOverlapChars": 200,
    "keepElementsCssSelector": "",
    "removeElementsCssSelector": "",
    "parsePdfText": True,
    "clickElementsCssSelector": "",
    "takeScreenshots": False,
    "customHttpHeaders": [],
    "storeSkippedUrls": False,
}

# Run the Actor and wait for it to finish
run = client.actor("vexaloom-labs/domain-scoped-site-crawler-for-markdown-datasets").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://docs.apify.com"
    }
  ],
  "maxCrawlDepth": 1,
  "maxCrawlPages": 3,
  "useSitemaps": false,
  "useLlmsTxt": false,
  "respectRobotsTxtFile": true,
  "crawlOnlyPagesChangedSince": "",
  "includeUrlGlobs": [],
  "excludeUrlGlobs": [],
  "includeUrlRegexps": [],
  "excludeUrlRegexps": [],
  "keepUrlFragments": false,
  "ignoreCanonicalUrl": false,
  "outputFormat": "markdown",
  "htmlTransformer": "auto",
  "includeImages": false,
  "chunkMarkdown": false,
  "chunkMaxChars": 2000,
  "chunkOverlapChars": 200,
  "keepElementsCssSelector": "",
  "removeElementsCssSelector": "",
  "parsePdfText": true,
  "clickElementsCssSelector": "",
  "takeScreenshots": false,
  "customHttpHeaders": [],
  "storeSkippedUrls": false
}' |
apify call vexaloom-labs/domain-scoped-site-crawler-for-markdown-datasets --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/domain-scoped-site-crawler-for-markdown-datasets"
        }
    }
}
```

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/daEeIAgzVqlS9oXl8/builds/mlbNAEkzbrejmXih5/openapi.json
