Update a crawler
const url = 'https://dashboard.quantcdn.io/api/v2/organizations/test-org/projects/test-project/crawlers/00000000-0000-0000-0000-000000000000';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Test Crawler","domain":"test-domain.com","browser_mode":false,"urls":["/","/about","/contact"],"start_urls":["/","/blog"],"headers":{"Authorization":"Bearer token123","X-Custom-Header":"value"},"exclude":["/admin/*","/private/*"],"include":["/blog/*","/products/*"],"webhook_url":"https://example.com/webhook","webhook_auth_header":"Bearer token123","webhook_extra_vars":"key1=value1&key2=value2","workers":2,"delay":4,"depth":-1,"max_hits":0,"max_html":50,"status_ok":[200,201],"sitemap":[{"url":"/sitemap.xml","recursive":true}],"allowed_domains":["example.com","assets.example.com"],"user_agent":"Mozilla/5.0...","assets":{"network_intercept":{"enabled":true,"timeout":30,"execute_js":false},"parser":{"enabled":true}},"max_errors":100}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://dashboard.quantcdn.io/api/v2/organizations/test-org/projects/test-project/crawlers/00000000-0000-0000-0000-000000000000 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Test Crawler", "domain": "test-domain.com", "browser_mode": false, "urls": [ "/", "/about", "/contact" ], "start_urls": [ "/", "/blog" ], "headers": { "Authorization": "Bearer token123", "X-Custom-Header": "value" }, "exclude": [ "/admin/*", "/private/*" ], "include": [ "/blog/*", "/products/*" ], "webhook_url": "https://example.com/webhook", "webhook_auth_header": "Bearer token123", "webhook_extra_vars": "key1=value1&key2=value2", "workers": 2, "delay": 4, "depth": -1, "max_hits": 0, "max_html": 50, "status_ok": [ 200, 201 ], "sitemap": [ { "url": "/sitemap.xml", "recursive": true } ], "allowed_domains": [ "example.com", "assets.example.com" ], "user_agent": "Mozilla/5.0...", "assets": { "network_intercept": { "enabled": true, "timeout": 30, "execute_js": false }, "parser": { "enabled": true } }, "max_errors": 100 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization identifier
Example
test-orgProject identifier
Example
test-projectThe UUID of the crawler
Example
00000000-0000-0000-0000-000000000000Request Bodyrequired
Section titled “Request Bodyrequired”object
Crawler name
Example
Test CrawlerDomain to crawl
Example
test-domain.comEnable browser mode
Example
falseURLs to crawl
Example
[ "/", "/about", "/contact"]Starting URLs for crawl
Example
[ "/", "/blog"]Custom headers
object
Example
{ "Authorization": "Bearer token123", "X-Custom-Header": "value"}URL patterns to exclude (regex)
Example
[ "/admin/*", "/private/*"]URL patterns to include (regex)
Example
[ "/blog/*", "/products/*"]Webhook URL for notifications
Example
https://example.com/webhookAuthorization header for webhook
Example
Bearer token123Extra variables for webhook
Example
key1=value1&key2=value2Number of concurrent workers (default: 2, non-default requires verification)
Example
2Delay between requests in seconds (default: 4, non-default requires verification)
Example
4Maximum crawl depth, -1 for unlimited
Example
-1Maximum total requests, 0 for unlimited (default: 0, non-default requires verification)
Example
0Maximum HTML pages, 0 for unlimited (default: org limit, non-default requires verification)
Example
50HTTP status codes that will result in content being captured and pushed to Quant
Example
[ 200, 201]Sitemap configuration
object
Sitemap URL
Example
/sitemap.xmlRecursively follow sitemap links
Example
trueExample
[ { "url": "/sitemap.xml", "recursive": true }]Allowed domains for multi-domain crawling, automatically enables merge_domains
Example
[ "example.com", "assets.example.com"]Custom user agent, only when browser_mode is false
Example
Mozilla/5.0...Asset harvesting configuration
object
Network intercept configuration for asset collection
object
Enable network intercept
Example
trueRequest timeout in seconds
Example
30Execute JavaScript during asset collection
Example
falseParser configuration for asset extraction
object
Enable parser
Example
trueExample
{ "network_intercept": { "enabled": true, "timeout": 30, "execute_js": false }, "parser": { "enabled": true }}Maximum errors before stopping crawl
Example
100Responses
Section titled “Responses”The request has succeeded.
object
Crawler ID
Crawler name
Project ID
Crawler UUID
Crawler configuration (YAML)
Crawler domain
Domain verification status
URLs list (YAML)
Webhook URL for notifications
Authorization header for webhook
Extra variables for webhook
Browser mode enabled
Number of concurrent workers
Delay between requests in seconds
Maximum crawl depth
Maximum total requests
Maximum HTML pages
HTTP status codes for content capture
Custom user agent
Maximum errors before stopping
Starting URLs
URLs list
Custom headers
object
URL patterns to exclude
URL patterns to include
Sitemap configuration
object
Sitemap URL
Recursively follow sitemap links
Allowed domains
Asset harvesting configuration
object
Network intercept configuration for asset collection
object
Enable network intercept
Request timeout in seconds
Execute JavaScript during asset collection
Parser configuration for asset extraction
object
Enable parser
Creation timestamp
Last update timestamp
Deletion timestamp
Example
{ "id": 456, "name": "Test Crawler", "project_id": 789, "uuid": "550e8400-e29b-41d4-a716-446655440000", "config": "domain: test-domain.com\\nconfig:\\n max_html: 100\\n browser_mode: false", "domain": "test-domain.com", "domain_verified": 0, "urls_list": "single_url:\\n - /\\n - /about\\n - /contact", "webhook_url": "https://example.com/webhook", "webhook_auth_header": "Bearer token123", "webhook_extra_vars": "key1=value1&key2=value2", "browser_mode": false, "workers": 2, "delay": 4, "depth": -1, "max_hits": 0, "max_html": 50, "status_ok": [ 200 ], "user_agent": "Mozilla/5.0...", "max_errors": 100, "start_urls": [ "/", "/blog" ], "urls": [ "/", "/about" ], "headers": { "Authorization": "Bearer token" }, "exclude": [ "/admin/*" ], "include": [ "/blog/*" ], "sitemap": [ { "url": "/sitemap.xml", "recursive": true } ], "allowed_domains": [ "example.com" ], "assets": { "network_intercept": { "enabled": true, "timeout": 30, "execute_js": false }, "parser": { "enabled": true } }, "created_at": "2024-01-20T09:15:00Z", "updated_at": "2024-10-11T16:45:00Z"}The server could not understand the request due to invalid syntax.
object
Error message
Error flag
Example
{ "message": "The requested resource was not found", "error": true}Access is forbidden.
object
Error message
Error flag
Example
{ "message": "The requested resource was not found", "error": true}