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 know | You want | Endpoint |
|---|---|---|
| The exact page | Its content | POST /v1/extract |
| The site | Which pages exist | POST /v1/map |
| Neither | Where the content lives | POST /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:
formatsdefaults to["markdown"]. Addraw_html,clean_html, orlinksonly when you need them; you get exactly the keys you requested.only_main_contentdefaults totrue. Turn it off when the navigation or footer is the content you want.max_age_msdefaults to two days of cache tolerance. Set it to0to force a fresh fetch.advanced_modedefaults totrueand is the supported way to ask for rendering.render_jsis intentionally rejected with a400and code11000.exclude_tagsthat removes every body node returns400withEXTRACTION_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.sitemapcontrols sitemap use:skip,include(default), oronlywhen you trust the sitemap more than the crawl.limitdefaults to5000and caps at100000.data.outputsis an array of{url, title?, description?}and isnullwhen 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_resultsis an upper bound, not an exact count. Fewer results is still a success.sourceselects the corpus:web,news,shopping, orscholar. Some combinations are rejected —time_rangecannot be combined withshoppingorscholar, andcountryis rejected withscholar.extract_optionsonly applies withextract_content: true, and does not accepturl,country, orheaders.- Zero results is a success:
data.outputsisnullanddata.meta.countis0. - Every call stores your
queryin 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
- HTTP 200 with outer
code: 0does not mean the page was retrieved. Checkdata.successas well, as described in Response format. - 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.