$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "selectors": [
< "table table tr[class='athing'] td:nth-child(3) > span > a"
< ],
< "scrapers": "// (input) => ({\r\n// title: {\r\n// selectors: [\"table table tr[class='athing'] td:nth-child(3) > span > a\"],\r\n// extractor: node => node.innerText,\r\n// },\r\n// links: {\r\n// contents: {\r\n// selectors: [\"table table tr[class='athing'] td:nth-child(3) > span > a\"],\r\n// extractor: node => node.href,\r\n// },\r\n// comments: {\r\n// selectors: [\"table table tr td[class='subtext'] span a[href^=item]:first-child\"],\r\n// extractor: node => node.href,\r\n// },\r\n// },\r\n// })",
< "limits.alerts": 10,
< "limits.results": 100,
< "filters": "// [\r\n// \t({title}) => title.length > 1, // absolute\r\n// \t({links}) => links.contents.includes('http'), // absolute\r\n// \t({price}, {price: oldPrice}) => price < oldPrice, // relative\r\n// ]",
< "matcher": "// ({exclude, include}) => ({include}) // ignore fields in comparison with records\r\n// ({price, ...match}) => match // e.g. ignore dynamic field \"price\" from matching",
< "pages.retries": 3,
< "hooks.load": "// async page => {\n// \tawait page.click('button[name=\"cookie-consent\"]').catch(error => null);\n// }",
< "proxy": {
< "useApifyProxy": false
< }
<}
<EOF
$curl "https://api.apify.com/v2/acts/cyberfly~listingmonitor/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'