Skip to main content
All posts

Choosing between extract, map, and search

Three endpoints return web content, but they answer different questions. A decision guide with the request fields that matter.

POST /v1/extract, POST /v1/map, and POST /v1/search all hand back web content, which makes them easy to confuse. They differ in what you have to know before the call:

You knowYou wantEndpoint
The exact pageIts contentPOST /v1/extract
The siteWhich pages existPOST /v1/map
NeitherWhere the content livesPOST /v1/search

Picking the wrong one is not a correctness problem, it is a cost problem: search is billed per result, and map plus a few targeted extractions is usually cheaper and more precise than asking search to crawl.

Extract: one URL in, representations out​

Extract fetches a single URL and produces the formats you ask for.

curl https://openapi.flowda.ai/v1/extract \
-H "Authorization: Bearer $FLOWDA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching", "formats": ["markdown", "links"]}'

Fields worth knowing:

  • formats defaults to ["markdown"]. Add raw_html, clean_html, or links only when you need them; you get exactly the keys you requested.
  • only_main_content defaults to true. Turn it off when the navigation or footer is the content you want.
  • max_age_ms defaults to two days of cache tolerance. Set it to 0 to force a fresh fetch.
  • advanced_mode defaults to true and is the supported way to ask for rendering. render_js is intentionally rejected with a 400 and code 11000.
  • exclude_tags that removes every body node returns 400 with EXTRACTION_SELECTION_EMPTY — that one is worth handling explicitly.

Billing depends on how the page was retrieved: 1 credit on a cache hit, otherwise 1, 3, or 5 credits according to data.meta.strategy_used (X1, X2, X3). See Response format for where those fields live.

Map: discover the URLs first​

Map enumerates the reachable URLs of a site, so you can choose what to extract instead of guessing.

curl https://openapi.flowda.ai/v1/map \
-H "Authorization: Bearer $FLOWDA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.example.com", "domain_filter": "domain", "limit": 2000}'
  • domain_filter: "domain" keeps off-site links out; "all" includes them.
  • sitemap controls sitemap use: skip, include (default), or only when you trust the sitemap more than the crawl.
  • limit defaults to 5000 and caps at 100000.
  • data.outputs is an array of {url, title?, description?} and is null when nothing was discovered.

The usual pipeline is map once, filter the URLs you care about locally, then extract those pages.

Search: locate the content, optionally extract it​

Search answers a query and can extract every result in the same call.

curl https://openapi.flowda.ai/v1/search \
-H "Authorization: Bearer $FLOWDA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "example pricing page", "max_results": 5, "extract_content": true}'
  • max_results is an upper bound, not an exact count. Fewer results is still a success.
  • source selects the corpus: web, news, shopping, or scholar. Some combinations are rejected — time_range cannot be combined with shopping or scholar, and country is rejected with scholar.
  • extract_options only applies with extract_content: true, and does not accept url, country, or headers.
  • Zero results is a success: data.outputs is null and data.meta.count is 0.
  • Every call stores your query in usage records, retained for 12 months by default.

One extraction failing inside a successful search is reported per result as extract.success: false with its own extract.code. Treat the outer call as successful and retry only the failed items.

Templates: skip the pipeline entirely​

If the target is Amazon or Walmart, check templates before building a map-and-extract pipeline. A template returns records shaped by a published output schema for a flat 5 credits per execution, and a failed execution is not charged — although a successful but empty result still is.

Two rules that apply to all three​

  1. HTTP 200 with outer code: 0 does not mean the page was retrieved. Check data.success as well, as described in Response format.
  2. For content that changes over time, do not poll with these endpoints. Create a watch job and let the webhook tell you when something changed.

Keep reading

Monitoring

Verifying Flowda webhook signatures

The exact HMAC construction for X-Watch-Signature, a fixed test vector, and the retry rules your receiver has to survive.

What is the best AI agent web search solution?

The text compares search, extraction, crawling and cited-answer workflows, then proposes testing providers on the same agent tasks and measuring the cost of completed tasks.