$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "startUrls": [
< {
< "key": "START",
< "value": "https://apify.com/"
< }
< ],
< "crawlPurls": [
< {
< "key": "MY_LABEL",
< "value": "https://www.example.com/[.*]"
< }
< ],
< "clickableElementsSelector": "a:not([rel=nofollow])",
< "proxyConfiguration": {
< "useApifyProxy": true
< },
< "pageFunction": "function pageFunction(context) {\n // called on every page the crawler visits, use it to extract data from it\n var $ = context.jQuery;\n var result = {\n title: $('title').text(),\n myValue: $('TODO').text()\n };\n return result;\n}\n",
< "interceptRequest": "function interceptRequest(context, newRequest) {\n // called whenever the crawler finds a link to a new page,\n // use it to override default behavior\n return newRequest;\n}\n"
<}
<EOF
$curl "https://api.apify.com/v2/acts/barry8schneider~legacy-phantomjs-crawler/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'