/v1/contexts
Supported contexts
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
curl "https://api.oanor.com/escape-api/v1/contexts" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/escape-api/v1/contexts", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/escape-api/v1/contexts");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/escape-api/v1/contexts",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"contexts": [
{
"name": "regex",
"note": "Backslash-escapes regex metacharacters so the text matches literally.",
"example": {
"input": "O'Brien, a.b*",
"escaped": "O'Brien, a\\.b\\*"
}
},
{
"name": "shell",
"note": "POSIX single-quote wrapping — safe to drop into a sh/bash command.",
"example": {
"input": "O'Brien, a.b*",
"escaped": "'O'\\''Brien, a.b*'"
}
},
{
"name": "json",
"note": "A JSON string literal, including the surrounding double quotes.",
"example": {
"input": "O'Brien, a.b*",
"escaped": "\"O'Brien, a.b*\""
}
},
{
"name": "csv",
"note": "RFC 4180 — quotes the field only if it contains a comma, quote or newline.",
"example": {
"input": "O'Brien, a.b*",
"escaped": "\"O'Brien, a.b*\""
}
},
{
"name": "sql",
"note": "A single-quoted SQL string literal. NOT a substitute for parameterised queries / prepared statements — prefer bound parameters to prevent SQL injection.",
"example": {
"input": "O'Brien, a.b*",
"escaped": "'O''Brien, a.b*'"
}
}
]
},
"meta": {
"timestamp": "2026-06-03T01:09:42.625Z",
"request_id": "14f62a8e-c932-424d-8309-ab87f6619ac1"
},
"status": "ok",
"message": "Supported contexts",
"success": true
}