Skip to main content
POST
/
guardrails
/
guardrail
/
scan-url
Scan URL Using Guardrail
curl --request POST \
  --url https://api.enkryptai.com/guardrails/guardrail/scan-url \
  --header 'Content-Type: application/json' \
  --header 'X-Enkrypt-Guardrail: <x-enkrypt-guardrail>' \
  --header 'X-Enkrypt-Mode: <x-enkrypt-mode>' \
  --header 'apikey: <api-key>' \
  --data '
{
  "url": "<string>"
}
'
{
  "summary": {},
  "details": {
    "url": "<string>",
    "metadata": {
      "title": "<string>",
      "description": "<string>",
      "language": "<string>"
    },
    "total_fragments": 123,
    "fragments_with_detections": 123,
    "detections": [
      {
        "unsafe_content": "<string>",
        "chunk_type": "<string>",
        "triggered_detectors": [
          "<string>"
        ],
        "detector_details": {}
      }
    ],
    "combined_highlight_url": "<string>"
  }
}

Authorizations

apikey
string
header
required

Headers

X-Enkrypt-Guardrail
string
required

The guardrail name

Example:

"My Guardrail"

X-Enkrypt-Mode
enum<string>
required

Whether to apply input (prompt) or output (response) detectors

Available options:
prompt,
response
Example:

"prompt"

Body

application/json
url
string<uri>
required

The URL to scan and analyze.

Response

200 - application/json

Scan results for the provided URL using the specified guardrail.

summary
object
required

Summary counts of detections by detector type.

details
ScanUrlDetails ยท object
required

Detailed scan results including URL metadata and fragment-level information.