Skip to main content
POST
/
ocr
curl -X POST https://scrape.st/ocr \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "imageUrl": "https://pbs.twimg.com/media/example.jpg"
  }'
{
  "data": {
    "text": "$PEPE presale live\n0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
    "lines": [
      { "text": "$PEPE presale live", "score": 0.98 },
      { "text": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "score": 0.95 }
    ],
    "elapsed_ms": 412,
    "total_ms": 561
  },
  "message": "Text extracted successfully"
}
Runs OCR (RapidOCR/ONNX) against an image and returns the extracted text. This same engine also runs automatically on images attached to tracked posts: each image produces an ocr_result event delivered through your configured channels, keyword-filtered like any other delivery — so a keyword that only appears inside an image still triggers a delivery.

Request

Provide exactly one of:
imageUrl
string
The http(s) URL of the image to process (max 10 MB).
image
string
The image itself, as a data: URI (data:image/png;base64,...) or a raw base64 string.

Response

data
object
text (all lines joined with newlines), lines (per-line text + score), elapsed_ms (OCR service time), total_ms (end-to-end time).
message
string
Status message describing the result
curl -X POST https://scrape.st/ocr \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "imageUrl": "https://pbs.twimg.com/media/example.jpg"
  }'
{
  "data": {
    "text": "$PEPE presale live\n0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
    "lines": [
      { "text": "$PEPE presale live", "score": 0.98 },
      { "text": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "score": 0.95 }
    ],
    "elapsed_ms": 412,
    "total_ms": 561
  },
  "message": "Text extracted successfully"
}

ocr_result event payload

Automatic OCR results are dispatched as their own flat events — source is the discriminator — with ref pointing back at the originating post:
{
  "source": "ocr_result",
  "image_url": "https://pbs.twimg.com/media/example.jpg",
  "text": "$PEPE presale live\n0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
  "ref": {
    "source": "x",
    "mid": "1943512345678901234",
    "sid": "44196397",
    "link": "https://x.com/elonmusk/status/1943512345678901234"
  },
  "buy_ca": [
    {
      "network": "evm",
      "address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
    }
  ],
  "keyword_matches": ["pepe"]
}
keyword_matches appears only for API keys with registered keywords.