$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "goalDescription": "Posts that beat their page's usual engagement, announce an offer or a launch, or show someone asking where to buy",
< "maxDiscoveryChargeUsd": 0.5,
< "maxPostsPerPage": 20,
< "sourceMode": "list",
< "itemsList": [
< {
< "post_id": "1001",
< "type": "photo",
< "url": "https://www.facebook.com/brightsidecoffee/posts/1001",
< "external_url": "https://brightsidecoffee.example/shop/spring-sale",
< "message": "Spring sale! 30% off all whole-bean bags with code SPRING30 until Sunday. Free shipping over $40.",
< "timestamp": 1759060800,
< "reactions_count": 1240,
< "comments_count": 188,
< "reshare_count": 214,
< "image": "https://example.com/img/1001.jpg",
< "author": {
< "name": "Brightside Coffee Roasters",
< "id": "100090000000001",
< "url": "https://www.facebook.com/brightsidecoffee"
< }
< },
< {
< "post_id": "1002",
< "type": "photo",
< "url": "https://www.facebook.com/brightsidecoffee/posts/1002",
< "message": "Good morning from the roastery!",
< "timestamp": 1759147200,
< "reactions_count": 210,
< "comments_count": 14,
< "reshare_count": 3,
< "image": "https://example.com/img/1002.jpg",
< "author": {
< "name": "Brightside Coffee Roasters",
< "id": "100090000000001",
< "url": "https://www.facebook.com/brightsidecoffee"
< }
< },
< {
< "post_id": "1003",
< "type": "photo",
< "url": "https://www.facebook.com/brightsidecoffee/posts/1003",
< "external_url": "https://brightsidecoffee.example/shop/ethiopia-guji",
< "message": "Introducing our new Ethiopia Guji single origin - now available online and in store.",
< "timestamp": 1759233600,
< "reactions_count": 640,
< "comments_count": 52,
< "reshare_count": 61,
< "image": "https://example.com/img/1003.jpg",
< "author": {
< "name": "Brightside Coffee Roasters",
< "id": "100090000000001",
< "url": "https://www.facebook.com/brightsidecoffee"
< }
< },
< {
< "post_id": "1004",
< "type": "video",
< "url": "https://www.facebook.com/brightsidecoffee/posts/1004",
< "message": "Behind the scenes: roasting day.",
< "timestamp": 1759320000,
< "reactions_count": 180,
< "comments_count": 9,
< "reshare_count": 2,
< "video": "https://example.com/vid/1004.mp4",
< "author": {
< "name": "Brightside Coffee Roasters",
< "id": "100090000000001",
< "url": "https://www.facebook.com/brightsidecoffee"
< }
< },
< {
< "post_id": "1005",
< "type": "status",
< "url": "https://www.facebook.com/brightsidecoffee/posts/1005",
< "message": "We're hiring a barista for our downtown cafe! Apply now at the counter or send us a message.",
< "timestamp": 1759406400,
< "reactions_count": 95,
< "comments_count": 31,
< "reshare_count": 18,
< "author": {
< "name": "Brightside Coffee Roasters",
< "id": "100090000000001",
< "url": "https://www.facebook.com/brightsidecoffee"
< }
< },
< {
< "post_id": "1006",
< "type": "status",
< "url": "https://www.facebook.com/brightsidecoffee/posts/1006",
< "message": "What's your go-to brew method? Tell us below!",
< "timestamp": 1759492800,
< "reactions_count": 260,
< "comments_count": 142,
< "reshare_count": 6,
< "author": {
< "name": "Brightside Coffee Roasters",
< "id": "100090000000001",
< "url": "https://www.facebook.com/brightsidecoffee"
< }
< },
< {
< "post_id": "2001",
< "type": "status",
< "url": "https://www.facebook.com/northwindbikes/posts/2001",
< "message": "Our shop is closed Monday for inventory. Back Tuesday at 9.",
< "timestamp": 1759579200,
< "reactions_count": 12,
< "comments_count": 1,
< "reshare_count": 0,
< "author": {
< "name": "Northwind Bikes",
< "id": "100090000000002",
< "url": "https://www.facebook.com/northwindbikes"
< }
< },
< {
< "post_id": "3001",
< "type": "status",
< "url": "https://www.facebook.com/groups/austinparents/posts/3001",
< "message": "Anyone know where I can buy a kids balance bike under $120 near Austin? Looking for recommendations!",
< "timestamp": 1759665600,
< "reactions_count": 9,
< "comments_count": 14,
< "reshare_count": 0,
< "keyword": "kids balance bike",
< "author": {
< "name": "Austin Parents Group",
< "id": "100090000000003",
< "url": "https://www.facebook.com/groups/austinparents"
< }
< }
< ]
<}
<EOF
$curl "https://api.apify.com/v2/actors/rich_minds~fb-page-post-tracker/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'