API Reference

Base URL: https://scrapen.run

Getting Started

  1. Sign up at scrapen.com
  2. Create an API key in the dashboard
  3. Make your first request
curl -X POST https://scrapen.run/v1/scrape \
-H "Authorization: Bearer sc_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"url": "https://x.com/LLMJunky/status/2036239240300818751"}'

Node.js Quickstart

The fetch API is built into Node 18+. No packages needed. Create a file called `scrape.mjs` and run it with `node scrape.mjs`.

npm init -y
// scrape.mjs
const res = await fetch('https://scrapen.run/v1/scrape', {
method: 'POST',
headers: {
'Authorization': 'Bearer sc_live_your_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://x.com/LLMJunky/status/2036239240300818751',
}),
});
const data = await res.json();
console.log(data);

Python Quickstart

Install the requests library, then create a file called `scrape.py`. Run it with `python scrape.py`.

pip install requests
# scrape.py
import requests
res = requests.post(
"https://scrapen.run/v1/scrape",
headers={"Authorization": "Bearer sc_live_your_key_here"},
json={"url": "https://x.com/LLMJunky/status/2036239240300818751"},
)
print(res.json())

Authentication

All API requests require an API key passed in the Authorization header:

Authorization: Bearer sc_live_your_key_here

API keys are created in the dashboard. Keys start with sc_live_.

POST/v1/scrape

Scrape a URL and get structured data back.

Parameters

FieldTypeRequiredDescription
urlstringYesThe URL to scrape

Response

FieldTypeDescription
requestIdstringUnique identifier for this request
platformstringDetected platform (e.g. twitter, reddit)
urlstringThe URL that was scraped
itemsobject[]Array of scraped items
typestringItem type (post, comment, etc.)
externalIdstringPlatform-specific ID
parentIdstring | nullParent item ID for replies
authorstringAuthor username
textstringItem text content
createdAtstringISO 8601 timestamp
metricsobjectEngagement metrics (likes, shares, etc.)

Request

curl -X POST https://scrapen.run/v1/scrape \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{"url": "https://x.com/LLMJunky/status/2036239240300818751"}'

Response

{
"requestId": "req_abc123",
"platform": "twitter",
"url": "https://x.com/LLMJunky/status/2036239240300818751",
"items": [
{
"type": "post",
"externalId": "2036239240300818751",
"parentId": null,
"author": "LLMJunky",
"text": "...",
"createdAt": "2026-03-15T10:30:00Z",
"metrics": {
"likes": 639,
"retweets": 39,
"replies": 57
}
}
]
}
Try it
POST /v1/playground
GET/v1/usage

Get your API usage for the current billing period.

Response

FieldTypeDescription
periodobjectCurrent billing period
startstringPeriod start (ISO 8601)
endstringPeriod end (ISO 8601)
creditsUsednumberCredits consumed this period
creditsLimitnumberPlan credit limit
creditsRemainingnumberPlan credits remaining
purchasedCreditsnumberExtra purchased credits
totalRemainingnumberPlan + purchased credits remaining
requestsnumberTotal requests this period

Request

curl https://scrapen.run/v1/usage \
-H "Authorization: Bearer sc_live_..."

Response

{
"period": {
"start": "2026-03-01T00:00:00Z",
"end": "2026-04-01T00:00:00Z"
},
"creditsUsed": 1250,
"creditsLimit": 19000,
"creditsRemaining": 17750,
"purchasedCredits": 2000,
"totalRemaining": 19750,
"requests": 1180
}
GET/v1/platforms

List all supported platforms. No authentication required.

Response

FieldTypeDescription
platformsobject[]List of supported platforms
namestringPlatform identifier
domainsstring[]Accepted domain patterns
statusstringPlatform status (active, beta)
docsUrlstringPlatform-specific documentation URL

Request

curl https://scrapen.run/v1/platforms

Response

{
"platforms": [
{
"name": "twitter",
"domains": [
"x.com",
"twitter.com"
],
"status": "active",
"docsUrl": "..."
},
{
"name": "reddit",
"domains": [
"reddit.com"
],
"status": "active",
"docsUrl": "..."
}
]
}

Errors

The API returns errors in Problem Details format:

{
"type": "https://api.scrapen.dev/errors/rate_limited",
"status": 429,
"code": "rate_limited",
"message": "Rate limit exceeded",
"requestId": "req_abc123",
"docUrl": "https://docs.scrapen.dev/errors/rate_limited",
"retryable": true
}

Status Codes

StatusCodeDescription
400bad_requestInvalid URL or parameters
401unauthorizedInvalid or missing API key
402no_creditsCredit balance exhausted
429rate_limitedRate limit exceeded
500internal_errorInternal server error

Rate Limits

Rate limits are enforced per API key:

PlanRateConcurrency
Free10 req/min1
Pro60 req/min10

Rate Limit Headers

RateLimit-Policy: 60;w=60
RateLimit: limit=60, remaining=58, reset=42
Retry-After: 2