$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "startUrls": [
< {
< "url": "https://news.ycombinator.com/"
< }
< ],
< "instructions": "Gets the post with the most points from the page and returns it as JSON in this format: \npostTitle\npostUrl\npointsCount",
< "model": "gpt-3.5-turbo",
< "includeUrlGlobs": [],
< "excludeUrlGlobs": [],
< "linkSelector": "a[href]",
< "initialCookies": [],
< "proxyConfiguration": {
< "useApifyProxy": true
< },
< "targetSelector": "",
< "removeElementsCssSelector": "script, style, noscript, path, svg, xlink",
< "skipGptGlobs": [],
< "schema": {
< "type": "object",
< "properties": {
< "title": {
< "type": "string",
< "description": "Page title"
< },
< "description": {
< "type": "string",
< "description": "Page description"
< }
< },
< "required": [
< "title",
< "description"
< ]
< },
< "schemaDescription": ""
<}
<EOF
$curl "https://api.apify.com/v2/acts/drobnikj~extended-gpt-scraper/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'