Skip to main content

Firecrawl /map Endpoint: Discover Every URL on a Website

· 3 min read
Yassine El Haddad
Software Developer & Automation Specialist

I build production AI agents, web scrapers, and automation pipelines. Most of what I publish here comes from the actual problems they run into: proxies that get banned, anti-bot stacks that fingerprint your client, RAG that drifts when the underlying data moves. Stack: Python, TypeScript, Go, FastAPI, LangChain, Crawlee, Playwright, deployed on AWS, GCP, and Cloudflare.

The Firecrawl /map endpoint discovers URLs on a domain from sitemaps, SERP, and prior crawls. One request costs 1 credit and can return up to 100,000 links. Use it before /crawl to scope extraction and cut waste.

Try Firecrawl map →

What /map Does

POST https://api.firecrawl.dev/v2/map returns a list of URLs with optional title and description. It does not scrape content. Use it for:

  • Auditing site structure before crawling
  • Building include/exclude path rules
  • Creating targeted crawl queues for docs, blogs, or products

Parameters

ParameterDefaultDescription
urlrequiredBase URL to map
limit5000Max links (max 100,000)
sitemapincludeskip, include, or only
searchOrder by keyword relevance (e.g. "blog")
includeSubdomainstrueInclude subdomains
ignoreQueryParameterstrueExclude query-param URLs
ignoreCachefalseBypass sitemap cache (up to 7 days)
timeoutTimeout in milliseconds

Python Example

from firecrawl import Firecrawl

app = Firecrawl(api_key="fc-YOUR-API-KEY")
mapped = app.map_url(
"https://example.com",
limit=5000,
search="docs",
sitemap="include"
)
links = mapped.get("links", [])
docs_urls = [l["url"] for l in links if "/docs/" in l["url"] and "/tag/" not in l["url"]]
print(f"Discovered {len(links)} URLs, {len(docs_urls)} in docs")

Response Format

{
"success": true,
"links": [
{ "url": "https://example.com/page1", "title": "Page 1", "description": "..." },
{ "url": "https://example.com/page2", "title": null, "description": null }
]
}

Each object has url; title and description are optional.

Map → Crawl Workflow

  1. Run /map on the target domain
  2. Group URLs by path prefix
  3. Exclude low-value sections (tags, archives, legal)
  4. Build includePaths / excludePaths for /crawl
  5. Run /crawl with the scoped config

This reduces crawl spend and improves output quality.

Quality Checks Before Crawl

  • Deduplicate mapped URLs
  • Canonicalize trailing slash and query params
  • Validate domain boundaries (avoid external leaks)
  • Store discovery timestamp for freshness

Cost

1 credit per request, regardless of how many links are returned. For large domains, map is far cheaper than blindly crawling.

Apify Affiliate Banner 728x90Apify Affiliate Banner 728x90Apify Affiliate Banner 300x50Apify Affiliate Banner 300x50
Next step

Use mapped URLs in batch scraping or RAG ingestion.

Frequently Asked Questions

Yes. Map only discovers URLs; it does not scrape content. One request can return thousands of links for 1 credit.

For unknown domains, yes. It helps build precise path filters and avoid low-value crawl spend.

Normalize URLs, segment by intent, and pass only high-value paths into crawl or scrape workflows.

By default it uses sitemap plus other sources. Set sitemap='only' for sitemap-only, or 'skip' to ignore.

Common mistakes and fixes

Map returns fewer URLs than expected

Check sitemap mode (only vs include). Use ignoreCache: true if sitemap changed recently. Increase limit (max 100,000).

Map timing out on large sites

Use search to narrow scope. Set timeout in ms. Consider splitting by subdomain.