API Reference
Scrape API
Extract readable content, Markdown, or raw HTML from any web page.
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:
| Format | Output Description | Primary Use Case |
|---|---|---|
markdown | Clean GitHub-flavored Markdown with headers, lists, code blocks, and links preserved | LLM Prompts, RAG Context, Knowledge Bases |
text | Clean plain text stripping all HTML elements and markdown syntax | Text Classification, Word Counting, Indexing |
json | Structured JSON containing metadata and formatted content properties | Custom 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 textdescription: Meta description content or initial paragraph summarystatus_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": falseto 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
}
}
}