Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.onyxiq.in/llms.txt

Use this file to discover all available pages before exploring further.

The /api/openclaw/scrape endpoint fetches a public web page and returns structured data: the page title, meta description, headings, links, and readable text content. Scripts, styles, navigation, and footer elements are stripped before the text is extracted. The endpoint costs 10 credits per successful call — credits are refunded automatically if the fetch fails.

Request

Method: POST
URL: https://onyxiq.in/api/openclaw/scrape
Authentication: Required (session cookie). Returns 401 if missing.
Content-Type: application/json

Body parameters

url
string
required
The public HTTP or HTTPS URL of the page to scrape. Must be a fully-qualified URL with a valid http: or https: scheme. Relative paths and other protocols are rejected.

Response

200 — success

Credits are only deducted when the endpoint returns a 200 response. If the fetch fails for any reason, the 10 credits are refunded to your account automatically.
ok
boolean
required
Always true on a successful response.
data
object
required
The scraped page data.
creditsUsed
number
required
Number of credits deducted for this request. Always 10.
remainingBalance
number
required
Your credit balance after the deduction.

Error responses

Statuserror messageCause
400"Enter a valid HTTP or HTTPS URL."The url field is missing, not a string, or uses an unsupported protocol.
400"Invalid JSON"The request body is not valid JSON.
401"Authentication required"No valid session cookie was found. Sign in first.
402"Insufficient credits. 10 credits required, N available."Your balance is below 10. Top up your account.
502"OpenClaw could not fetch that page. Your credits were refunded."The target server was unreachable or returned an error. Credits are automatically refunded.

Examples

curl -X POST https://onyxiq.in/api/openclaw/scrape \
  -H "Content-Type: application/json" \
  -H "Cookie: sb-[ref]-auth-token=[token]" \
  -d '{"url":"https://example.com"}'

Example success response

{
  "ok": true,
  "data": {
    "url": "https://example.com",
    "title": "Example Domain",
    "description": "",
    "h1": "Example Domain",
    "headings": [],
    "links": [
      {
        "text": "More information...",
        "href": "https://www.iana.org/domains/reserved"
      }
    ],
    "text": "Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.",
    "scrapedAt": "2026-05-18T10:00:00.000Z"
  },
  "creditsUsed": 10,
  "remainingBalance": 90
}