CrawlForge MCP
Crawling2 credits

map_site

Enumerate a site's pages the cheap way first: if the origin serves a sitemap.xml it is read directly, and only when there isn't a usable one does the tool fall back to crawling. The response tells you which path it took.

Use Cases

Get a URL list before scraping

Enumerate first, then feed the list to batch_scrape — far cheaper than crawling with extraction turned on.

Check what a site publishes to search engines

Sitemap mode reports exactly what the site advertises, which is often not the same as what is reachable by following links.

Find orphaned or unlinked pages

Compare the sitemap list against a crawl_deep run: pages in the sitemap that the crawl never reached are unlinked.

Size a site before committing credits

total_pages tells you how large a job would be before you start paying per-page for extraction.

Endpoint

POST/api/v1/tools/map_site
Auth Required
1 req/s on Free plan
2 credits

Parameters

max_depth and include_external apply only to the crawl fallback. When a usable sitemap.xml is found they are ignored, because no crawling happens.
NameTypeRequiredDefaultDescription
url
stringRequired-
Any URL on the site. Its origin is used to look for `/sitemap.xml`, and it is the starting point if the crawl fallback runs.
Example: https://example.com
max_depth
numberOptional2
Crawl depth for the fallback, 1-5. Ignored when a sitemap is found.
Example: 2
include_external
booleanOptionalfalse
Include external links in the per-page link lists. Crawl mode only — external pages are counted but never visited.
Example: false
timeout
numberOptional15000
Overall budget in milliseconds, 1000-30000. Capped near 18000 in practice to fit the serverless execution limit.
Example: 15000
respect_robots
booleanOptionaltrue
Respect the target site's robots.txt. Left at `true`, a path disallowed for `CrawlForge` is refused with 403 before anything is fetched and no credits are charged. Set it to `false` only for a target you have your own agreement with — the response then carries a `warnings` entry and the override is recorded against your API key.
Example: true

Two ways it maps a site

source in the response tells you which one ran — the two modes return the same keys but populate them differently.

source: "sitemap"
Read from {origin}/sitemap.xml, following up to 3 child sitemaps, capped at 500 URLs. Fast and complete. max_depth_reached and sitemap come back null because nothing was crawled.
source: "crawl"
Used when there is no usable sitemap. A bounded breadth-first crawl of up to 30 pages within the time budget. sitemap is then populated with the links found on each page.
The sitemap field is not a sitemap. In crawl mode it holds a map of each crawled page to the links found on it; in sitemap mode it is null. The enumerated URLs are always in pages.
A site serving an HTML landing page at /sitemap.xml with a 200 status is detected and rejected, so it falls through to crawl mode rather than reporting a single bogus page.

Request Examples

terminalBash
curl -X POST https://crawlforge.dev/api/v1/tools/map_site \
  -H "X-API-Key: cf_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "max_depth": 2,
    "include_external": false,
    "timeout": 15000
  }'

Response Example

200 OK1,240ms
{
"success": true,
"data": {
"base_url": "https://example.com",
"source": "sitemap",
"total_pages": 128,
"internal_links": 128,
"external_links": 0,
"pages": [
"https://example.com/",
"https://example.com/pricing",
"https://example.com/docs"
],
"max_depth_reached": null,
"sitemap": null
},
"credits_used": 2,
"credits_remaining": 998,
"processing_time": 1240
}
Field Descriptions
data.sourceEither "sitemap" or "crawl" — which strategy produced this result.
data.total_pagesNumber of URLs in the pages array.
data.internal_linksDistinct internal links found. In sitemap mode this mirrors the page count.
data.external_linksDistinct external links. Always 0 in sitemap mode, since no page bodies are read.
data.pagesThe enumerated URLs — this is the list you want.
data.max_depth_reachedDeepest crawl level reached, or null in sitemap mode where nothing was crawled.
data.sitemapCrawl mode only: each crawled page mapped to the links found on it. Null in sitemap mode.

Error Handling

Nothing could be mapped (422 NO_PAGES_MAPPED)

There was no usable sitemap and the start URL did not return an HTML page to crawl. Common when the URL points at a PDF, an image, or an API endpoint. No credits are charged.

Target returned an error (502 TARGET_HTTP_ERROR)

The site responded with a non-2xx status. Sites behind bot protection usually land here — try stealth_mode instead.

Invalid URL (400 VALIDATION_ERROR)

The url was malformed, used a scheme other than http/https, or resolved to a private address. max_depth must be 1-5 and timeout 1000-30000.

Target too slow (504 FETCH_TIMEOUT)

The site did not respond within the budget. Raise timeout, though it is capped near 18000ms.

Blocked by robots.txt (403 Forbidden)

The target site's robots.txt disallows this path for CrawlForge. Set respect_robots: false to override if you have your own agreement with the target — the override is recorded against your API key. The override does not reach a host on CrawlForge's permanent opt-out list, which is refused whatever respect_robots is set to. Only the entry URL 403s: a URL discovered during the walk that robots.txt disallows is left out of the map instead, and named in warnings.

Sitemap mode is not a subset of crawl mode: A sitemap can list pages that no link points to, and a crawl can reach pages the sitemap omits. If you need both, run this tool and crawl_deep and compare the two lists.

Credit Cost

2 credits
2 credits per request
A flat 2 credits whether the map comes from a sitemap of 500 URLs or a 30-page crawl. Failed calls, including 422 when nothing could be mapped, are not charged.

Cost Breakdown:

Any map, sitemap or crawl mode: 2 credits

Plan Recommendations:

Free Plan: 1,000 one-time trial credits = 500 site maps

Hobby Plan: 5,000 credits/mo = 2,500 site maps ($19/mo)

Professional Plan: 50,000 credits/mo = 25,000 site maps ($99/mo)

Mapping is the cheapest way to size a job — enumerate first, then spend per-page credits only on the URLs you actually want.

Related Tools

crawl_deep
Follow links with depth and page control (4 credits)
extract_links
Get the links from one page (1 credit)
batch_scrape
Extract content from the URLs you enumerated (5 credits per URL)
scrape
Full extraction from a single page (2 credits)
Ready to try map_site? Sign up for free and get 1,000 credits to map your first site.

Footer

CrawlForge MCP

Enterprise web scraping for AI Agents. 29 specialized MCP tools designed for modern developers building intelligent systems.

Product

  • Features
  • Playground
  • Pricing
  • Use Cases
  • Integrations
  • Alternatives
  • Changelog

Resources

  • Getting Started
  • API Reference
  • Templates
  • Guides
  • Blog
  • Glossary
  • FAQ
  • Sitemap

Developers

  • MCP Protocol
  • Claude Desktop
  • Cursor IDE
  • LangChain
  • LlamaIndex

Company

  • About
  • Contact
  • Privacy
  • Terms
  • Acceptable Use
  • Cookies

Stay updated

Get the latest updates on new tools and features.

Built with Next.js and MCP protocol

© 2025-2026 CrawlForge. All rights reserved.