Engineering

Scrape vs. crawl vs. map: choose the right request

Understand when to scrape one page, map its links or crawl a bounded section of a website, with AIHackr examples and usage considerations.

On this page

Scrape, map and crawl all start from a URL, but they answer different questions. A scrape asks what is on one page. A map asks which same-origin links are present on that page. A crawl asks for content from several pages within a defined scope. Choosing the smallest useful operation makes the result easier to inspect and the usage easier to predict.

The practical difference

OperationQuestionAIHackr result
ScrapeWhat does this page contain?One representation: Markdown, HTML or links.
MapWhich same-origin links does this page expose?Deduplicated link records, up to your requested limit.
CrawlWhat do these connected pages contain?An asynchronous job with status, retained page records and pagination.

These are the behaviors of AIHackr’s current API. Other products may use the same words for different functionality. In particular, AIHackr Map is page-level discovery, not a prebuilt index of every URL on a domain.

Scrape when you already know the page

Use Scrape for a setup guide, a public product description or another specific source. You can request Markdown for text workflows, HTML for structure or links for a direct link result. A browser can render JavaScript-produced content, subject to the target’s behavior and access restrictions.

bash
curl --fail-with-body https://aihackr.com/v2/scrape \
  -H "Authorization: Bearer $AIHACKR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com",
  "formats": [
    "markdown"
  ]
}'

Do not crawl just because a page belongs to a larger site. Fetch the known source first and check whether it answers the task. One page is often easier to cite and review than a broad collection.

Map when you need to choose the next source

Use Map when you have a section overview but need to inspect the available paths. It reads one page and returns matching same-origin links. You can review link text, remove repetitive navigation and select a narrower starting point for a crawl.

bash
curl --fail-with-body https://aihackr.com/v2/map \
  -H "Authorization: Bearer $AIHACKR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com",
  "limit": 10
}'

A limit of 10 means up to 10 returned links. It does not fetch 10 pages. An empty list can be a valid result if no same-origin links are exposed. It is not proof that the site has no other pages.

Crawl when coverage requires several pages

Use Crawl for a bounded documentation section or a small public content collection. Specify a page limit, depth and rendering preference. Start small enough to review the results manually.

bash
curl --fail-with-body https://aihackr.com/v2/crawl \
  -H "Authorization: Bearer $AIHACKR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com",
  "limit": 3,
  "depth": 1,
  "render": false,
  "formats": [
    "markdown"
  ]
}'

Save the returned job ID and poll its status with a delay. At completion, inspect individual page outcomes and follow the next URL until all retained records have been read. A completed job does not mean every requested page was accessible or useful.

Set render: false when static HTML is sufficient; this avoids executing JavaScript for that crawl. Keep rendering enabled when the content depends on client-side scripts. Compare the actual target result rather than assuming either mode is always better.

How each operation uses credits

Verified accounts receive 1,200 free credits per UTC calendar month. A crawl with a 20-page limit holds up to 20 credits while it runs. AIHackr charges one credit for each successful page with retained content and releases unused credits when the job ends.

A successful Scrape or Map request costs one credit. A successful Extract request costs five. Check usage and retention before scheduling recurring jobs.

A useful decision rule

If you know the URL and need its content, scrape it. If you need to choose URLs from a page, map it. If you need content from several connected pages, submit a bounded crawl and handle its lifecycle. If you need particular fields from one page, consider Extract instead.

The endpoint references for Scrape, Map and Crawl show the exact request shapes and supported options.

START WITH ONE PUBLIC PAGE

Make the web useful to your application.

1,200 free credits each month per verified account. No credit card required.

Try the playground →