Choose a Workflow

Choose by the result you need. Use the smallest workflow that can return it.

Start With the Result You Need

You haveYou needUse
One known URLReadable content or page assetsScrape
One domainA list of its useful URLsMap
One domain or sectionContent from multiple linked pagesCrawl
A topic or questionRelevant web results and optional page contentSearch
URLs, HTML, or textFields matching a JSON SchemaExtract
A supported commerce, search, local, app, ads, or media queryPurpose-built structured recordsData API

The Six Core Workflows

Scrape: read a known page

Use Scrape when you already know the page URL. It returns one processed page directly.

Important optionWhat it controlsPractical default
urlThe public page to retrieveRequired
formatsWhich outputs appear in data["markdown"]
only_main_contentWhether navigation, footers, and sidebars are removedEnable for reading and LLM context
wait_forAdditional milliseconds to wait after page loadLeave at 0 unless content appears late
timeoutMaximum processing time in milliseconds30000
mobileWhether to request a mobile-rendered pagefalse
curl --fail-with-body --silent --show-error \
  -X POST "https://api.datablue.dev/v1/scrape" \
  -H "Authorization: Bearer $DATABLUE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "formats": ["markdown", "links", "images"],
    "only_main_content": true
  }' | jq .

Response: Outputs are in data. Page details, status, quality, and timing use data.metadata, data.status, data.quality, and data.time_taken.

Map: discover before retrieving

Map returns a URL inventory without scraping every page. Use it to inspect and filter a site first.

OptionWhat it controlsDefault
urlThe domain or starting URL to inventoryRequired
searchFilters discovered URLs by a text queryNo filter
limitMaximum URLs returned100
include_subdomainsIncludes URLs hosted on subdomainstrue
use_sitemapUses sitemap data during discoverytrue
curl --fail-with-body --silent --show-error \
  -X POST "https://api.datablue.dev/v1/map" \
  -H "Authorization: Bearer $DATABLUE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "search": "documentation",
    "limit": 100,
    "include_subdomains": true,
    "use_sitemap": true
  }' | jq .

Response: total counts the records. links contains discovered URLs and available page details; status identifies empty results.

Crawl: collect a bounded page set

Crawl collects linked pages as a job. Set page, depth, and path limits before starting.

OptionWhat it controlsDefault
urlThe first page and crawl originRequired
max_pagesMaximum number of pages collected100
max_depthMaximum link distance from the seed3
concurrencyParallel page work inside the job3
crawl_strategyBreadth-first, depth-first, or best-first orderingbfs
include_paths / exclude_pathsGlob rules that bound the crawl to useful sectionsNo path rules
scrape_optionsFormats and extraction settings applied to every pagePage scrape defaults
START_RESPONSE="$(curl --fail-with-body --silent --show-error \
  -X POST "https://api.datablue.dev/v1/crawl" \
  -H "Authorization: Bearer $DATABLUE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/docs",
    "max_pages": 25,
    "max_depth": 3,
    "concurrency": 3,
    "include_paths": ["/docs/**"],
    "exclude_paths": ["/docs/archive/**"],
    "allow_external_links": false,
    "respect_robots_txt": true,
    "scrape_options": {
      "formats": ["markdown", "links"],
      "only_main_content": true
    }
  }')"

echo "$START_RESPONSE" | jq .
JOB_ID="$(echo "$START_RESPONSE" | jq -r '.job_id')"

curl --fail-with-body --silent --show-error \
  "https://api.datablue.dev/v1/crawl/$JOB_ID" \
  -H "Authorization: Bearer $DATABLUE_API_KEY" | jq .

Start response: Save job_id, then poll GET /crawl/{job_id} or use the event stream. Completed data contains one result per page.

Search: find sources, then optionally read them

Search finds sources when you know the query but not the URLs. It can also retrieve content from result pages.

OptionWhat it controlsDefault
queryThe web question or search expressionRequired
num_resultsHow many result pages are considered5
engineThe documented search provider choicegoogle
formatsContent formats requested from result pages["markdown"]
only_main_contentRemoves repeated page chrome from retrieved resultsfalse
extractOptional schema-guided extraction applied to each resultNot enabled
START_RESPONSE="$(curl --fail-with-body --silent --show-error \
  -X POST "https://api.datablue.dev/v1/search" \
  -H "Authorization: Bearer $DATABLUE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "site:example.com deployment guide",
    "num_results": 5,
    "engine": "google",
    "formats": ["markdown"]
  }')"

echo "$START_RESPONSE" | jq .
JOB_ID="$(echo "$START_RESPONSE" | jq -r '.job_id')"

curl --fail-with-body --silent --show-error \
  "https://api.datablue.dev/v1/search/$JOB_ID" \
  -H "Authorization: Bearer $DATABLUE_API_KEY" | jq .

Start response: Save job_id and poll GET /search/{job_id}. Completed data contains ranked results and requested page content.

Extract: enforce a data shape

Extract returns specific fields. Provide a source, a precise instruction, and an optional JSON Schema.

OptionWhat it controlsNotes
urlOne page to retrieve before extractionUse for a direct single-source result
urlsMultiple pages to retrieve and processRuns as a longer job
content / htmlSupplied source material that does not need retrievalUse one source form
promptPlain-language extraction instructionBe specific about units, missing values, and scope
schemaThe required JSON result shapeRecommended for application logic
only_main_contentRemoves surrounding page chrome before extractionUseful for articles and documents
curl --fail-with-body --silent --show-error \
  -X POST "https://api.datablue.dev/v1/extract" \
  -H "Authorization: Bearer $DATABLUE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/pricing",
    "prompt": "Extract every pricing plan and its displayed monthly price.",
    "schema": {
      "type": "object",
      "properties": {
        "plans": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {"type": "string"},
              "monthly_price": {"type": "string"}
            },
            "required": ["name", "monthly_price"]
          }
        }
      },
      "required": ["plans"]
    }
  }' | jq .

Response: Direct results use data.extract. Multi-URL extraction returns a job that must be retrieved after completion.

Data APIs: query a specialized web surface

Use a Data API when DataBlue already supports the exact source and dataset you need.

This Google SERP request shows the authenticated GET pattern. Each Data API defines its own parameters.

curl --fail-with-body --silent --show-error --get \
  "https://api.datablue.dev/v1/data/google/serp" \
  -H "Authorization: Bearer $DATABLUE_API_KEY" \
  --data-urlencode "query=best crm software" \
  --data-urlencode "country=us" \
  --data-urlencode "results=10" \
  --data-urlencode "advanced=false" | jq .

Response: Data APIs return source-specific records. Check each endpoint's response fields before storing them.

Open Data API Status and then the endpoint-specific reference page to obtain its current parameters, examples, and credit behavior.

High-Value Workflow Combinations

Avoid These Common Mismatches

MismatchWhy it hurtsBetter choice
Crawling when one URL is knownAdds job management and retrieves unnecessary pagesUse Scrape
Scraping a homepage to discover an entire siteA homepage rarely exposes every useful URLUse Map
Searching when a supported Data API existsRequires parsing generic results into a domain modelUse the Data API
Extracting before inspecting source qualityA schema cannot recover facts absent from the sourceScrape and validate first
Starting an unrestricted crawlCreates unpredictable scope, duration, and credit useSet page, depth, and path boundaries

Next Step

After selecting a workflow, configure Authentication and complete the First Request walkthrough.