Crates.io | urlscan |
lib.rs | urlscan |
version | 0.3.0 |
source | src |
created_at | 2022-11-02 20:36:52.012466 |
updated_at | 2024-04-20 21:45:25.22976 |
description | URLScan.io API |
homepage | |
repository | https://github.com/Ix76y/urlscan-rs |
max_upload_size | |
id | 703736 |
size | 23,538 |
Provides an abstraction over the URLScan.io API. This library supports the following tasks:
Get Quota
Submit URL to be scanned
Get JSON Result of scan as String
Get DOM of previously scanner URL by UUID
Get Screenshot of page
Search functionality
let client = UrlScanClient::new("YOUR-API-KEY-HERE");
let response = client.get_quota();
match response {
Ok(quota) => println!("{}", quota),
_ => println!("We got an error..."),
}
let client = UrlScanClient::new(API_KEY);
let response = client.scan_url("www.url-you-want-to-check.rust", "public", vec![]);
match response {
Ok(submission) => println!("{}", submission),
_ => println!("We got an error..."),
}
Example Output:
Submission successful.
UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
View Result: https://urlscan.io/result/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/
let client = UrlScanClient::new(API_KEY);
// submit a URL to get a "submission" back or directly add the UUID:
let uuid = submission.uuid;
let response = client.get_dom(uuid);
match response {
Ok(dom) => println!("{}", dom),
_ => println!("There was an error, maybe scan is still running."),
}
How do I get a URLScan.io API Key? Create an URLScan.io account and then go to Settings & API to get your API key.
Is the URLScan.io API key free? Yes, URLScan.io has free API keys that are limited by time. If you reach the limit you can pay for unlimited requests.
License: MIT