Submit a URL to scan. You can also set some options, like the visibility level and custom headers. Accounts are limited to 1 new scan every 10 seconds and 8000 per month. If you need more, please reach out.
/accounts/{accountId}/urlscanner/scan
post
URL Scanner
urlscanner-create-scan
{
"business": true,
"enterprise": true,
"free": true,
"pro": true
} {
"enum": [
"com.cloudflare.api.account.url-scanner.read"
]
} [
{
"in": "path",
"name": "accountId",
"required": true,
"schema": {
"description": "Account Id",
"type": "string"
}
}
] {
"content": {
"application/json": {
"schema": {
"properties": {
"customHeaders": {
"additionalProperties": {
"type": "string"
},
"description": "Set custom headers",
"type": "object"
},
"screenshotsResolutions": {
"default": [
"desktop"
],
"description": "Take multiple screenshots targeting different device types",
"items": {
"default": "desktop",
"description": "Device resolutions.",
"enum": [
"desktop",
"mobile",
"tablet"
],
"type": "string"
},
"type": "array"
},
"url": {
"example": "https://www.example.com",
"type": "string"
},
"visibility": {
"default": "Public",
"description": "The option `Public` means it will be included in listings like recent scans and search results. `Unlisted` means it will not be included in the aforementioned listings, users will need to have the scan's ID to access it. A a scan will be automatically marked as unlisted if it fails, if it contains potential PII or other sensitive material.",
"enum": [
"Public",
"Unlisted"
],
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
}
}
}
} {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"errors": {
"items": {
"properties": {
"message": {
"example": "Submission unsuccessful",
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"type": "array"
},
"messages": {
"items": {
"properties": {
"message": {
"example": "Submission successful",
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"type": "array"
},
"result": {
"properties": {
"time": {
"description": "Time when url was submitted for scanning.",
"format": "date-time",
"type": "string"
},
"url": {
"description": "Canonical form of submitted URL. Use this if you want to later search by URL.",
"type": "string"
},
"uuid": {
"description": "Scan ID.",
"format": "uuid",
"type": "string"
},
"visibility": {
"description": "Submitted visibility status.",
"example": "Public",
"type": "string"
}
},
"required": [
"visibility",
"uuid",
"url",
"time"
],
"type": "object"
},
"success": {
"type": "boolean"
}
},
"required": [
"messages",
"errors",
"success",
"result"
],
"type": "object"
}
}
},
"description": "Scan request accepted successfully."
},
"400": {
"content": {
"application/json": {
"schema": {
"properties": {
"errors": {
"items": {
"properties": {
"message": {
"example": "Scan ID is not a valid uuid.",
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"type": "array"
},
"messages": {
"items": {
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"type": "array"
},
"success": {
"description": "Whether request was successful or not",
"type": "boolean"
}
},
"required": [
"messages",
"errors",
"success"
],
"type": "object"
}
}
},
"description": "Invalid params."
},
"409": {
"content": {
"application/json": {
"schema": {
"properties": {
"errors": {
"items": {
"properties": {
"message": {
"example": "Submission unsuccessful",
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"type": "array"
},
"messages": {
"items": {
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"type": "array"
},
"result": {
"properties": {
"tasks": {
"items": {
"properties": {
"clientLocation": {
"description": "Submitter location",
"example": "PT",
"type": "string"
},
"clientType": {
"enum": [
"Site",
"Automatic",
"Api"
],
"type": "string"
},
"effectiveUrl": {
"description": "URL of the primary request, after all HTTP redirects",
"example": "http://example.com/",
"type": "string"
},
"errors": {
"items": {
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"type": "array"
},
"scannedFrom": {
"properties": {
"colo": {
"description": "IATA code of Cloudflare datacenter",
"example": "MAD",
"type": "string"
}
},
"required": [
"colo"
],
"type": "object"
},
"status": {
"enum": [
"Queued",
"InProgress",
"InPostProcessing",
"Finished"
],
"type": "string"
},
"success": {
"example": true,
"type": "boolean"
},
"time": {
"example": "2023-05-03T17:05:04.843Z",
"type": "string"
},
"timeEnd": {
"example": "2023-05-03T17:05:19.374Z",
"type": "string"
},
"url": {
"description": "Submitted URL",
"example": "http://example.com",
"type": "string"
},
"uuid": {
"description": "Scan ID",
"example": "2ee568d0-bf70-4827-b922-b7088c0f056f",
"type": "string"
},
"visibility": {
"enum": [
"Public",
"Unlisted"
],
"type": "string"
}
},
"required": [
"uuid",
"url",
"status",
"success",
"errors",
"time",
"timeEnd",
"visibility",
"clientLocation",
"clientType",
"effectiveUrl",
"scannedFrom"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"tasks"
],
"type": "object"
},
"success": {
"example": true,
"type": "boolean"
}
},
"required": [
"messages",
"errors",
"success",
"result"
],
"type": "object"
}
}
},
"description": "Scan request denied: hostname was recently scanned."
},
"429": {
"content": {
"application/json": {
"schema": {
"properties": {
"errors": {
"items": {
"properties": {
"message": {
"example": "Submission unsuccessful",
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"type": "array"
},
"messages": {
"items": {
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"type": "array"
},
"success": {
"example": true,
"type": "boolean"
}
},
"required": [
"messages",
"errors",
"success"
],
"type": "object"
}
}
},
"description": "Scan request denied: rate limited."
}
} [
{
"api_email": [],
"api_key": []
}
]