$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "startUrls": [
< {
< "url": "https://crawlee.dev"
< }
< ],
< "maxCrawlingDepth": 1,
< "maxRequestsPerCrawl": 1,
< "requestTimeout": 30,
< "linkSelector": "a[href]",
< "linkPatterns": [
< ".*crawlee\\.dev.*"
< ],
< "pageFunction": "from typing import Any\nfrom crawlee.crawlers import PlaywrightCrawlingContext\n \nasync def page_function(context: PlaywrightCrawlingContext) -> Any:\n url = context.request.url\n title = await context.page.locator(\"title\").first.inner_text()\n return {'url': url, 'title': title}\n",
< "proxyConfiguration": {
< "useApifyProxy": true
< }
<}
<EOF
$curl "https://api.apify.com/v2/acts/josef.prochazka~camoufox-scraper/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'