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"
}'
curl -X POST https://scrape.st/ocr \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image": "data:image/png;base64,iVBORw0KGgo..."
}'
{
"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
OCR Image
Extract text from an image URL or base64 payload
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"
}'
curl -X POST https://scrape.st/ocr \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image": "data:image/png;base64,iVBORw0KGgo..."
}'
{
"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:string
The http(s) URL of the image to process (max 10 MB).
string
The image itself, as a
data: URI (data:image/png;base64,...) or a raw
base64 string.Response
object
text (all lines joined with newlines), lines (per-line text + score),
elapsed_ms (OCR service time), total_ms (end-to-end time).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"
}'
curl -X POST https://scrape.st/ocr \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image": "data:image/png;base64,iVBORw0KGgo..."
}'
{
"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 events —event is the
category discriminator. A post’s images are OCR’d together (a Telegram album
sends up to 4 at once), so one event covers the batch: images are the URLs,
text is every image’s text joined, and texts indexes text per image
(aligned 1:1 with images). source_event_id points back at the originating
post — join it to the SourceEvent you already received by its id.
{
"event": "ocr_result",
"id": "b6f0c1e2-9a3d-4c7e-8f21-1a2b3c4d5e6f",
"source_event_id": "x:1943512345678901234:44196397",
"images": [
"https://pbs.twimg.com/media/example1.jpg",
"https://pbs.twimg.com/media/example2.jpg"
],
"text": "$PEPE presale live\n0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"texts": ["$PEPE presale live", "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"],
"buy_ca": [
{
"network": "evm",
"address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
}
],
"keyword_matches": ["pepe"]
}
keyword_matches appears only for API keys with registered
keywords.
Over WebSocket, subscribe with ?types=ocr_result (or include it in a
comma-separated list) to receive these — see
WebSocket.