map_site
Discover and list a website's URLs without fetching page bodies, using sitemap.xml when available or link-following otherwise.
Instructions
Use this to list a site's URLs without fetching page bodies - reads sitemap.xml when available, otherwise follows links. Not for page content (scrape, or crawl_deep for many pages) and not for the links on one page (extract_links). Cost: 2 credits. Example: map_site({url: "https://example.com", include_sitemap: true, max_urls: 500})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The website URL to map | |
| search | No | When set, rank discovered URLs by relevance to this string and emit ranked_urls:[{url,score}] | |
| max_urls | No | Maximum number of URLs to discover | |
| user_agent | No | Override the outbound User-Agent. CrawlForge identifies itself honestly by default; use this only for targets you have your own agreement with. | |
| domain_filter | No | Per-domain allow/deny lists and URL include/exclude patterns | |
| group_by_path | No | Group URLs by path segments | |
| respect_robots | No | Respect the target site's robots.txt (default: true). Setting this to false is honoured, returns a warning in the response, and is recorded against your API key — it is your decision, not a silent default. | |
| include_sitemap | No | Include sitemap.xml data in results | |
| include_metadata | No | Include page metadata for each URL | |
| max_inline_chars | No | Largest result to return inline, in characters of its JSON. Over it, the call returns a preview plus a result_handle for read_result instead of the whole result (default 40,000; env CRAWLFORGE_MAX_INLINE_CHARS) | |
| import_filter_config | No | JSON string of a previously exported domain-filter config |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | No | Flat array of URLs, or grouped-by-path object when group_by_path=true (default) | |
| view | No | Whether preview and read_result offsets index a text field or the pretty-printed JSON | |
| _cost | No | Cost-transparency metadata (D3.5), present when injected into the text copy of the result | |
| preview | No | The first max_inline_chars characters of the view named by view_path (or of the pretty-printed JSON) | |
| base_url | No | ||
| metadata | No | Per-URL metadata when include_metadata=true | |
| site_map | No | The shape of the site as counts; `urls` is the one list of URLs | |
| warnings | No | Present when the map is partial, e.g. the start page could not be read and the URLs come from the sitemap only, or when the result is over max_inline_chars | |
| truncated | No | True when the inline result is a preview | |
| view_path | No | Dotted path of the text field the view was cut from; null for the JSON view | |
| expires_at | No | When the stored result is dropped (ISO 8601) | |
| statistics | No | ||
| total_urls | No | ||
| ranked_urls | No | Present only when the `search` param was set | |
| total_chars | No | Length of the full view in characters | |
| filter_stats | No | ||
| result_handle | No | Handle for read_result; the full result is kept 1 hour | |
| domain_filter_config | No |