Nimbryxo Studio

Use Facebook Timeline Posts & Reel Transcript Extractor with Python

Pull recent posts and Reels from a public Facebook Page or Profile, or fetch one post by its link, with text, reaction breakdown, comments, media, and real auto-generated video captions. No login or cookies required.

1. Choose the data you need

Review the published README for supported collection modes, examples, and limits. The recipe below uses the current published input definition.

2. Prepare a source-based input

This JSON contains published prefills and required-field defaults. Review every value for your task before running it; it is not a promise of successful collection.

{
  "fetchAllAlbumPhotos": false,
  "fetchAllComments": false,
  "fetchReelDetails": false,
  "fetchSharedPostDetails": false,
  "fetchVideoCaptions": false,
  "includeCommentReactions": false,
  "includeCommentReplies": false,
  "includeTopComments": false,
  "maxItems": 1,
  "rehostMedia": "none",
  "startUrls": [
    {
      "url": "https://www.facebook.com/pepsi/posts/1054998311204476"
    }
  ]
}

Download input.example.json and save your reviewed copy as input.json.

FieldTypeRequiredDescription
startUrlsarrayrequiredMix any public Facebook links. A Page or Profile link (facebook.com/nike, profile.php?id=…, /people/…/…) returns its timeline posts. A post, reel, video, photo, watch, share (facebook.com/share/…, fb.watch/…), permalink.php, story.php or public group post link returns that single post. Group feeds, events, Marketplace and search pages are not supported.
maxItemsintegeroptionalHow many posts to collect from each Page or Profile link, newest first. Posts removed by the filters below don't count. Single post links always return one post.
onlyPostsNewerThanstringoptionalPage and Profile links only: keep posts published after this moment. Accepts a date (2026-01-01), a full ISO 8601 timestamp, or a relative period such as "7 days", "2 weeks", "3 months" or "1 year".
onlyPostsOlderThanstringoptionalPage and Profile links only: keep posts published before this moment. Same formats as "Only posts newer than". Combine both for a date window.
contentTypesarrayoptionalPage and Profile links only: keep only these kinds of posts. Leave empty to keep everything. When matching posts are rare, the timeline scan stops after 20 × the post limit (at least 50) scanned posts and the run status says so.
minReactionsintegeroptionalPage and Profile links only: skip posts with fewer reactions than this.
minCommentsintegeroptionalPage and Profile links only: skip posts with fewer comments than this.
includeTopCommentsbooleanoptionalAttach the comments Facebook shows under each post (about 1-10 per post) at no extra cost.
fetchAllCommentsbooleanoptionalCollect the full comment list of every post into allComments, up to the limit below. Adds a few requests per post.
maxCommentsPerPostintegeroptionalUpper limit for allComments on each post. Replies count toward this limit when replies are included.
commentsSortOrderstringoptionalOrder in which allComments are collected. "Newest first" is the best choice for monitoring recent discussion.
onlyCommentsNewerThanstringoptionalKeep only comments posted after this moment in allComments: a date (2026-01-01), ISO timestamp, or period such as "1 day" or "2 weeks". Comments are then read newest first.
includeCommentRepliesbooleanoptionalAdd each comment's reply thread (including replies to replies) as a replies list inside the comment.
includeCommentReactionsbooleanoptionalAdd each comment's reactions split by type (Like, Love, Haha, …) with exact totals, also for busy comments Facebook shows as "1.2K". Adds one request per comment that has reactions.
fetchVideoCaptionsbooleanoptionalFor videos and reels that have captions, download Facebook's own caption file and add it as a transcript (SRT text plus plain text). These are Facebook's captions, not independent speech-to-text.
fetchReelDetailsbooleanoptionalFor reels, add the audio track (title, original audio or song, album art) and whether the reel can be remixed. Adds one request per reel.
fetchSharedPostDetailsbooleanoptionalFor posts that re-share another post, add the original post's text, type and counters to sharedPost. Adds one request per shared post.
fetchAllAlbumPhotosbooleanoptionalThe timeline shows at most five photos of an album post. Turn this on to list every photo of the album.
rehostMediastringoptionalFacebook's media links stop working after a few days. Copies are stored with this run and keep working; the original link stays in the matching …Original field.

3. Start an Actor run

Set APIFY_TOKEN in your environment. Python 3.10 or newer is sufficient; this recipe uses no third-party packages.

Execution may incur charges. Review current pricing on Apify. The request asks for a 120-second timeout and a charge limit; these settings are subject to Apify’s pricing and do not guarantee an all-inclusive spending cap.

import json
import os
import urllib.request

# Save the schema-derived example as input.json; review and edit it first.
with open("input.json", encoding="utf-8") as stream:
    actor_input = json.load(stream)

token = os.environ["APIFY_TOKEN"]
request = urllib.request.Request(
    "https://api.apify.com/v2/acts/xDhqAyk88by2eLk0v/runs?timeout=120&maxTotalChargeUsd=0.50",
    data=json.dumps(actor_input).encode("utf-8"),
    headers={"Authorization": "Bearer " + token, "Content-Type": "application/json"},
    method="POST",
)
# This starts a potentially billable run. Do not automatically retry this POST.
with urllib.request.urlopen(request, timeout=40) as response:
    run = json.load(response)["data"]
print("Run ID:", run["id"])
print("Status:", run["status"])
# Inspect and download results in Apify Console once the run succeeds.

4. Inspect the actual results

Open the run in Apify Console and wait for a successful completion. Use the published output schema to locate results and the dataset schema to understand declared views. Missing or optional record fields must not be treated as guaranteed values.

One record per Facebook post, reel or video: text, author, reactions by type, comment and share counts, video views, media links, link previews, comments with replies and optional transcripts.

Questions before you run

Which inputs are required?

The published required fields are startUrls

What does this guide verify?

The fields, prefills, and schema links are rendered from the published build. This is a usage recipe, not a paid live extraction test. Source availability and collection results can vary.

What if the run request times out?

Check Apify Console before retrying. The first request may already have created a run. Do not automatically repeat a run-creation POST.

Generated from source build 2UujWfpn7EOKxWDbO and its README and schemas. Source changes regenerate this guide; no third-party editorial claims are inferred.