SerperMatrix
API Reference

Scrape API

Extract readable content, Markdown, or raw HTML from any web page.
POST
/api/v1/scrape/
Try it

The scrape endpoint extracts clean, LLM-ready markdown, plain text, or structured JSON from any web page URL. It automatically handles anti-bot challenges, dynamic JavaScript rendering, and boilerplate removal.

Pass formats: ["markdown"] to retrieve structured, token-optimized Markdown ideal for RAG pipelines, AI agents, and content analysis.

Output Formats (formats)

You can request one or multiple output formats in the formats array:

FormatOutput DescriptionPrimary Use Case
markdownClean GitHub-flavored Markdown with headers, lists, code blocks, and links preservedLLM Prompts, RAG Context, Knowledge Bases
textClean plain text stripping all HTML elements and markdown syntaxText Classification, Word Counting, Indexing
jsonStructured JSON containing metadata and formatted content propertiesCustom Data Pipelines & API Integrations
{
  "url": "https://example.com",
  "formats": ["markdown"],
  "use_cache": true
}

Extracted Metadata Properties

Every successful scrape response returns rich page metadata inside data.metadata:

  • title: The target page HTML <title> tag or main header text
  • description: Meta description content or initial paragraph summary
  • status_code: HTTP response status code received from target host (e.g. 200, 404)
  • url: The canonical final URL after all HTTP redirects are followed

Page Caching (use_cache)

SerperMatrix caches scraped page content for 24 hours to deliver sub-100ms response times for repeated requests:

  • Set "use_cache": true (default) to serve from cache when available.
  • Set "use_cache": false to force a fresh real-time web request to the target site.

Authorizations

X-API-KEYstringheaderrequired
Passed via request headers. Your secret API key for SerperMatrix (e.g. sm_live_...).

Body

application/json

urlstringrequired
The fully qualified URL of the target web page you want to scrape (e.g. "https://example.com").
formatsarrayrequired
List of output formats to include in response. Allowed choices: ["markdown"], ["text"], ["json"].
use_cachebooleandefault: true
Retrieve cached response if available (caches up to 24 hours). Set to false to force a fresh web scrape.
Request
curl -X POST https://serpermatrix.com/api/v1/scrape/ \
  -H "X-API-KEY: sm_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","formats":["markdown"],"use_cache":true}'
{
  "success": true,
  "data": {
    "markdown": "# Example Domain\n\nThis domain is for use in illustrative examples in documents.",
    "metadata": {
      "title": "Example Domain",
      "description": "",
      "status_code": 200
    }
  }
}
{
  "q": [
    "This field is required."
  ]
}
{
  "detail": "Invalid or inactive API key."
}
{
  "error": "Insufficient credits",
  "credits_remaining": 0,
  "upgrade_url": "/billing/plans/"
}
{
  "detail": "Request was throttled."
}
{
  "error": "Something went wrong"
}
Copyright © 2026