Clean article text, headings, code blocks, tables, and link rules.

On this page

markdown is the default format for POST /v1/scrape. Omit format or send "format": "markdown" to receive clean article text in data.markdown alongside every page link in data.links.

Example

curl -sS https://api.crawlapi.dev/v1/scrape \
  -H "Authorization: Bearer $CRAWLAPI_API_KEY" \
  -H 'content-type: application/json' \
  --data '{"url": "https://en.wikipedia.org/wiki/Web_scraping"}'

The response returns clean page text in data.markdown and every unique page link in data.links.

What is kept and removed

Element Output in data.markdown
Headings # through ######, with the page title promoted when missing
Paragraphs, blockquotes, lists Clean markdown preserving ordered and unordered lists
Data tables Markdown tables (layout tables flatten to plain text)
Code blocks Fenced code blocks preserving declared language tags
Images Dropped (no image URLs or base64 data)
Page chrome Navigation bars, footers, cookie banners, dialogs, form controls, and repeated UI chrome removed

Inline links in data.markdown are normalized to keep token counts low:

  • Absolute http(s) URLs: Relative links resolve against the page’s base URL. Non-web schemes (mailto:, javascript:) stay as plain text.
  • Tracking removed: Parameters such as utm_*, fbclid, and gclid are stripped from links and from metadata.final_url.
  • Linked once: Each unique URL links on its first appearance; repeated mentions render as plain text.
  • Noisy controls flattened: Same-page fragment anchors and listing filter/sort controls render as plain text while pagination links stay linked.
  • Full page data.links[]: Separate from inline links, data.links returns every unique absolute http(s) <a href> on the entire page (including navigation) in document order, with fragments and tracking stripped. RSS and Atom feeds populate data.links with entry URLs; other documents return [].

Special sources

  • X and YouTube: Dedicated markdown layouts with metrics, threads, descriptions, chapters, and transcripts. See X and YouTube.
  • Documents: PDFs, Office files, CSVs, JSON, feeds, and plain text convert to markdown through the same endpoint. See PDFs and documents.

Response metadata

Every response includes data.metadata alongside data.markdown so you can index, deduplicate, and filter results before storing them:

Field Meaning
title / description Page title and meta description
language Detected BCP-47 language tag (or null when unavailable)
status Final HTTP status code returned by the target site
final_url Canonical URL after redirects, with tracking parameters removed
truncated Present and true only when data.markdown was trimmed at 2 MiB
login_required Present and true only when the target served a readable sign-in wall

Output size

data.markdown is capped at 2 MiB UTF-8. When a very large page exceeds that cap, the text is trimmed cleanly and metadata.truncated is set to true.

Next steps

esc
↑↓navigate↵openescclose
Documentation