{
  "data": {
    "id": "UCn2n7fCJ1cUJfqpB",
    "actId": "ZJU4FGFGg9Z5yWgh9",
    "userId": "tnBVjt3CXmcUrEE3L",
    "startedAt": "2026-11-22T03:41:21.422Z",
    "finishedAt": "2026-11-22T03:41:24.428Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CI"
    },
    "stats": {
      "durationMillis": 2924,
      "runTimeSecs": 2.924,
      "computeUnits": 0.003248888888888889,
      "imageSizeBytes": 327254528
    },
    "options": {
      "useCache": true,
      "betaPackages": false,
      "memoryMbytes": 4096,
      "diskMbytes": 8192
    },
    "createdByOrganizationMemberUserId": "F2Aeb3gE2syjqz9xC",
    "exitCode": 0,
    "inputSchema": "{\n  \"title\": \"Reddit Front Page & AMA Monitor Input\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"mode\": {\n      \"title\": \"What to collect\",\n      \"type\": \"string\",\n      \"description\": \"Front page snapshots read Reddit's current r/popular or r/all listing by country and sort order. AMA mode finds AMA threads over a date window and returns question-and-answer pairs.\",\n      \"sectionCaption\": \"What to collect\",\n      \"sectionDescription\": \"Pick a mode, then fill the matching section below. No Reddit login, API key or proxy is required.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"frontPage\",\n        \"ama\"\n      ],\n      \"enumTitles\": [\n        \"Front page snapshots\",\n        \"AMA questions and answers\"\n      ],\n      \"default\": \"frontPage\",\n      \"prefill\": \"frontPage\"\n    },\n    \"maxItems\": {\n      \"title\": \"Maximum records\",\n      \"type\": \"integer\",\n      \"description\": \"Global stop control for the whole run. For front page it caps snapshot rows; for AMA it caps summaries, Q&A pairs and unanswered questions together.\",\n      \"default\": 300,\n      \"prefill\": 10,\n      \"minimum\": 1,\n      \"maximum\": 10000\n    },\n    \"feeds\": {\n      \"title\": \"Feeds (front page)\",\n      \"type\": \"array\",\n      \"description\": \"Which Reddit feeds to snapshot: popular (curated, supports country filtering for hot) and/or all. Reddit blocks the anonymous r/all Atom feed, so all rows fall back to a broad 25-community hot feed and are marked feedScope=multi-community.\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"example\": [\n        \"popular\",\n        \"all\"\n      ],\n      \"prefill\": [\n        \"popular\"\n      ],\n      \"sectionCaption\": \"Front page snapshots\",\n      \"sectionDescription\": \"These fields are used when mode is Front page snapshots. Country codes follow Reddit's geo_filter values, for example US, GB, DE, IN, CA, AU, FR, BR, MX, JP or GLOBAL.\",\n      \"default\": [\n        \"popular\"\n      ]\n    },\n    \"countries\": {\n      \"title\": \"Countries (front page)\",\n      \"type\": \"array\",\n      \"description\": \"Reddit country codes for the r/popular hot feed, for example US, GB, DE, IN, BR, MX, JP. Use GLOBAL or leave empty for worldwide. Reddit applies geo filtering to hot only; rising, top, new and r/all rows are worldwide.\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"example\": [\n        \"US\",\n        \"GB\",\n        \"DE\"\n      ],\n      \"default\": [\n        \"GLOBAL\"\n      ]\n    },\n    \"sort\": {\n      \"title\": \"Sort order (front page)\",\n      \"type\": \"string\",\n      \"description\": \"Reddit's current feed order: hot, rising, top (over the time window below) or new. Country filtering applies to hot; other orders use the worldwide feed.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"hot\",\n        \"rising\",\n        \"top\",\n        \"new\"\n      ],\n      \"enumTitles\": [\n        \"Hot\",\n        \"Rising\",\n        \"Top\",\n        \"New\"\n      ],\n      \"default\": \"hot\",\n      \"prefill\": \"hot\"\n    },\n    \"timeFilter\": {\n      \"title\": \"Top time window (front page)\",\n      \"type\": \"string\",\n      \"description\": \"Ranking window used only when sort is Top.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"hour\",\n        \"day\",\n        \"week\",\n        \"month\",\n        \"year\",\n        \"all\"\n      ],\n      \"enumTitles\": [\n        \"Past hour\",\n        \"Past day\",\n        \"Past week\",\n        \"Past month\",\n        \"Past year\",\n        \"All time\"\n      ],\n      \"default\": \"day\",\n      \"prefill\": \"day\"\n    },\n    \"snapshots\": {\n      \"title\": \"Repeated snapshots (front page)\",\n      \"type\": \"integer\",\n      \"description\": \"How many times to read the selected feeds. Use more than 1 to compare countries or capture rank changes over time. Each row carries its snapshot number, rank and rank change.\",\n      \"default\": 1,\n      \"prefill\": 1,\n      \"minimum\": 1,\n      \"maximum\": 10\n    },\n    \"snapshotIntervalSecs\": {\n      \"title\": \"Seconds between snapshots (front page)\",\n      \"type\": \"integer\",\n      \"description\": \"Wait time between repeated snapshots. Ignored when snapshots is 1.\",\n      \"default\": 30,\n      \"prefill\": 30,\n      \"minimum\": 0,\n      \"maximum\": 900\n    },\n    \"includeNSFW\": {\n      \"title\": \"Include NSFW posts\",\n      \"type\": \"boolean\",\n      \"description\": \"When off, posts known to be over-18 are skipped. RSS rows without a known NSFW flag are kept because the source does not report it.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"minScore\": {\n      \"title\": \"Minimum score (front page)\",\n      \"type\": \"integer\",\n      \"description\": \"Keep only posts whose Arctic Shift score is at least this value. Rows without a score (archive enrichment unavailable) are skipped when this filter is set.\",\n      \"minimum\": -1000000,\n      \"maximum\": 1000000\n    },\n    \"amaSubreddits\": {\n      \"title\": \"AMA subreddits\",\n      \"type\": \"array\",\n      \"description\": \"AMA-style communities to search, for example IAmA, CasualIAmA or AMA. Accepts bare names or r/ names.\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"example\": [\n        \"IAmA\",\n        \"CasualIAmA\"\n      ],\n      \"prefill\": [\n        \"IAmA\"\n      ],\n      \"sectionCaption\": \"AMA questions and answers\",\n      \"sectionDescription\": \"These fields are used when mode is AMA questions and answers. Question-and-answer pairs come from the full public comment thread.\",\n      \"default\": [\n        \"IAmA\"\n      ]\n    },\n    \"amaKeyword\": {\n      \"title\": \"Keyword filter (AMA)\",\n      \"type\": \"string\",\n      \"description\": \"Only keep AMAs whose title or body contains every word of this keyword. Leave empty to keep all AMAs in the selected communities.\",\n      \"editor\": \"textfield\",\n      \"example\": \"doctor\"\n    },\n    \"amaSort\": {\n      \"title\": \"AMA order\",\n      \"type\": \"string\",\n      \"description\": \"Order the discovered AMAs before reading their threads: newest first, highest score, or most comments.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"new\",\n        \"top\",\n        \"comments\"\n      ],\n      \"enumTitles\": [\n        \"Newest first\",\n        \"Highest score\",\n        \"Most comments\"\n      ],\n      \"default\": \"comments\",\n      \"prefill\": \"comments\"\n    },\n    \"amaPeriod\": {\n      \"title\": \"AMA date window\",\n      \"type\": \"string\",\n      \"description\": \"How far back to look for AMAs. Ignored when postedAfter or postedBefore is set.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"hour\",\n        \"day\",\n        \"week\",\n        \"month\",\n        \"year\",\n        \"all\"\n      ],\n      \"enumTitles\": [\n        \"Past hour\",\n        \"Past day\",\n        \"Past week\",\n        \"Past month\",\n        \"Past year\",\n        \"All time (recent scan)\"\n      ],\n      \"default\": \"week\",\n      \"prefill\": \"week\"\n    },\n    \"postedAfter\": {\n      \"title\": \"AMAs created on or after\",\n      \"type\": \"string\",\n      \"description\": \"Optional explicit start date or ISO date-time, for example 2026-11-01. Overrides the AMA date window start.\",\n      \"editor\": \"textfield\",\n      \"example\": \"2026-11-01\"\n    },\n    \"postedBefore\": {\n      \"title\": \"AMAs created before\",\n      \"type\": \"string\",\n      \"description\": \"Optional explicit end date or ISO date-time. Overrides the end of the AMA date window.\",\n      \"editor\": \"textfield\",\n      \"example\": \"2026-11-15\"\n    },\n    \"maxAmas\": {\n      \"title\": \"Maximum AMAs\",\n      \"type\": \"integer\",\n      \"description\": \"How many AMA threads to read in this run, across all selected subreddits.\",\n      \"default\": 3,\n      \"prefill\": 1,\n      \"minimum\": 1,\n      \"maximum\": 50\n    },\n    \"maxCommentsPerAma\": {\n      \"title\": \"Maximum comments per AMA\",\n      \"type\": \"integer\",\n      \"description\": \"Comments to read from each thread, newest first. 0 reads the whole reachable thread (up to 25,000 comments).\",\n      \"default\": 0,\n      \"prefill\": 0,\n      \"minimum\": 0,\n      \"maximum\": 25000\n    },\n    \"minAmaScore\": {\n      \"title\": \"Minimum AMA score\",\n      \"type\": \"integer\",\n      \"description\": \"Skip AMA posts with fewer net votes than this. Archive scores can lag for very new posts.\",\n      \"minimum\": -1000000,\n      \"maximum\": 1000000\n    },\n    \"minComments\": {\n      \"title\": \"Minimum AMA comments\",\n      \"type\": \"integer\",\n      \"description\": \"Skip AMA posts with fewer comments than this.\",\n      \"minimum\": 0,\n      \"maximum\": 1000000\n    },\n    \"minQuestionScore\": {\n      \"title\": \"Minimum question score\",\n      \"type\": \"integer\",\n      \"description\": \"Only keep questions with at least this score. Applies to Q&A pairs and unanswered questions.\",\n      \"default\": 0,\n      \"prefill\": 0,\n      \"minimum\": 0,\n      \"maximum\": 1000000\n    },\n    \"minAnswerScore\": {\n      \"title\": \"Minimum answer score\",\n      \"type\": \"integer\",\n      \"description\": \"Only keep host answers with at least this score.\",\n      \"default\": 0,\n      \"prefill\": 0,\n      \"minimum\": 0,\n      \"maximum\": 1000000\n    },\n    \"includeUnanswered\": {\n      \"title\": \"Include unanswered top questions\",\n      \"type\": \"boolean\",\n      \"description\": \"Also emit top-level questions that the host never answered, as separate amaQuestion records.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"maxUnansweredPerAma\": {\n      \"title\": \"Maximum unanswered questions per AMA\",\n      \"type\": \"integer\",\n      \"description\": \"How many of the highest-scored unanswered questions to emit for each AMA. Ignored when includeUnanswered is off.\",\n      \"default\": 5,\n      \"prefill\": 5,\n      \"minimum\": 0,\n      \"maximum\": 100\n    },\n    \"includeSummary\": {\n      \"title\": \"Include one summary per AMA\",\n      \"type\": \"boolean\",\n      \"description\": \"Emit an amaSummary record with the host, AMA date, comments read, host answers and number of questions answered.\",\n      \"default\": true,\n      \"prefill\": true\n    }\n  },\n  \"required\": []\n}",
    "readme": "# Reddit Front Page & AMA Monitor\n\nTrack what Reddit is pushing to its front page right now — by country, feed and ranking order — and turn AMA threads into clean question-and-answer datasets. No Reddit account, API key, cookie or proxy setup.\n\n## What this actor does\n\n- **Front page snapshots** — reads Reddit's current **r/popular** listing for any supported country or worldwide, plus an **r/all-style broad feed**, in **hot**, **rising**, **top** (hour/day/week/month/year/all) or **new** order. Reddit blocks r/all for anonymous clients, so `all` uses a 25-community broad feed and marks those rows `feedScope: multi-community`.\n- **Country comparison** — pass several country codes in one run and get one row set per country. Add repeated snapshots to see how a post's rank moves between reads.\n- **Rich post rows** — rank, feed, country, post ID, subreddit, author, title, post type, linked URL or media URL, score, comment count, creation time, NSFW/spoiler flags and permalink.\n- **AMA discovery** — finds AMA threads in r/IAmA and any other AMA-style community over a date window, ordered by newest, score or comment count.\n- **Question-and-answer pairs** — reads the complete public comment thread, identifies replies written by the AMA host, and pairs each answer with the question it responds to: question text, asker, score, time, permalink; answer text, score, time, permalink.\n- **AMA summaries and unanswered questions** — one summary row per AMA (host, date, comments read, host answers, questions answered) and, optionally, the top unanswered questions.\n- **Clean output** — empty values are omitted at every depth. Records never contain `null`, `\"\"`, `[]` or `{}`.\n\n## Modes\n\n| `mode` | What it returns | Main inputs |\n|---|---|---|\n| `frontPage` | One row per post in each snapshot of r/popular, or the r/all-style broad feed | `feeds`, `countries`, `sort`, `timeFilter`, `snapshots`, `maxItems` |\n| `ama` | AMA summaries, Q&A pairs and optionally unanswered questions | `amaSubreddits`, `amaKeyword`, `amaSort`, `amaPeriod`, `maxAmas`, `maxItems` |\n\n## Data sources\n\nReddit's anonymous `.json` endpoints return HTTP 403 from datacenter clients and the browser UI is challenge-gated, so this actor uses two public, cookieless sources:\n\n1. **Reddit Atom RSS** for the current front-page order (`/r/popular/hot/.rss`, `/r/popular/rising/.rss`, `/r/popular/top/.rss?t=week&geo_filter=GB`, and a multi-community feed for `all`). RSS supplies the live rank, title, author, subreddit, permalink, publication time and rendered content. It does not expose scores or comment counts. Reddit's `/r/all` Atom endpoint returns HTTP 403 to anonymous clients, so the `all` option reads a fixed broad set of 25 large public communities and stamps each row `feedScope: multi-community`.\n2. **Arctic Shift** (`https://arctic-shift.photon-reddit.com`), a free public Reddit archive with no API key, for post enrichment (score, comment count, media, flags) and for the full comment tree behind every AMA.\n\nReddit limits anonymous feed reads to roughly one request per address per minute. The actor paces its feed requests and retries HTTP 429 with the server's `Retry-After` header (or a safe fixed backoff), so a run with several countries takes longer but still completes.\n\n### Freshness caveat\n\nArctic Shift archives a post when it is created and refreshes scores about a day and a half later. A very new front-page post can therefore show a low score or `0` comments in the archive even while it is rising on Reddit. The actor never invents a value: if the archive has no score, the score field is omitted rather than guessed. When the archive enrichment request itself fails, the row is still emitted from RSS with its title, rank and links — just without score-only fields.\n\n## Output\n\nRecords are distinguished by `dataType`.\n\n### `frontPagePost`\n\n- `rank`, `previousRank`, `rankChange` (positive means moved up)\n- `feed` (`popular` or `all`), `feedScope` (`reddit-listing` or `multi-community`), `country` (`GLOBAL` or a two-letter code), `sort`, `timeFilter` (only for `top`)\n- `snapshotIndex`, `snapshotAt`\n- `postId`, `postName`, `subreddit`, `subredditPrefixed`, `author`, `title`\n- `postType` (`self`, `link`, `image`, `video`, `gallery`, `poll`), `contentUrl`, `mediaUrl`, `permalink`\n- `score`, `upvoteRatio`, `commentsCount`, `crosspostsCount`, `awardsReceived`, `galleryCount`\n- `linkFlair`, `domain`, `thumbnailUrl`\n- `createdUtc`, `createdAt`, `crawledAt`\n- `isNsfw`, `isSpoiler`, `isLocked`, `isStickied`, `isVideo`, `isGallery`, `isSelf`, `isCrosspost`\n- `source` (`atom-rss+arctic-shift` or `atom-rss`)\n\n### `amaSummary` (one per AMA, on by default)\n\n`subreddit`, `postId`, `title`, `hostUsername`, `amaCreatedAt`, `amaCreatedUtc`, `score`, `commentsCount`, `commentsCollected`, `hostAnswerCount`, `questionsAnswered`, `unansweredTopQuestions`, `linkFlair`, `permalink`, `isNsfw`, `crawledAt`, `source`.\n\n### `amaQA` (one per host answer)\n\n`subreddit`, `postId`, `amaTitle`, `hostUsername`, `amaCreatedAt`, `amaUrl`, `questionId`, `questionText`, `questionAuthor`, `questionScore`, `questionCreatedAt`, `questionPermalink`, `answerId`, `answerText`, `answerAuthor`, `answerScore`, `answerCreatedAt`, `answerDepth`, `answerPermalink`, `crawledAt`, `source`.\n\n### `amaQuestion` (optional unanswered questions)\n\nThe same AMA and question fields as `amaQA`, plus `replyCount`, with no answer fields.\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | select | `frontPage` | `frontPage` or `ama` |\n| `maxItems` | integer | `300` | Global cap on rows pushed in the run |\n| `feeds` | string list | `[\"popular\"]` | `popular` and/or `all` |\n| `countries` | string list | `[\"GLOBAL\"]` | Country codes for r/popular hot, e.g. `US`, `GB`, `DE`, `IN`, `BR`, `JP`, or `GLOBAL` |\n| `sort` | select | `hot` | `hot`, `rising`, `top`, `new` |\n| `timeFilter` | select | `day` | Window for `top`: `hour` … `all` |\n| `snapshots` | integer | `1` | Repeat the selected feeds 1–10 times |\n| `snapshotIntervalSecs` | integer | `30` | Wait between snapshots |\n| `includeNSFW` | boolean | `false` | Keep posts known to be over-18 |\n| `minScore` | integer | – | Minimum archive score for front-page rows |\n| `amaSubreddits` | string list | `[\"IAmA\"]` | AMA-style communities |\n| `amaKeyword` | text | – | Keep AMAs containing every word in title/body |\n| `amaSort` | select | `comments` | `new`, `top`, `comments` |\n| `amaPeriod` | select | `week` | `hour` … `all` (recent scan) |\n| `postedAfter` / `postedBefore` | text | – | Explicit AMA date range |\n| `maxAmas` | integer | `3` | Threads to read per run |\n| `maxCommentsPerAma` | integer | `0` | Comments read per thread (0 = whole reachable thread) |\n| `minAmaScore` / `minComments` | integer | – | AMA post thresholds |\n| `minQuestionScore` / `minAnswerScore` | integer | `0` | Q&A pair thresholds |\n| `includeUnanswered` | boolean | `false` | Emit top unanswered questions |\n| `maxUnansweredPerAma` | integer | `5` | How many to emit per AMA |\n| `includeSummary` | boolean | `true` | Emit one summary per AMA |\n\n## Examples\n\n**Today's US front page (hot):**\n\n```json\n{\n  \"mode\": \"frontPage\",\n  \"feeds\": [\"popular\"],\n  \"countries\": [\"US\"],\n  \"sort\": \"hot\",\n  \"maxItems\": 25\n}\n```\n\n**Compare three countries over three snapshots:**\n\n```json\n{\n  \"mode\": \"frontPage\",\n  \"countries\": [\"US\", \"GB\", \"DE\"],\n  \"sort\": \"hot\",\n  \"snapshots\": 3,\n  \"snapshotIntervalSecs\": 120,\n  \"maxItems\": 225\n}\n```\n\n**Rising posts worldwide:**\n\n```json\n{\n  \"mode\": \"frontPage\",\n  \"feeds\": [\"popular\"],\n  \"sort\": \"rising\",\n  \"maxItems\": 25\n}\n```\n\n**Most-discussed AMAs from the past day, with unanswered questions:**\n\n```json\n{\n  \"mode\": \"ama\",\n  \"amaSubreddits\": [\"IAmA\"],\n  \"amaSort\": \"comments\",\n  \"amaPeriod\": \"day\",\n  \"maxAmas\": 2,\n  \"includeUnanswered\": true,\n  \"maxItems\": 400\n}\n```\n\n**Search AMAs by keyword:**\n\n```json\n{\n  \"mode\": \"ama\",\n  \"amaKeyword\": \"astronaut\",\n  \"amaPeriod\": \"year\",\n  \"maxAmas\": 3,\n  \"minAnswerScore\": 2\n}\n```\n\n## Scheduling\n\n- Front page: every 15–60 minutes with one feed, one country and `maxItems` 25–50. The RSS rate limit is the pacing constraint.\n- AMA monitoring: once or twice a day with `amaPeriod` set to `day` and `amaSort` set to `new` or `comments`.\n- Repeated snapshots in one run are for country comparison or short-term rank tracking. For long-term tracking, schedule the actor instead and keep every run's dataset.\n\n## FAQ\n\n**Do I need a Reddit account or API key?** No. The actor uses Reddit's public Atom feeds and the free Arctic Shift archive. There is no login, cookie or token input.\n\n**How many posts does a front-page feed return?** Reddit's Atom feed returns 25 entries per listing. The actor reads those entries, deduplicates them and returns up to your `maxItems`. Country feeds and r/all are separate listings.\n\n**Does country filtering work for r/all or rising/top?** No. Reddit applies `geo_filter` to r/popular hot only. r/all, rising, top and new rows are read from the worldwide feed and labelled `country: GLOBAL`.\n\n**Why is a score missing or low?** RSS has no score. Scores come from Arctic Shift, which may not have refreshed a brand-new post yet. A missing score is omitted, never filled with a guess. Use `minScore` only when you accept that brand-new posts with no archive score will be skipped.\n\n**How complete is an AMA thread?** The actor pages through Arctic Shift's comment search for the post, not just the first page of the live thread. Threads with more than a thousand comments are read in 100-comment pages until the archive has no more or `maxCommentsPerAma` is reached. Deleted and removed comments are skipped as answer/question text, but their children are still processed.\n\n**Who counts as the AMA host?** The post author. Comments marked as submitter replies (`is_submitter`) or written by the same username are treated as host answers.\n\n**Why are some comments not paired?** A host answer needs a real question above it in the thread. Top-level host announcements, answers to deleted questions and answers below the score thresholds are not emitted as Q&A pairs; they still count in the summary.\n\n**What does `amaPeriod: all` mean?** The actor scans the most recent 2,000 posts in each selected community and sorts them client-side. It is not an unbounded walk of Reddit history; use `postedAfter` / `postedBefore` for older windows.\n\n**Can I get more than 25 front-page rows per feed?** Reddit's Atom listing is 25 entries. Use more snapshots, more countries or additional feeds to collect more distinct rows. The actor does not fabricate extra pages.\n\n**What is `feedScope`?** `reddit-listing` means the row came from the exact r/popular or selected listing. `multi-community` means it came from the broad 25-community fallback used because Reddit blocks anonymous r/all; filter on this field if you need to separate the two.\n\n**Are media URLs usable directly?** Yes. `contentUrl` points at the linked page or image; `mediaUrl` points at the image, video file or first gallery image where the source exposes one. Permalinks always point to the Reddit discussion.\n\n**Is a proxy required?** No proxy is required or configured by this actor. If Reddit rate-limits a large multi-country run, the actor waits and retries; reduce countries or snapshots per run for faster results.\n\n**Is this affiliated with Reddit?** No. It reads only public data. Use it in accordance with Reddit's terms and your local data-protection rules.\n\n## Limitations\n\n- Atom RSS exposes at most 25 entries per listing and no scores, so scores and comment counts depend on Arctic Shift being reachable.\n- Reddit rate-limits anonymous RSS reads to roughly one request per minute per address; runs with many feeds, countries or snapshots are intentionally slow.\n- Reddit refuses the anonymous `/r/all` Atom feed (HTTP 403, including through proxies). The `all` option therefore returns a broad 25-community feed, not the exact r/all firehose; rows carry `feedScope: multi-community`.\n- Country filtering is honoured for r/popular hot only. Rising, top and new are worldwide feeds.\n- Arctic Shift may lag behind the live site for very new posts and very new comments.\n- The `all` AMA period is a bounded recent scan (2,000 posts per community), not a complete history walk.\n- NSFW filtering is only as good as the source flag; RSS-only rows may not carry one.\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "reddit-frontpage-ama-monitor",
      "title": "Reddit Front Page & AMA Monitor",
      "description": "Monitor Reddit's front page, rising and top feeds by country, and turn AMA threads into question-and-answer records. Uses Reddit Atom RSS and the free Arctic Shift archive. No login, API key or proxy.",
      "version": "0.1",
      "buildTag": "latest",
      "dockerfile": "./Dockerfile",
      "readme": "# Reddit Front Page & AMA Monitor\n\nTrack what Reddit is pushing to its front page right now — by country, feed and ranking order — and turn AMA threads into clean question-and-answer datasets. No Reddit account, API key, cookie or proxy setup.\n\n## What this actor does\n\n- **Front page snapshots** — reads Reddit's current **r/popular** listing for any supported country or worldwide, plus an **r/all-style broad feed**, in **hot**, **rising**, **top** (hour/day/week/month/year/all) or **new** order. Reddit blocks r/all for anonymous clients, so `all` uses a 25-community broad feed and marks those rows `feedScope: multi-community`.\n- **Country comparison** — pass several country codes in one run and get one row set per country. Add repeated snapshots to see how a post's rank moves between reads.\n- **Rich post rows** — rank, feed, country, post ID, subreddit, author, title, post type, linked URL or media URL, score, comment count, creation time, NSFW/spoiler flags and permalink.\n- **AMA discovery** — finds AMA threads in r/IAmA and any other AMA-style community over a date window, ordered by newest, score or comment count.\n- **Question-and-answer pairs** — reads the complete public comment thread, identifies replies written by the AMA host, and pairs each answer with the question it responds to: question text, asker, score, time, permalink; answer text, score, time, permalink.\n- **AMA summaries and unanswered questions** — one summary row per AMA (host, date, comments read, host answers, questions answered) and, optionally, the top unanswered questions.\n- **Clean output** — empty values are omitted at every depth. Records never contain `null`, `\"\"`, `[]` or `{}`.\n\n## Modes\n\n| `mode` | What it returns | Main inputs |\n|---|---|---|\n| `frontPage` | One row per post in each snapshot of r/popular, or the r/all-style broad feed | `feeds`, `countries`, `sort`, `timeFilter`, `snapshots`, `maxItems` |\n| `ama` | AMA summaries, Q&A pairs and optionally unanswered questions | `amaSubreddits`, `amaKeyword`, `amaSort`, `amaPeriod`, `maxAmas`, `maxItems` |\n\n## Data sources\n\nReddit's anonymous `.json` endpoints return HTTP 403 from datacenter clients and the browser UI is challenge-gated, so this actor uses two public, cookieless sources:\n\n1. **Reddit Atom RSS** for the current front-page order (`/r/popular/hot/.rss`, `/r/popular/rising/.rss`, `/r/popular/top/.rss?t=week&geo_filter=GB`, and a multi-community feed for `all`). RSS supplies the live rank, title, author, subreddit, permalink, publication time and rendered content. It does not expose scores or comment counts. Reddit's `/r/all` Atom endpoint returns HTTP 403 to anonymous clients, so the `all` option reads a fixed broad set of 25 large public communities and stamps each row `feedScope: multi-community`.\n2. **Arctic Shift** (`https://arctic-shift.photon-reddit.com`), a free public Reddit archive with no API key, for post enrichment (score, comment count, media, flags) and for the full comment tree behind every AMA.\n\nReddit limits anonymous feed reads to roughly one request per address per minute. The actor paces its feed requests and retries HTTP 429 with the server's `Retry-After` header (or a safe fixed backoff), so a run with several countries takes longer but still completes.\n\n### Freshness caveat\n\nArctic Shift archives a post when it is created and refreshes scores about a day and a half later. A very new front-page post can therefore show a low score or `0` comments in the archive even while it is rising on Reddit. The actor never invents a value: if the archive has no score, the score field is omitted rather than guessed. When the archive enrichment request itself fails, the row is still emitted from RSS with its title, rank and links — just without score-only fields.\n\n## Output\n\nRecords are distinguished by `dataType`.\n\n### `frontPagePost`\n\n- `rank`, `previousRank`, `rankChange` (positive means moved up)\n- `feed` (`popular` or `all`), `feedScope` (`reddit-listing` or `multi-community`), `country` (`GLOBAL` or a two-letter code), `sort`, `timeFilter` (only for `top`)\n- `snapshotIndex`, `snapshotAt`\n- `postId`, `postName`, `subreddit`, `subredditPrefixed`, `author`, `title`\n- `postType` (`self`, `link`, `image`, `video`, `gallery`, `poll`), `contentUrl`, `mediaUrl`, `permalink`\n- `score`, `upvoteRatio`, `commentsCount`, `crosspostsCount`, `awardsReceived`, `galleryCount`\n- `linkFlair`, `domain`, `thumbnailUrl`\n- `createdUtc`, `createdAt`, `crawledAt`\n- `isNsfw`, `isSpoiler`, `isLocked`, `isStickied`, `isVideo`, `isGallery`, `isSelf`, `isCrosspost`\n- `source` (`atom-rss+arctic-shift` or `atom-rss`)\n\n### `amaSummary` (one per AMA, on by default)\n\n`subreddit`, `postId`, `title`, `hostUsername`, `amaCreatedAt`, `amaCreatedUtc`, `score`, `commentsCount`, `commentsCollected`, `hostAnswerCount`, `questionsAnswered`, `unansweredTopQuestions`, `linkFlair`, `permalink`, `isNsfw`, `crawledAt`, `source`.\n\n### `amaQA` (one per host answer)\n\n`subreddit`, `postId`, `amaTitle`, `hostUsername`, `amaCreatedAt`, `amaUrl`, `questionId`, `questionText`, `questionAuthor`, `questionScore`, `questionCreatedAt`, `questionPermalink`, `answerId`, `answerText`, `answerAuthor`, `answerScore`, `answerCreatedAt`, `answerDepth`, `answerPermalink`, `crawledAt`, `source`.\n\n### `amaQuestion` (optional unanswered questions)\n\nThe same AMA and question fields as `amaQA`, plus `replyCount`, with no answer fields.\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | select | `frontPage` | `frontPage` or `ama` |\n| `maxItems` | integer | `300` | Global cap on rows pushed in the run |\n| `feeds` | string list | `[\"popular\"]` | `popular` and/or `all` |\n| `countries` | string list | `[\"GLOBAL\"]` | Country codes for r/popular hot, e.g. `US`, `GB`, `DE`, `IN`, `BR`, `JP`, or `GLOBAL` |\n| `sort` | select | `hot` | `hot`, `rising`, `top`, `new` |\n| `timeFilter` | select | `day` | Window for `top`: `hour` … `all` |\n| `snapshots` | integer | `1` | Repeat the selected feeds 1–10 times |\n| `snapshotIntervalSecs` | integer | `30` | Wait between snapshots |\n| `includeNSFW` | boolean | `false` | Keep posts known to be over-18 |\n| `minScore` | integer | – | Minimum archive score for front-page rows |\n| `amaSubreddits` | string list | `[\"IAmA\"]` | AMA-style communities |\n| `amaKeyword` | text | – | Keep AMAs containing every word in title/body |\n| `amaSort` | select | `comments` | `new`, `top`, `comments` |\n| `amaPeriod` | select | `week` | `hour` … `all` (recent scan) |\n| `postedAfter` / `postedBefore` | text | – | Explicit AMA date range |\n| `maxAmas` | integer | `3` | Threads to read per run |\n| `maxCommentsPerAma` | integer | `0` | Comments read per thread (0 = whole reachable thread) |\n| `minAmaScore` / `minComments` | integer | – | AMA post thresholds |\n| `minQuestionScore` / `minAnswerScore` | integer | `0` | Q&A pair thresholds |\n| `includeUnanswered` | boolean | `false` | Emit top unanswered questions |\n| `maxUnansweredPerAma` | integer | `5` | How many to emit per AMA |\n| `includeSummary` | boolean | `true` | Emit one summary per AMA |\n\n## Examples\n\n**Today's US front page (hot):**\n\n```json\n{\n  \"mode\": \"frontPage\",\n  \"feeds\": [\"popular\"],\n  \"countries\": [\"US\"],\n  \"sort\": \"hot\",\n  \"maxItems\": 25\n}\n```\n\n**Compare three countries over three snapshots:**\n\n```json\n{\n  \"mode\": \"frontPage\",\n  \"countries\": [\"US\", \"GB\", \"DE\"],\n  \"sort\": \"hot\",\n  \"snapshots\": 3,\n  \"snapshotIntervalSecs\": 120,\n  \"maxItems\": 225\n}\n```\n\n**Rising posts worldwide:**\n\n```json\n{\n  \"mode\": \"frontPage\",\n  \"feeds\": [\"popular\"],\n  \"sort\": \"rising\",\n  \"maxItems\": 25\n}\n```\n\n**Most-discussed AMAs from the past day, with unanswered questions:**\n\n```json\n{\n  \"mode\": \"ama\",\n  \"amaSubreddits\": [\"IAmA\"],\n  \"amaSort\": \"comments\",\n  \"amaPeriod\": \"day\",\n  \"maxAmas\": 2,\n  \"includeUnanswered\": true,\n  \"maxItems\": 400\n}\n```\n\n**Search AMAs by keyword:**\n\n```json\n{\n  \"mode\": \"ama\",\n  \"amaKeyword\": \"astronaut\",\n  \"amaPeriod\": \"year\",\n  \"maxAmas\": 3,\n  \"minAnswerScore\": 2\n}\n```\n\n## Scheduling\n\n- Front page: every 15–60 minutes with one feed, one country and `maxItems` 25–50. The RSS rate limit is the pacing constraint.\n- AMA monitoring: once or twice a day with `amaPeriod` set to `day` and `amaSort` set to `new` or `comments`.\n- Repeated snapshots in one run are for country comparison or short-term rank tracking. For long-term tracking, schedule the actor instead and keep every run's dataset.\n\n## FAQ\n\n**Do I need a Reddit account or API key?** No. The actor uses Reddit's public Atom feeds and the free Arctic Shift archive. There is no login, cookie or token input.\n\n**How many posts does a front-page feed return?** Reddit's Atom feed returns 25 entries per listing. The actor reads those entries, deduplicates them and returns up to your `maxItems`. Country feeds and r/all are separate listings.\n\n**Does country filtering work for r/all or rising/top?** No. Reddit applies `geo_filter` to r/popular hot only. r/all, rising, top and new rows are read from the worldwide feed and labelled `country: GLOBAL`.\n\n**Why is a score missing or low?** RSS has no score. Scores come from Arctic Shift, which may not have refreshed a brand-new post yet. A missing score is omitted, never filled with a guess. Use `minScore` only when you accept that brand-new posts with no archive score will be skipped.\n\n**How complete is an AMA thread?** The actor pages through Arctic Shift's comment search for the post, not just the first page of the live thread. Threads with more than a thousand comments are read in 100-comment pages until the archive has no more or `maxCommentsPerAma` is reached. Deleted and removed comments are skipped as answer/question text, but their children are still processed.\n\n**Who counts as the AMA host?** The post author. Comments marked as submitter replies (`is_submitter`) or written by the same username are treated as host answers.\n\n**Why are some comments not paired?** A host answer needs a real question above it in the thread. Top-level host announcements, answers to deleted questions and answers below the score thresholds are not emitted as Q&A pairs; they still count in the summary.\n\n**What does `amaPeriod: all` mean?** The actor scans the most recent 2,000 posts in each selected community and sorts them client-side. It is not an unbounded walk of Reddit history; use `postedAfter` / `postedBefore` for older windows.\n\n**Can I get more than 25 front-page rows per feed?** Reddit's Atom listing is 25 entries. Use more snapshots, more countries or additional feeds to collect more distinct rows. The actor does not fabricate extra pages.\n\n**What is `feedScope`?** `reddit-listing` means the row came from the exact r/popular or selected listing. `multi-community` means it came from the broad 25-community fallback used because Reddit blocks anonymous r/all; filter on this field if you need to separate the two.\n\n**Are media URLs usable directly?** Yes. `contentUrl` points at the linked page or image; `mediaUrl` points at the image, video file or first gallery image where the source exposes one. Permalinks always point to the Reddit discussion.\n\n**Is a proxy required?** No proxy is required or configured by this actor. If Reddit rate-limits a large multi-country run, the actor waits and retries; reduce countries or snapshots per run for faster results.\n\n**Is this affiliated with Reddit?** No. It reads only public data. Use it in accordance with Reddit's terms and your local data-protection rules.\n\n## Limitations\n\n- Atom RSS exposes at most 25 entries per listing and no scores, so scores and comment counts depend on Arctic Shift being reachable.\n- Reddit rate-limits anonymous RSS reads to roughly one request per minute per address; runs with many feeds, countries or snapshots are intentionally slow.\n- Reddit refuses the anonymous `/r/all` Atom feed (HTTP 403, including through proxies). The `all` option therefore returns a broad 25-community feed, not the exact r/all firehose; rows carry `feedScope: multi-community`.\n- Country filtering is honoured for r/popular hot only. Rising, top and new are worldwide feeds.\n- Arctic Shift may lag behind the live site for very new posts and very new comments.\n- The `all` AMA period is a bounded recent scan (2,000 posts per community), not a complete history walk.\n- NSFW filtering is only as good as the source flag; RSS-only rows may not carry one.\n",
      "input": {
        "title": "Reddit Front Page & AMA Monitor Input",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "mode": {
            "title": "What to collect",
            "type": "string",
            "description": "Front page snapshots read Reddit's current r/popular or r/all listing by country and sort order. AMA mode finds AMA threads over a date window and returns question-and-answer pairs.",
            "sectionCaption": "What to collect",
            "sectionDescription": "Pick a mode, then fill the matching section below. No Reddit login, API key or proxy is required.",
            "editor": "select",
            "enum": [
              "frontPage",
              "ama"
            ],
            "enumTitles": [
              "Front page snapshots",
              "AMA questions and answers"
            ],
            "default": "frontPage",
            "prefill": "frontPage"
          },
          "maxItems": {
            "title": "Maximum records",
            "type": "integer",
            "description": "Global stop control for the whole run. For front page it caps snapshot rows; for AMA it caps summaries, Q&A pairs and unanswered questions together.",
            "default": 300,
            "prefill": 10,
            "minimum": 1,
            "maximum": 10000
          },
          "feeds": {
            "title": "Feeds (front page)",
            "type": "array",
            "description": "Which Reddit feeds to snapshot: popular (curated, supports country filtering for hot) and/or all. Reddit blocks the anonymous r/all Atom feed, so all rows fall back to a broad 25-community hot feed and are marked feedScope=multi-community.",
            "editor": "stringList",
            "items": {
              "type": "string"
            },
            "example": [
              "popular",
              "all"
            ],
            "prefill": [
              "popular"
            ],
            "sectionCaption": "Front page snapshots",
            "sectionDescription": "These fields are used when mode is Front page snapshots. Country codes follow Reddit's geo_filter values, for example US, GB, DE, IN, CA, AU, FR, BR, MX, JP or GLOBAL.",
            "default": [
              "popular"
            ]
          },
          "countries": {
            "title": "Countries (front page)",
            "type": "array",
            "description": "Reddit country codes for the r/popular hot feed, for example US, GB, DE, IN, BR, MX, JP. Use GLOBAL or leave empty for worldwide. Reddit applies geo filtering to hot only; rising, top, new and r/all rows are worldwide.",
            "editor": "stringList",
            "items": {
              "type": "string"
            },
            "example": [
              "US",
              "GB",
              "DE"
            ],
            "default": [
              "GLOBAL"
            ]
          },
          "sort": {
            "title": "Sort order (front page)",
            "type": "string",
            "description": "Reddit's current feed order: hot, rising, top (over the time window below) or new. Country filtering applies to hot; other orders use the worldwide feed.",
            "editor": "select",
            "enum": [
              "hot",
              "rising",
              "top",
              "new"
            ],
            "enumTitles": [
              "Hot",
              "Rising",
              "Top",
              "New"
            ],
            "default": "hot",
            "prefill": "hot"
          },
          "timeFilter": {
            "title": "Top time window (front page)",
            "type": "string",
            "description": "Ranking window used only when sort is Top.",
            "editor": "select",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "enumTitles": [
              "Past hour",
              "Past day",
              "Past week",
              "Past month",
              "Past year",
              "All time"
            ],
            "default": "day",
            "prefill": "day"
          },
          "snapshots": {
            "title": "Repeated snapshots (front page)",
            "type": "integer",
            "description": "How many times to read the selected feeds. Use more than 1 to compare countries or capture rank changes over time. Each row carries its snapshot number, rank and rank change.",
            "default": 1,
            "prefill": 1,
            "minimum": 1,
            "maximum": 10
          },
          "snapshotIntervalSecs": {
            "title": "Seconds between snapshots (front page)",
            "type": "integer",
            "description": "Wait time between repeated snapshots. Ignored when snapshots is 1.",
            "default": 30,
            "prefill": 30,
            "minimum": 0,
            "maximum": 900
          },
          "includeNSFW": {
            "title": "Include NSFW posts",
            "type": "boolean",
            "description": "When off, posts known to be over-18 are skipped. RSS rows without a known NSFW flag are kept because the source does not report it.",
            "default": false,
            "prefill": false
          },
          "minScore": {
            "title": "Minimum score (front page)",
            "type": "integer",
            "description": "Keep only posts whose Arctic Shift score is at least this value. Rows without a score (archive enrichment unavailable) are skipped when this filter is set.",
            "minimum": -1000000,
            "maximum": 1000000
          },
          "amaSubreddits": {
            "title": "AMA subreddits",
            "type": "array",
            "description": "AMA-style communities to search, for example IAmA, CasualIAmA or AMA. Accepts bare names or r/ names.",
            "editor": "stringList",
            "items": {
              "type": "string"
            },
            "example": [
              "IAmA",
              "CasualIAmA"
            ],
            "prefill": [
              "IAmA"
            ],
            "sectionCaption": "AMA questions and answers",
            "sectionDescription": "These fields are used when mode is AMA questions and answers. Question-and-answer pairs come from the full public comment thread.",
            "default": [
              "IAmA"
            ]
          },
          "amaKeyword": {
            "title": "Keyword filter (AMA)",
            "type": "string",
            "description": "Only keep AMAs whose title or body contains every word of this keyword. Leave empty to keep all AMAs in the selected communities.",
            "editor": "textfield",
            "example": "doctor"
          },
          "amaSort": {
            "title": "AMA order",
            "type": "string",
            "description": "Order the discovered AMAs before reading their threads: newest first, highest score, or most comments.",
            "editor": "select",
            "enum": [
              "new",
              "top",
              "comments"
            ],
            "enumTitles": [
              "Newest first",
              "Highest score",
              "Most comments"
            ],
            "default": "comments",
            "prefill": "comments"
          },
          "amaPeriod": {
            "title": "AMA date window",
            "type": "string",
            "description": "How far back to look for AMAs. Ignored when postedAfter or postedBefore is set.",
            "editor": "select",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "enumTitles": [
              "Past hour",
              "Past day",
              "Past week",
              "Past month",
              "Past year",
              "All time (recent scan)"
            ],
            "default": "week",
            "prefill": "week"
          },
          "postedAfter": {
            "title": "AMAs created on or after",
            "type": "string",
            "description": "Optional explicit start date or ISO date-time, for example 2026-11-01. Overrides the AMA date window start.",
            "editor": "textfield",
            "example": "2026-11-01"
          },
          "postedBefore": {
            "title": "AMAs created before",
            "type": "string",
            "description": "Optional explicit end date or ISO date-time. Overrides the end of the AMA date window.",
            "editor": "textfield",
            "example": "2026-11-15"
          },
          "maxAmas": {
            "title": "Maximum AMAs",
            "type": "integer",
            "description": "How many AMA threads to read in this run, across all selected subreddits.",
            "default": 3,
            "prefill": 1,
            "minimum": 1,
            "maximum": 50
          },
          "maxCommentsPerAma": {
            "title": "Maximum comments per AMA",
            "type": "integer",
            "description": "Comments to read from each thread, newest first. 0 reads the whole reachable thread (up to 25,000 comments).",
            "default": 0,
            "prefill": 0,
            "minimum": 0,
            "maximum": 25000
          },
          "minAmaScore": {
            "title": "Minimum AMA score",
            "type": "integer",
            "description": "Skip AMA posts with fewer net votes than this. Archive scores can lag for very new posts.",
            "minimum": -1000000,
            "maximum": 1000000
          },
          "minComments": {
            "title": "Minimum AMA comments",
            "type": "integer",
            "description": "Skip AMA posts with fewer comments than this.",
            "minimum": 0,
            "maximum": 1000000
          },
          "minQuestionScore": {
            "title": "Minimum question score",
            "type": "integer",
            "description": "Only keep questions with at least this score. Applies to Q&A pairs and unanswered questions.",
            "default": 0,
            "prefill": 0,
            "minimum": 0,
            "maximum": 1000000
          },
          "minAnswerScore": {
            "title": "Minimum answer score",
            "type": "integer",
            "description": "Only keep host answers with at least this score.",
            "default": 0,
            "prefill": 0,
            "minimum": 0,
            "maximum": 1000000
          },
          "includeUnanswered": {
            "title": "Include unanswered top questions",
            "type": "boolean",
            "description": "Also emit top-level questions that the host never answered, as separate amaQuestion records.",
            "default": false,
            "prefill": false
          },
          "maxUnansweredPerAma": {
            "title": "Maximum unanswered questions per AMA",
            "type": "integer",
            "description": "How many of the highest-scored unanswered questions to emit for each AMA. Ignored when includeUnanswered is off.",
            "default": 5,
            "prefill": 5,
            "minimum": 0,
            "maximum": 100
          },
          "includeSummary": {
            "title": "Include one summary per AMA",
            "type": "boolean",
            "description": "Emit an amaSummary record with the host, AMA date, comments read, host answers and number of questions answered.",
            "default": true,
            "prefill": true
          }
        },
        "required": []
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "Reddit Front Page & AMA Monitor output",
        "properties": {
          "dataset": {
            "type": "string",
            "title": "Results",
            "description": "Front-page snapshots and AMA question-and-answer records.",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "environmentVariables": {},
      "defaultRunOptions": {
        "build": "latest",
        "timeoutSecs": 3600,
        "memoryMbytes": 512
      }
    },
    "buildNumber": "0.1.10",
    "imageDigest": "07417246dd695ae1b86a38c552de895448da884e632f8095d97c55d48a1217b7",
    "actVersion": {
      "sourceType": "SOURCE_FILES",
      "buildTag": "latest",
      "versionNumber": "0.1"
    },
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0.003248888888888889
    }
  }
}