Facebook Post Metadata Scraper avatar

Facebook Post Metadata Scraper

Pricing

from $2.99 / 1,000 post metadata

Go to Apify Store
Facebook Post Metadata Scraper

Facebook Post Metadata Scraper

Extract stable public Facebook page and post metadata from HTML. The actor does not access private endpoints or claim unavailable comments.

Pricing

from $2.99 / 1,000 post metadata

Rating

0.0

(0)

Developer

w3crawler

w3crawler

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

23 days ago

Last modified

Categories

Features

Limited permissions

Share

Extract public Facebook post or Page metadata from the HTML delivered by an anonymous request. For individual posts it identifies the public post ID, canonical URL, text, author, publication time, aggregate reactions/comments/shares, media type, Open Graph/Twitter metadata, selected head links, JSON-LD, and an optional bounded visible-text excerpt. Page URLs are accepted as a clearly labeled page-metadata fallback.

Get started

  1. Open the Actor Store page and select Try for free or open the Input tab.
  2. Set startUrls and maxItems for the data you need.
  3. Keep maxItems and the other limits small for the first run.
  4. Start the Actor, open the dataset, and export the saved records as JSON, CSV, or Excel. Open Run summary (OUTPUT) to check the outcome and counts.

Input

All fields are optional; the defaults below are ready to use. Unsupported field names and out-of-range values are rejected before requests start.

FieldTypeRequired?DefaultMeaning
startUrlsobject arrayOptionalNot suppliedPublic Facebook page, post, Reel, Watch, photo, group permalink, or share URL to inspect.
maxItemsintegerOptional10Maximum number of unique input URLs to process; one dataset record is emitted per processed URL. 1–100.
includePageTextbooleanOptionaltrueInclude a bounded, script-free visible-text excerpt from an accessible public page.
includeMediabooleanOptionaltrueInclude public Open Graph and Twitter image URLs and image alt text when present.
includeStructuredDatabooleanOptionaltrueParse only public application/ld+json data. Facebook application-state JSON is not parsed.
includeLinksbooleanOptionaltrueInclude bounded canonical, alternate, manifest, and icon link records from the HTML head.
maxTextLengthintegerOptional5000Maximum length of the optional visible-text excerpt per page. 100–20000.
maxStructuredDataItemsintegerOptional20Maximum number of public JSON-LD values to retain per page. 0–100.
maxLinksintegerOptional20Maximum number of relevant public link records to retain per page. 0–100.
maxConcurrencyintegerOptional1Maximum number of public page requests running at once. Keep this low for Facebook. 1–3.
minDelayMsintegerOptional250Minimum delay before each public request. Retries use bounded exponential pacing. 0–5000.
maxDelayMsintegerOptional4000Upper bound for retry pacing, from 0 to 10000 ms; the runtime never waits longer than this configured value between attempts.
maxRequestRetriesintegerOptional2Number of retries after a network or transport failure. HTTP access blocks are not bypassed or retried. 0–5.
requestTimeoutSecsintegerOptional45Timeout for each public HTML request. 5–60.
maxBytesintegerOptional5000000Hard response-size limit for each public HTML request. 100000–5000000.

Example input:

{
"startUrls": [
{
"url": "https://www.facebook.com/NASA/posts/pfbid025kwyoBjhFGUC22fC4Sies56D5xvd65ZHR5PYjHhc7XSzqGsxuWq2uDVriZNxWbeol"
}
],
"maxItems": 10,
"includePageText": true,
"includeMedia": true,
"includeStructuredData": true,
"includeLinks": true,
"maxTextLength": 5000,
"maxStructuredDataItems": 20,
"maxLinks": 20,
"maxConcurrency": 1,
"minDelayMs": 250,
"maxDelayMs": 4000,
"maxRequestRetries": 2,
"requestTimeoutSecs": 45,
"maxBytes": 5000000
}

The Actor reads public Facebook HTML with credential-free HTTP requests. Each startUrls entry is an object with a required url string. The Actor does not sign in, use cookies, call a private GraphQL endpoint, or claim comments that are not exposed in the delivered HTML.

Output

The dataset contains one row per processed public URL. The schema declares no required fields; optional information appears only when the delivered public HTML publishes it, and missing values are omitted rather than inferred. No diagnostic or placeholder rows are written.

FieldTypeAvailabilityMeaning
urlstringWhen a row is savedCanonical record URL, preferring the public post URL and otherwise the public Page or request URL.
requestUrlstringWhen a row is savedCredential-free Facebook URL supplied for this record.
sourceUrlstringWhen publishedAlias for the supplied public URL.
sourcestringWhen a row is savedPublic transport/source label.
finalUrlstringWhen publishedFinal Facebook URL after bounded same-site redirects.
pageTitlestringWhen publishedHTML document title.
isPostbooleanWhen publishedWhether the public document resolved to an individual post.
postIdstringWhen publishedPublic post identifier when exposed in the URL or HTML.
postUrlstringWhen publishedCanonical public post URL when available.
postTextstringWhen publishedPublic post text from Open Graph or description metadata.
authorNamestringWhen publishedPublic author or Page name when exposed.
authorIdstringWhen publishedPublic author/Page identifier when exposed.
authorUsernamestringWhen publishedPublic author/Page path segment when available.
publishedTimestampintegerWhen publishedPublic post creation Unix timestamp when exposed.
publishedAtstringWhen publishedISO representation of the public post creation time.
reactionCountintegerWhen publishedPublic aggregate reaction count when exposed.
commentCountintegerWhen publishedPublic aggregate comment count when exposed.
shareCountintegerWhen publishedPublic aggregate share count when exposed.
mediaTypestringWhen publishedPublicly inferred media type such as photo or video.
pageDescriptionstringWhen publishedPublic page/document description metadata.
imageUrlstringWhen publishedFirst public Open Graph image URL when enabled.
imageUrlsstring arrayWhen publishedDeduplicated public Open Graph image URLs.
imageAltstringWhen publishedPublic Open Graph image alt text.
canonicalUrlstringWhen publishedPublic canonical URL from Open Graph or a canonical link.
pageTypestringWhen publishedPublic Open Graph type.
localestringWhen publishedPublic Open Graph locale.
twitterTitlestringWhen publishedPublic Twitter card title.
twitterDescriptionstringWhen publishedPublic Twitter card description.
twitterImageUrlstringWhen publishedPublic Twitter card image URL.
metadataKeysstring arrayWhen publishedSorted public meta property/name keys observed in the HTML.
linkRelTypesstring arrayWhen publishedSorted public link-rel tokens observed in the HTML head.
linksobject arrayWhen publishedBounded public canonical/alternate/manifest/icon link records.
publicStructuredDataobject arrayWhen publishedBounded public application/ld+json objects; application-state JSON is not parsed.
pageTextstringWhen publishedOptional bounded script-free visible text excerpt.
pageTextAvailablebooleanWhen publishedWhether a visible text excerpt was retained.
pageTextTruncatedbooleanWhen publishedWhether the visible text exceeded maxTextLength.
scrapedAtstringWhen a row is savedUTC time when the record was normalized.

No current-schema post-metadata rows are stored in the Actor's default local dataset, so the example is an empty array rather than an invented post record:

[]

When a row is saved, url is the canonical post URL when available and otherwise the Page URL; requestUrl and sourceUrl preserve the supplied input. Page URLs produce a Page-metadata fallback with isPost: false, while individual posts set postId, postUrl, and the post-level metadata that the public HTML exposes. Missing comments are not fabricated: this Actor does not return comments.

Run summary

Run summary is stored separately from the dataset in the run's key-value store under OUTPUT.

FieldMeaning
recordTypeSummary discriminator; always facebook-post-metadata-run-summary.
idRun-summary identifier derived from the supplied URL set.
statusActor process outcome: SUCCEEDED or FAILED.
runStatusCanonical run status; matches status.
dataStatusCompleteness of the saved records: COMPLETE, PARTIAL, NO_RESULTS, or FAILED.
itemCountPage or post records written to the dataset.
postMetadataCountRecords resolved to an individual public post.
dataAvailableCountRecords with a public HTML response and usable metadata.
blockedCountRecords blocked, denied, empty, or failed closed.
diagnosticItemsDiagnostic dataset rows; always zero because diagnostics stay in the summary and logs.
diagnosticCountOperational issues recorded for the run.
failedCountRequests or extractions that failed.
dataAvailableWhether at least one source-backed record was saved.
scrapedAtTime the first record was normalized, in ISO UTC.
completedAtTime the run summary was written, in ISO UTC.

No current-schema OUTPUT snapshot is stored in the Actor's default key-value store, so the summary table is shown without a value example.

StatusData statusMeaning
SUCCEEDEDCOMPLETEEligible URLs were processed and their available metadata was saved.
SUCCEEDEDPARTIALSome records were saved, but a later request or extraction failed. Saved rows remain available.
SUCCEEDEDNO_RESULTSThe URLs were processed cleanly but no usable public metadata was found.
FAILEDFAILEDA fatal error occurred before any usable record was saved.

Coverage and limitations

The Actor reads public HTML delivered to an anonymous request. It does not log in, use cookies, call private GraphQL endpoints, bypass access controls, or return comments that are not present in the delivered page. Individual post URLs produce post-level metadata when the HTML exposes it; Page URLs produce a clearly labeled Page-metadata fallback with isPost: false.

Fields absent from the public HTML are omitted rather than invented. Page text is bounded by maxTextLength, JSON-LD by maxStructuredDataItems, and link records by maxLinks. Access-denied, empty, or blocked responses are reported in the run summary and logs, not written as dataset rows. Optional image and structured-data fields appear only when enabled and publicly present.

Usage and support

Cost depends on URL count, response size, retries, timeouts, and concurrency. Start with small item and page limits, inspect the dataset and run summary, then scale gradually. See the Actor's Pricing tab for current account rates. Use the Actor Issues page to report a problem. Include the run ID, the input used, and the run summary; do not include tokens, cookies, or private data. This Actor is not affiliated with Facebook. Use it only for public data and in accordance with the source's terms, robots guidance, and applicable law. Public pages can contain personal information; use the output only for lawful purposes.