### Curl Example to Get Live Scanners Source: https://docs.urlscan.io/apis/urlscan-openapi/live-scanning/livescangetresource An example `curl` command to make a GET request to the `/api/v1/livescan/scanners/` endpoint. This command includes the necessary `api-key` header for authentication. Replace `YOUR_API_KEY_HERE` with your actual API key. ```curl curl -i -X GET \ http://urlscan.io/api/v1/livescan/scanners/ \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Example JSON response for urlscan.io URL submission Source: https://docs.urlscan.io/guides/quickstart This JSON object demonstrates the typical successful response from the urlscan.io API after a URL submission. It includes a confirmation message, a unique scan UUID, direct links to the scan result page and API endpoint, the scan's visibility, and the original URL. ```json { "message": "Submission successful", "uuid": "0196d976-07f6-7aae-8a57-aa019145f31c", "result": "https://urlscan.io/result/0196d976-07f6-7aae-8a57-aa019145f31c/", "api": "https://urlscan.io/api/v1/result/0196d976-07f6-7aae-8a57-aa019145f31c/", "visibility": "public", "url": "https://example.com" } ``` -------------------------------- ### Example: Get Grouped User Agents (curl) Source: https://docs.urlscan.io/apis/urlscan-openapi/scanning/resultapi Example `curl` command to fetch the list of grouped user agents from the urlscan.io API. This command performs a GET request and requires an API key for authentication. ```curl curl -i -X GET \ http://urlscan.io/api/v1/userAgents \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### urlscan.io Search API: cURL Request Example Source: https://docs.urlscan.io/apis/urlscan-openapi/search Example cURL command demonstrating how to perform a GET request to the urlscan.io Search API, including specifying query parameters like `datasource`, `q`, `search_after`, `size`, and authenticating with an API key. ```curl curl -i -X GET \\ 'http://urlscan.io/api/v1/search?datasource=scans&q=page.domain%3Aexample.com&search_after=string&size=100' \\ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Search API Successful Response Example Source: https://docs.urlscan.io/apis/urlscan-openapi/search/similarsearch Example JSON response for a successful `GET /api/v1/search` request, illustrating the structure of the `results` array, `total` count, `took` time, and `has_more` flag for pagination. ```json { "results": [ { … }, { … } ], "total": 10000, "took": 23, "has_more": true } ``` -------------------------------- ### Submit URL for scanning to urlscan.io API Source: https://docs.urlscan.io/guides/quickstart This `curl` command sends a POST request to the urlscan.io API to initiate a URL scan. It requires an API key for authentication and specifies the target URL and its desired visibility (e.g., 'public'). ```bash curl -X POST https://urlscan.io/api/v1/scan \ -H "Content-Type: application/json" \ -H "API-Key: YOUR_API_KEY" \ -d '{ "url": "https://example.com", "visibility": "public" }' ``` -------------------------------- ### Example Curl Request for urlscan.io Search API Source: https://docs.urlscan.io/apis/urlscan-openapi/search/search A command-line example demonstrating how to make a GET request to the urlscan.io Search API using curl, including query parameters for datasource, query string, search_after, and size, along with API key authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/search?datasource=scans&q=page.domain%3Aexample.com&search_after=string&size=100' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Example: Retrieve Available Countries (curl) Source: https://docs.urlscan.io/apis/urlscan-openapi/scanning/resultapi Example `curl` command to fetch the list of available countries from the urlscan.io API. This command performs a GET request and requires an API key for authentication. ```curl curl -i -X GET \ http://urlscan.io/api/v1/availableCountries \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Curl Example: Get Structurally Similar Scan Results Source: https://docs.urlscan.io/apis/urlscan-openapi/search Example `curl` command to retrieve structurally similar scan results from urlscan Pro, demonstrating how to include path and query parameters, and API key authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/pro/result/68e26c59-2eae-437b-aeb1-cf750fafe7d7/similar/?q=page.domain%3Aurlscan.io&search_after=string&size=10' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Example: Get User Subscriptions using cURL Source: https://docs.urlscan.io/apis/urlscan-openapi/subscriptions/subscriptionsget Demonstrates how to make a GET request to the urlscan.io API to retrieve a list of user subscriptions using the cURL command-line tool. An API key is required for authentication. ```curl curl -i -X GET \ http://urlscan.io/api/v1/user/subscriptions/ \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Retrieve urlscan.io DOM snapshot and PNG screenshot by UUID Source: https://docs.urlscan.io/guides/quickstart These `curl` commands allow retrieval of the Document Object Model (DOM) snapshot and a full-page PNG screenshot associated with a completed urlscan.io scan. Both require the scan's UUID and an API key for authentication. A HTTP/404 response indicates the asset was not stored. ```bash curl -H "API-Key: YOUR_API_KEY" https://urlscan.io/screenshots/$uuid.png curl -H "API-Key: YOUR_API_KEY" https://urlscan.io/dom/$uuid/ ``` -------------------------------- ### Retrieve urlscan.io scan results using UUID Source: https://docs.urlscan.io/guides/quickstart This `curl` command fetches the detailed scan results from urlscan.io using the unique scan UUID. An API key is required for authentication. The endpoint will return HTTP/404 until the scan is complete and HTTP/200 with the JSON result once available. ```bash curl -H "API-Key: YOUR_API_KEY" https://urlscan.io/api/v1/result/$uuid/ ``` -------------------------------- ### urlscan.io Search API: Successful Response Example Source: https://docs.urlscan.io/apis/urlscan-openapi/search Illustrative JSON example of a successful response from the urlscan.io Search API, showing typical values for `results`, `total`, `took`, and `has_more`. ```json { "results": [ { "… " }, { "… " } ], "total": 10000, "took": 23, "has_more": true } ``` -------------------------------- ### Example JSON Response for API Quotas Source: https://docs.urlscan.io/apis/urlscan-openapi/generic/quotas This JSON example illustrates the typical structure and content of a successful response from the API Quotas endpoint, showing various quota limits and related account features. ```json { "source": "team", "limits": { "private": { … }, "public": { … }, "retrieve": { … }, "search": { … }, "unlisted": { … }, "livescan": { … }, "liveshot": { … }, "maxRetentionPeriodDays": 90, "privateIncidentCreate": { … }, "unlistedIncidentCreate": { … }, "privateIncidentOpen": 100, "unlistedIncidentOpen": 200, "maxSearchRangeMonths": 6, "maxSearchResults": 10000, "products": [ … ], "features": [ … ], "queryableFields": [ … ], "queryVisibility": [ … ] } } ``` -------------------------------- ### Curl Example: Trigger Live Scan (Blocking) Source: https://docs.urlscan.io/apis/urlscan-openapi/live-scanning/livescanscanners Example `curl` command to initiate a blocking live scan, including content type, API key, and scan configuration. ```curl curl -i -X POST \ 'http://urlscan.io/api/v1/livescan/{{livescanner}}/scan/' \ -H 'Content-Type: application/json' \ -H 'api-key: YOUR_API_KEY_HERE' \ -d '{ "task": { "url": "http://example.com", "visibility": "public" }, "scanner": { "pageTimeout": 0, "captureDelay": 0, "extraHeaders": {}, "enableFeatures": [], "disableFeatures": [] } }' ``` -------------------------------- ### Get Available Brands API Endpoint with Examples Source: https://docs.urlscan.io/apis/urlscan-openapi/brands This API endpoint allows users to retrieve a list of brands that are actively tracked by urlscan.io for brand and phishing detection purposes. Authentication via an API key is required for access. ```APIDOC API Endpoint: /api/v1/pro/availableBrands Method: GET Security: apikeyAuth Base URL: http://urlscan.io/api/v1/pro/availableBrands Description: Get a list of brands that are tracked as part of urlscan's brand and phishing detection. ``` ```curl curl -i -X GET \ http://urlscan.io/api/v1/pro/availableBrands \ -H 'api-key: YOUR_API_KEY_HERE' ``` ```JSON { "kits": [ { … } ] } ``` -------------------------------- ### Curl Example: Task URL Scan (Asynchronous) Source: https://docs.urlscan.io/apis/urlscan-openapi/live-scanning/livescanscanners Example `curl` command to submit a URL for an asynchronous scan, specifying content type, API key, and scan parameters. ```curl curl -i -X POST \ 'http://urlscan.io/api/v1/livescan/{{livescanner}}/task/' \ -H 'Content-Type: application/json' \ -H 'api-key: YOUR_API_KEY_HERE' \ -d '{ "task": { "url": "http://example.com", "visibility": "public" }, "scanner": { "pageTimeout": 0, "captureDelay": 0, "extraHeaders": {}, "enableFeatures": [], "disableFeatures": [] } }' ``` -------------------------------- ### Example Curl Request for urlscan Pro Structure Search Source: https://docs.urlscan.io/apis/urlscan-openapi/search/search Demonstrates how to make a GET request to the urlscan Pro Structure Search API using curl, including path parameters, query parameters, and API key authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/pro/result/68e26c59-2eae-437b-aeb1-cf750fafe7d7/similar/?q=page.domain%3Aurlscan.io&search_after=string&size=10' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Curl Example for Retrieving User Subscriptions Source: https://docs.urlscan.io/apis/urlscan-openapi/subscriptions/subscriptionsresults Demonstrates how to use `curl` to make an authenticated GET request to the urlscan.io API to retrieve a list of user subscriptions. Remember to replace `YOUR_API_KEY_HERE` with your actual API key for successful authentication. ```curl curl -i -X GET \ http://urlscan.io/api/v1/user/subscriptions/ \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Scan API: Submit URL Response Example (JSON) Source: https://docs.urlscan.io/apis/urlscan-openapi/scanning An example of the JSON response received after successfully submitting a URL for scanning. It illustrates the 'uuid', 'visibility', 'url', and 'country' fields with sample values. ```json { "uuid": "68e26c59-2eae-437b-aeb1-cf750fafe7d7", "visibility": "public", "url": "https://urlscan.io/", "country": "de" } ``` -------------------------------- ### Common API Response Structure and Example (200 OK) Source: https://docs.urlscan.io/apis/urlscan-openapi/hostnames/hostnamehistory Details the standard successful API response format for urlscan.io, including the `pageState` for pagination and the `results` array for data. An example JSON payload is provided. ```APIDOC Response Status: 200 OK Content-Type: application/json Body Fields: pageState: string Description: If set, indicates additional results are available. Repeat the API call with this value to get the next batch. results: Array of objects Description: Contains the main data results. ``` ```JSON { "example": { "results": [ ], "pageState": "xxx" } } ``` -------------------------------- ### Example JSON Response for Get Available Brands Source: https://docs.urlscan.io/apis/urlscan-openapi/brands/availablebrands A sample JSON response body for a successful API call to retrieve available brands. The 'kits' array contains objects representing individual brands, though their properties are not fully detailed in this snippet. ```json { "kits": [ { … } ] } ``` -------------------------------- ### Example X-Rate-Limit HTTP Headers Source: https://docs.urlscan.io/pages/api-rate-limits An example of the HTTP `X-Rate-Limit` headers returned by the urlscan.io API on a rate-limited resource. These headers provide real-time information about the current rate limit status for the specific action. ```APIDOC X-Rate-Limit-Scope: ip-address X-Rate-Limit-Action: search X-Rate-Limit-Window: minute X-Rate-Limit-Limit: 30 X-Rate-Limit-Remaining: 24 X-Rate-Limit-Reset: 2025-05-18T20:19:00.000Z X-Rate-Limit-Reset-After: 17 ``` -------------------------------- ### Perform a Search API Call using cURL Source: https://docs.urlscan.io/apis/urlscan-openapi/search/phishfeed Example cURL command demonstrating how to make a GET request to the urlscan.io Search API. It includes parameters for datasource, query, search_after, size, and requires an API key for authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/search?datasource=scans&q=page.domain%3Aexample.com&search_after=string&size=100' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Example Hostname History Response for urlscan.io API Source: https://docs.urlscan.io/_spec/apis/urlscan-openapi Provides an example of the data structure returned when querying hostname history. It includes details such as `seen_on` date, `source`, `first_seen`, `last_seen` timestamps, and `data_type` for various historical records like `seenDates`, `shardDate`, `ct`, `pdns`, `scan`, and `zonefile`. This example illustrates the format of historical data points for a given hostname. ```APIDOC hostnameHistoryExample: example: results: - seen_on: '2200-01-01' source: seenDates sub_id: '' first_seen: '2023-07-28T11:20:15.617Z' last_seen: '2023-08-04T16:09:09.591Z' data_type: null data: null - seen_on: '2200-01-01' source: shardDate sub_id: '' first_seen: '2023-07-28T11:20:15.685Z' last_seen: null data_type: null data: null - seen_on: '2100-01-01' source: ct sub_id: '' first_seen: '2023-07-28T11:20:15.617Z' last_seen: '2023-07-28T11:21:23.599Z' data_type: null data: null - seen_on: '2100-01-01' source: pdns sub_id: '' first_seen: '2023-07-28T11:21:20.079Z' last_seen: '2023-08-04T16:09:09.574Z' data_type: null data: null - seen_on: '2100-01-01' source: pdns sub_id: A first_seen: '2023-07-28T11:21:20.079Z' last_seen: '2023-08-04T16:09:09.574Z' data_type: null data: null - seen_on: '2100-01-01' source: pdns sub_id: MX first_seen: '2023-07-28T11:21:20.174Z' last_seen: '2023-07-31T11:23:22.848Z' data_type: null data: null - seen_on: '2100-01-01' source: pdns sub_id: NS first_seen: '2023-07-28T11:21:20.128Z' last_seen: '2023-08-04T11:05:40.130Z' data_type: null data: null - seen_on: '2100-01-01' source: pdns sub_id: SOA first_seen: '2023-07-28T11:21:20.176Z' last_seen: '2023-07-31T11:23:22.849Z' data_type: null data: null - seen_on: '2100-01-01' source: scan sub_id: '' first_seen: '2023-07-28T11:23:52.876Z' last_seen: '2023-08-04T16:09:09.591Z' data_type: null data: null - seen_on: '2100-01-01' source: zonefile sub_id: '' first_seen: '2023-07-30T03:00:02.440Z' last_seen: '2023-07-30T03:00:02.444Z' data_type: null ``` -------------------------------- ### Curl Example: Store Live Scan Result Source: https://docs.urlscan.io/apis/urlscan-openapi/live-scanning/livescanscanners Example `curl` command to store a temporary live scan permanently, specifying visibility. ```curl curl -i -X PUT \ 'http://urlscan.io/api/v1/livescan/{{livescanner}}/{{livescanId}}/' \ -H 'Content-Type: application/json' \ -H 'api-key: YOUR_API_KEY_HERE' \ -d '{ "task": { "visibility": "public" } }' ``` -------------------------------- ### Example: Get Saved Searches with curl Source: https://docs.urlscan.io/apis/urlscan-openapi/saved-searches/savedsearchesdelete A practical example demonstrating how to use the 'curl' command-line tool to make a GET request to the /api/v1/user/searches/ endpoint. This command includes the necessary 'api-key' header for authentication. ```curl curl -i -X GET \ http://urlscan.io/api/v1/user/searches/ \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Search API Request Example Source: https://docs.urlscan.io/apis/urlscan-openapi/search/similarsearch Example `curl` command to perform a search query on the urlscan.io API, demonstrating how to use query parameters like `datasource`, `q`, `search_after`, and `size`, along with API key authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/search?datasource=scans&q=page.domain%3Aexample.com&search_after=string&size=100' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Get Watchable Attributes API Endpoint and Curl Example Source: https://docs.urlscan.io/apis/urlscan-openapi/incidents/updateincident Documents the API endpoint for retrieving a list of attributes that can be used with the `watchedAttributes` property of an incident. Includes security details and a `curl` example for the GET request. ```APIDOC API Endpoint: /api/v1/user/watchableAttributes Method: GET Description: Get the list of attributes which can be supplied to the watchedAttributes property of the incident. Security: apikeyAuth Responses: 200: OK ``` ```curl curl -i -X GET \ http://urlscan.io/api/v1/user/watchableAttributes \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### urlscan.io API Introduction and External Resources Source: https://docs.urlscan.io/apis/urlscan-openapi/subscriptions/subscriptionsdelete Provides an overview of the urlscan.io and urlscan Pro APIs, noting authentication requirements and suggesting existing integrations. Also lists useful external resources related to urlscan.io, including the website, documentation hub, and API status. ```APIDOC API Endpoints for urlscan.io and urlscan Pro. Most of these API endpoints require authentication. External Resources: * urlscan.io website: https://urlscan.io * urlscan.io Documentation Hub: https://docs.urlscan.io * urlscan.io API Status: https://status.urlscan.io Servers: http://urlscan.io/ ``` -------------------------------- ### Example: Get Saved Searches with cURL Source: https://docs.urlscan.io/apis/urlscan-openapi/saved-searches/savedsearchesresult A cURL command example demonstrating how to make an authenticated GET request to the urlscan.io API to fetch the user's saved searches. Replace 'YOUR_API_KEY_HERE' with an actual API key. ```curl curl -i -X GET \ http://urlscan.io/api/v1/user/searches/ \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### API Reference: Get Saved Searches Response Example Source: https://docs.urlscan.io/apis/urlscan-openapi/saved-searches/savedsearchesdelete An example of a successful HTTP 200 response for the 'Get Saved Searches' API call. It illustrates the expected JSON structure, which includes an array of 'searches' objects conforming to the 'savedSearchSchema'. ```APIDOC HTTP Status: 200 (Successful response) Content-Type: application/json Body: searches: Array of objects (savedSearchSchema) - Show 12 array properties Example JSON: { "searches": [ { … } ] } ``` -------------------------------- ### urlscan.io API Reference Overview Source: https://docs.urlscan.io/apis/urlscan-openapi/search/similarsearch This section provides a structured overview of the urlscan.io API, detailing its introduction, external resources, and main functional groups: Generic, Scanning, and Search. It lists the primary endpoints available within each category. ```APIDOC urlscan.io APIs (1.0.0) Introduction: API endpoints for urlscan.io and urlscan Pro. Most of these API endpoints require authentication. The fastest way to start working with our APIs is by using one of the many existing commercial or open-source integrations. External Resources: - urlscan.io website (https://urlscan.io) - urlscan.io Documentation Hub (https://docs.urlscan.io) - urlscan.io API Status (https://status.urlscan.io) Servers: http://urlscan.io/ Generic API Endpoints: Description: API endpoints related to the platform or the user account. Operations: - GET /api/v1/quotas - GET /api/v1/pro/username Scanning API Endpoints: Description: These APIs allow URLs to be scanned and the results of the scans to be retrieved. Operations: - POST /api/v1/scan - GET /api/v1/result/{scanId}/ - GET /screenshots/{scanId}.png - GET /dom/{scanId}/ - GET /api/v1/availableCountries - GET /api/v1/userAgents Search API Endpoints (Overview): Description: The Search API allows users to search for historically website scans, hostnames, domains, TLS certificates and incidents. Operations: - GET /api/v1/search - GET /api/v1/pro/result/{scanId}/similar/ - GET /api/v1/pro/phishfeedDeprecated ``` -------------------------------- ### cURL Example to Get a urlscan Pro Incident Source: https://docs.urlscan.io/apis/urlscan-openapi/incidents/closeincident Demonstrates how to use cURL to send a GET request to the urlscan Pro API to retrieve details for a specific incident. The example includes passing the incidentId in the URL path and setting the api-key header. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/user/incidents/{incidentId}' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### cURL Example: Get Saved Search Results Source: https://docs.urlscan.io/apis/urlscan-openapi/saved-searches/savedsearchesresult Example cURL command to fetch results for a specific saved search from the urlscan.io API. This command demonstrates how to perform a GET request to the specified endpoint and how to include the API key in the 'api-key' header for authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/user/searches/{{searchId}}/results/' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Get Watchable Attributes API Endpoint and Curl Example Source: https://docs.urlscan.io/apis/urlscan-openapi/incidents/copyincident Documents the API endpoint for retrieving a list of attributes that can be supplied to the `watchedAttributes` property of an incident. This operation uses API key authentication and does not require any path or body parameters. The curl example shows how to perform the GET request. ```APIDOC Method: GET Endpoint: /api/v1/user/watchableAttributes Description: Get the list of attributes which can be supplied to the watchedAttributes property of the incident. Security: apikeyAuth Responses: 200: OK ``` ```curl curl -i -X GET \ http://urlscan.io/api/v1/user/watchableAttributes \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Get Incident Details API Reference and curl Example Source: https://docs.urlscan.io/apis/urlscan-openapi/incidents/updateincident This snippet describes how to retrieve the details of a specific incident using its ID via the urlscan Pro API. It provides the API endpoint, required path parameters, and a `curl` command example demonstrating a GET request with an API key and the incident ID. ```APIDOC GET /api/v1/user/incidents/{incidentId} Security: apikeyAuth Path Parameters: incidentId: string (required) - ID of ``` -------------------------------- ### Get Incident States API Endpoint and Curl Example Source: https://docs.urlscan.io/apis/urlscan-openapi/incidents/copyincident Documents the API endpoint for retrieving individual incident states for a specified incident ID. This operation uses API key authentication and requires the incident ID as a path parameter. A curl example demonstrates the GET request, and a JSON snippet illustrates the expected response structure. ```APIDOC Method: GET Endpoint: /api/v1/user/incidentstates/{incidentId}/ Description: Retrieve individual incident states of an incident. Security: apikeyAuth Path Parameters: incidentId: string (required) - ID of incident Responses: 200: OK Body: application/json incidentstates: Array of objects ``` ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/user/incidentstates/{incidentId}/' \ -H 'api-key: YOUR_API_KEY_HERE' ``` ```JSON { "incidentstates": [ { … } ] } ``` -------------------------------- ### API Response Structure and Example (200 OK) Source: https://docs.urlscan.io/apis/urlscan-openapi/hostnames Details the structure of a successful API response (HTTP 200 OK), including the `pageState` field for pagination and the `results` array. An example JSON payload is provided to illustrate the expected format. ```APIDOC Successful Response (200 OK): Body: application/json pageState: string Description: If the pageState field is set then there are additional results available. Repeat the API call with the pageState value to get the next batch of results. results: Array of objects Description: Contains the primary data results. ``` ```JSON { "example": { "results": [ ... ], "pageState": "xxx" } } ``` -------------------------------- ### Curl Example: Get Live Scan Resource Source: https://docs.urlscan.io/apis/urlscan-openapi/live-scanning/livescanscanners Example `curl` command to retrieve a specific resource (e.g., scan result) from a live scan using its ID and type. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/livescan/de01/result/{resourceId}' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Get Subscription Search Results using cURL Source: https://docs.urlscan.io/apis/urlscan-openapi/subscriptions Example cURL command to retrieve search results for a given subscription ID and datasource. It shows how to send a GET request with an API key for authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/user/subscriptions/{{subscriptionId}}/results/scans/' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Create Subscription using cURL Source: https://docs.urlscan.io/apis/urlscan-openapi/subscriptions Example cURL command to create a new subscription. It demonstrates how to send a POST request with a JSON payload containing subscription details and an API key for authentication. ```curl curl -i -X POST \ http://urlscan.io/api/v1/user/subscriptions/ \ -H 'Content-Type: application/json' \ -H 'api-key: YOUR_API_KEY_HERE' \ -d '{ "subscription": { "_id": "{{subscriptionId}}", "searchIds": [ "{{searchId}}" ], "frequency": "daily", "emailAddresses": [ "test@urlscan.io" ], "name": "Test Subscription", "description": "Subscription for testing purposes", "isActive": true, "ignoreTime": false } }' ``` -------------------------------- ### urlscan.io API Reference and Endpoints Overview Source: https://docs.urlscan.io/apis/urlscan-openapi/scanning/resultapi This section provides a structured overview of the urlscan.io API, including general information, available endpoints for generic operations and URL scanning, and detailed specifications for submitting a scan. It covers request parameters, response formats, and example responses. ```APIDOC urlscan.io APIs (1.0.0) Introduction: API endpoints for urlscan.io and urlscan Pro. Most require authentication. External Resources: - urlscan.io website (https://urlscan.io) - urlscan.io Documentation Hub (https://docs.urlscan.io) - urlscan.io API Status (https://status.urlscan.io) Servers: - http://urlscan.io/ Generic Endpoints: - GET /api/v1/quotas - GET /api/v1/pro/username Scanning Endpoints: - POST /api/v1/scan Description: Submit a URL to be scanned and control options. Security: apikeyAuth Request Body (application/json, required): url (string, uri, required): The URL to be scanned. Example: "https://urlscan.io" visibility (string, default: "public", enum: "public", "unlisted", "private"): Intended visibility of the final scan result. Example: "public" country (string): Country to scan from (ISO 3166-1 alpha-2). Example: "de" tags (Array of strings, <= 10 items): User-defined tags. Example: ["postman","testing"] overrideSafety (boolean): Disables reclassification of URLs with potential PII. referer (string): Override HTTP referer. customagent (string): Override HTTP User-Agent. Responses: 200 OK (application/json): uuid (string, uuid): UUID for scan result ($scanId). country (string): Country for scanning. visibility (string): Determined visibility for scan. url (string, uri): Determined URL being scanned. Example Response: { "uuid": "68e26c59-2eae-437b-aeb1-cf750fafe7d7", "visibility": "public", "url": "https://urlscan.io/", "country": "de" } - GET /api/v1/result/{scanId}/ - GET /screenshots/{scanId}.png - GET /dom/{scanId}/ - GET /api/v1/availableCountries - GET /api/v1/userAgents ``` -------------------------------- ### Get Subscription Search Results using cURL Source: https://docs.urlscan.io/apis/urlscan-openapi/subscriptions/subscriptionsresults Example cURL command to retrieve search results for a specific subscription and datasource. This command demonstrates how to send a GET request with the subscription ID and datasource in the path. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/user/subscriptions/{{subscriptionId}}/results/scans/' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Live Scanning API Endpoints (urlscan Pro) Reference Source: https://docs.urlscan.io/apis/urlscan-openapi/subscriptions This section details urlscan Pro's Live Scanning APIs, which allow users to scan websites from various geographical locations and with different device settings. Operations include listing available scanners, creating tasks, initiating scans, and managing existing live scans. ```APIDOC Live Scanning: get /api/v1/livescan/scanners/ post /api/v1/livescan/{scannerId}/task/ post /api/v1/livescan/{scannerId}/scan/ get /api/v1/livescan/{scannerId}/{resourceType}/{resourceId} put /api/v1/livescan/{scannerId}/{scanId}/ delete /api/v1/livescan/{scannerId}/{scanId}/ ``` -------------------------------- ### API Reference: Create Subscription Endpoint Source: https://docs.urlscan.io/apis/urlscan-openapi/subscriptions/channelslist Details the POST endpoint for creating new user subscriptions, including request body schema, required fields, and example values. Authentication via API key is required. ```APIDOC Method: POST Endpoint: /api/v1/user/subscriptions/ Security: apikeyAuth Request Body (application/json): subscription (object, required): _id (string): Subscription ID (Example: {{subscriptionId}}) searchIds (Array of strings, required): Array of search IDs (Example: ["{{searchId}}"]) frequency (string, required): Frequency of notifications (Enum: "live", "hourly", "daily", Example: "daily") emailAddresses (Array of strings (email), required): Email addresses for notifications (Example: ["test@urlscan.io"]) name (string, required): Name of the subscription (Example: "Test Subscription") description (string): Description of the subscription (Example: "Subscription for testing purposes") isActive (boolean, required): Whether the subscription is active (Example: true) ignoreTime (boolean, required): Whether to ignore time constraints (Example: false) Response (200 OK, application/json): uuid (string (uuid), required): UUID of the created subscription (Example: "10dae531-a98a-42fc-8c6f-cb8610ec0c10") ``` -------------------------------- ### Get Available Brands API Call with curl Source: https://docs.urlscan.io/apis/urlscan-openapi/brands/availablebrands This example demonstrates how to make an authenticated GET request using curl to retrieve a list of brands tracked by urlscan.io for phishing detection. Replace 'YOUR_API_KEY_HERE' with your actual API key. ```curl curl -i -X GET \ http://urlscan.io/api/v1/pro/availableBrands \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### urlscan.io API Endpoints Overview Source: https://docs.urlscan.io/apis/urlscan-openapi/scanning Lists the main API endpoints available for urlscan.io, categorized into Generic (platform/account) and Scanning (URL submission/retrieval) operations, along with their HTTP methods and paths. ```APIDOC ## Generic API endpoints related to the platform or the user account. Operations get /api/v1/quotas get /api/v1/pro/username ## Scanning These APIs allow URLs to be scanned and the results of the scans to be retrieved. Operations post /api/v1/scan get /api/v1/result/{scanId}/ get /screenshots/{scanId}.png get /dom/{scanId}/ get /api/v1/availableCountries get /api/v1/userAgents ``` -------------------------------- ### urlscan.io API Overview and Generic Endpoints Source: https://docs.urlscan.io/apis/urlscan-openapi/scanning/submitscan Provides an overview of the urlscan.io API, including authentication requirements and lists generic endpoints for platform and user account information. ```APIDOC urlscan.io APIs (1.0.0) Introduction: API endpoints for urlscan.io and urlscan Pro. Most of these API endpoints require authentication. External Resources: - urlscan.io website: https://urlscan.io - urlscan.io Documentation Hub: https://docs.urlscan.io - urlscan.io API Status: https://status.urlscan.io Servers: http://urlscan.io/ Generic Endpoints: - GET /api/v1/quotas: Retrieve user quota information. - GET /api/v1/pro/username: Retrieve urlscan Pro username details. ``` -------------------------------- ### Get urlscan Pro Incident using cURL Source: https://docs.urlscan.io/apis/urlscan-openapi/incidents/getincident Example cURL command to retrieve details for a specific incident in urlscan Pro. It sends a GET request to the incident endpoint, including the incident ID in the URL and an API key for authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/user/incidents/{incidentId}' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Get urlscan Pro Incident with cURL Source: https://docs.urlscan.io/apis/urlscan-openapi/incidents/createincident Example `curl` command to retrieve details for a specific incident in urlscan Pro. This command sends a GET request to the incident endpoint, using the incident's ID and an API key for authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/user/incidents/{incidentId}' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Example cURL Request to Submit a URL Scan Source: https://docs.urlscan.io/apis/urlscan-openapi/scanning/submitscan Demonstrates how to submit a URL for scanning using a cURL command. This example includes setting the content type, API key, and a JSON payload with the target URL, visibility, country, and custom tags. ```curl curl -i -X POST \ http://urlscan.io/api/v1/scan \ -H 'Content-Type: application/json' \ -H 'api-key: YOUR_API_KEY_HERE' \ -d '{ "url": "https://urlscan.io", "visibility": "public", "country": "de", "tags": [ "postman", "testing" ] }' ``` -------------------------------- ### Example: Successful JSON Response for Get Saved Searches Source: https://docs.urlscan.io/apis/urlscan-openapi/saved-searches/savedsearchesresult An example of the JSON payload returned upon a successful (HTTP 200) request to retrieve saved searches. The response contains a 'searches' array, where each element is a saved search object. ```json { "searches": [ { } ] } ``` -------------------------------- ### urlscan.io API Endpoints Overview Source: https://docs.urlscan.io/apis/urlscan-openapi/scanning/screenshot Provides a high-level overview of the available API endpoints grouped by functionality, including Generic and Scanning operations, detailing the HTTP methods and paths for each. ```APIDOC ## Generic API endpoints related to the platform or the user account. Operations get /api/v1/quotas get /api/v1/pro/username ## Scanning These APIs allow URLs to be scanned and the results of the scans to be retrieved. Operations post /api/v1/scan get /api/v1/result/{scanId}/ get /screenshots/{scanId}.png get /dom/{scanId}/ get /api/v1/availableCountries get /api/v1/userAgents ``` -------------------------------- ### API: Get Saved Search Results Request Source: https://docs.urlscan.io/apis/urlscan-openapi/saved-searches Defines the API request for retrieving results of a specific Saved Search. It specifies the GET method, path, required authentication, and details for the 'searchId' path parameter, including its type, enumeration values, and an example. ```APIDOC Request: Method: GET Path: /api/v1/user/searches/{searchId}/results/ Authentication: apikeyAuth Parameters: searchId: Type: string Required: true Description: The ID of the saved search. Enum: "scans", "hostnames" Example: {{searchId}} Responses: 200: Successful response ``` -------------------------------- ### Get Incident using cURL (urlscan Pro) Source: https://docs.urlscan.io/apis/urlscan-openapi/incidents/forkincident This example demonstrates how to retrieve details for a specific incident using a cURL command. It shows how to send a GET request to the incident endpoint, including the incident ID as a path parameter and the necessary 'api-key' header for authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/user/incidents/{incidentId}' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Retrieve Live Scanners API Endpoint and Curl Example Source: https://docs.urlscan.io/apis/urlscan-openapi/live-scanning/livescanscanners This API endpoint provides a list of available Live Scanning nodes along with their current metadata. It requires API key authentication. A curl example demonstrates how to make a GET request to this endpoint. ```APIDOC Live Scanners Request API Endpoint to a list of available Live Scanning nodes along with their current metadata. SecurityView details apikeyAuth get /api/v1/livescan/scanners/ http://urlscan.io/api/v1/livescan/scanners/ Responses 1. 200 Successful response ``` ```curl curl -i -X GET \ http://urlscan.io/api/v1/livescan/scanners/ \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### urlscan.io Search API: Request Details and Parameters Source: https://docs.urlscan.io/apis/urlscan-openapi/search Detailed documentation for the urlscan.io Search API, explaining its purpose, pagination mechanism, security requirements, and all available query parameters with their types, descriptions, and examples. ```APIDOC Search API: Purpose: Find historical scans performed on the platform. Pro Features: Some data sources and searchable fields are only available on urlscan Pro. Pagination: - Exact count up to 10,000 results in 'total' property. - 'has_more' flag is true if more than 10,000 results. - Use 'sort' value of the last (oldest) scan result as 'search_after' parameter for next batch. Visibility: Finds Public, Unlisted, and Private scans (by user/teams). Query Syntax: Refer to https://urlscan.io/docs/search/ Security: apikeyAuth Query Parameters: q: Type: string Description: Search Query (Elasticsearch Query String) Example: q=page.domain:example.com size: Type: integer Constraints: <= 10000 Description: Number of results to return Example: size=100 search_after: Type: string Description: For retrieving the next batch of results, send the value of the 'sort' attribute of the last (oldest) result you received (comma-separated) from the previous call. datasource: Type: string Description: Datasources to search: scans (urlscan.io), hostnames, incidents, notifications, certificates (urlscan Pro) Enum: "scans", "hostnames", "incidents", "notifications", "certificates" Endpoint: GET /api/v1/search Base URL: http://urlscan.io/api/v1/search ``` -------------------------------- ### Get Subscription Search Results using cURL Source: https://docs.urlscan.io/apis/urlscan-openapi/subscriptions/channelslist Example cURL command to retrieve search results for a subscription. It sends a GET request to the `/api/v1/user/subscriptions/{subscriptionId}/results/{datasource}/` endpoint and requires an API key for authentication. This endpoint typically responds with a redirect (HTTP 302). ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/user/subscriptions/{{subscriptionId}}/results/scans/' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### Get Incident Details with cURL for urlscan Pro API Source: https://docs.urlscan.io/apis/urlscan-openapi/incidents/restartincident This cURL example demonstrates how to retrieve the details of a specific incident from urlscan Pro. It sends a GET request to the `/api/v1/user/incidents/{incidentId}` endpoint, replacing `{incidentId}` with the actual incident ID. An API key is required for authentication. ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/user/incidents/{incidentId}' \ -H 'api-key: YOUR_API_KEY_HERE' ``` -------------------------------- ### API Documentation for urlscan Pro Live Scanning Source: https://docs.urlscan.io/apis/urlscan-openapi/search/similarsearch Documents the urlscan Pro API endpoints for live scanning, allowing users to scan websites from different geographical locations and device settings. It lists various GET, POST, PUT, and DELETE operations related to scanners and tasks. ```APIDOC Operations for Live Scanning: GET /api/v1/livescan/scanners/ POST /api/v1/livescan/{scannerId}/task/ POST /api/v1/livescan/{scannerId}/scan/ GET /api/v1/livescan/{scannerId}/{resourceType}/{resourceId} PUT /api/v1/livescan/{scannerId}/{scanId}/ DELETE /api/v1/livescan/{scannerId}/{scanId}/ ``` -------------------------------- ### Get Scan Results API Endpoint and Example Source: https://docs.urlscan.io/apis/urlscan-openapi/scanning/screenshot This section details the API endpoint for retrieving scan results from urlscan.io using a scan ID. It includes the request method, path parameters, and a `curl` example for making the API call. The recommended polling strategy is also outlined. ```APIDOC Endpoint: GET /api/v1/result/{scanId}/ Description: Poll for scan results using a scan ID. Authentication: apikeyAuth Path Parameters: scanId: Type: string (uuid) Required: true Description: UUID of the scan result. Responses: 200 OK (application/json): Description: Successful retrieval of scan data. Body: data: object (Raw scan data) stats: object (Statistical analysis) meta: object (Enriched metadata) task: object (Scan task information) page: object (Scanned page information) lists: object (Aggregated lists) verdicts: object (Security verdicts) submitter: object (Submitter information) ``` ```curl curl -i -X GET \ 'http://urlscan.io/api/v1/result/{scanId}/' \ -H 'api-key: YOUR_API_KEY_HERE' ``` ```JSON { "data": { "requests": [ … ], "cookies": [ … ], "console": [ … ], "links": [ … ], "timing": { … }, "globals": [ … ] }, "stats": { "resourceStats": [ … ], "protocolStats": [ … ], "tlsStats": [ … ], "serverStats": [ … ], "domainStats": [ … ], "regDomainStats": [ … ], "secureRequests": 55, "securePercentage": 100, "IPv6Percentage": 80, "uniqCountries": 1, "totalLinks": 10, "malicious": 0, "adBlocked": 0, "ipStats": [ … ] }, "meta": { "processors": { … } }, "task": { "uuid": "68e26c59-2eae-437b-aeb1-cf750fafe7d7", "time": "2023-08-18T10:27:47.342Z", "url": "https://urlscan.io/", "visibility": "public", "method": "api", "source": "d1675d21", "tags": [], "reportURL": "https://urlscan.io/result/68e26c59-2eae-437b-aeb1-cf750fafe7d7/", "screenshotURL": "https://urlscan.io/screenshots/68e26c59-2eae-437b-aeb1-cf750fafe7d7.png", "domURL": "https://urlscan.io/dom/68e26c59-2eae-437b-aeb1-cf750fafe7d7/" }, "page": { "url": "https://urlscan.io/", "domain": "urlscan.io", "country": "DE", "city": "", "server": "nginx", "ip": "49.12.22.106", "asn": "AS24940", "asnname": "HETZNER-AS, DE" }, "lists": { "ips": [ … ], "countries": [ … ], "asns": [ … ], "domains": [ … ], "servers": [ … ], "urls": [ … ], "linkDomains": [ … ], "certificates": [ … ], "hashes": [ … ] }, "verdicts": { "overall": { … }, "urlscan": { … }, "engines": { … }, "community": { … } }, "submitter": { "country": "US" } } ```