Facebook URL To ID & Date Extractor Scraper avatar

Facebook URL To ID & Date Extractor Scraper

Pricing

$19.99/month + usage

Go to Apify Store
Facebook URL To ID & Date Extractor Scraper

Facebook URL To ID & Date Extractor Scraper

Facebook URL to ID Scraper converts Facebook profile, page, post, or group URLs into their numeric Facebook IDs. Returns object type, original URL, numeric ID, and basic metadata — supports single or bulk lookups for integrations, data-mapping, analytics, and automation

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

SimpleAPI

SimpleAPI

Maintained by Community

Actor stats

0

Bookmarked

11

Total users

0

Monthly active users

13 days ago

Last modified

Share

Facebook URL to ID Converter — Post IDs, pfbid and Publish Dates

Facebook URL to ID Converter turns public Facebook post, photo, video, reel, and permalink links into stable content identifiers — storyId, postId, pfbid, and pageId — plus an absolute publishedAt timestamp, decoded from the page's public HTML payload. It classifies each link's contentType and returns one typed JSON row per URL. Built for developers wiring ad-reporting and analytics pipelines, and agencies normalizing bulk link lists into consistent identifiers before dedup or CRM import, it turns a messy list of share links into a schema-stable dataset ready for the next step.

What is Facebook URL to ID Converter?

Facebook URL to ID Converter is a URL-to-ID resolver: paste public Facebook post, photo, video, reel, or permalink links and it returns the numeric/opaque identifiers and publish date embedded in each link and its public payload, as one JSON row per URL. No Facebook account, login, or API token is required — it fetches each URL as a logged-out, guest visitor.

  • Accepts /posts/, /permalink/, /photo, /videos/, /watch, /reel/, and /story.php links, plus bare usernames or paths (auto-prefixed with facebook.com)
  • Decodes storyId, postId, pfbid, and pageId from the public payload and URL for each content link
  • Extracts publishedAt (ISO-8601 UTC) and publishedTimestamp (unix epoch) from the content's creation_time, when present
  • Classifies contentType (post / photo / video / reel / story) directly from the URL pattern
  • Optional toggles skip date or author decoding for a leaner, ID-only run
  • Guest cookie warmup plus an auto-escalating proxy fallback (none → datacenter → sticky residential) to reduce logged-out blocks

What data can I extract with Facebook URL to ID Converter?

Each processed URL returns a row covering content identifiers, author/page attribution, publish-date data, and request bookkeeping fields:

FieldExample ValueUse Case
inputUrlhttps://www.facebook.com/NintendoAmerica/posts/pfbid02JESEPS...Trace a row back to the exact link you submitted
contentTypepostRoute content by type (post/photo/video/reel/story) downstream
storyId1122334455Primary numeric content ID for dedup and joins
postId1122334455Feedback/subscription-target ID used by comment and reaction tooling
pfbidpfbid02JESEPSvyiLGjvewuFYhviAwQjTdxZWThe opaque share-link token, kept as-is for cross-referencing
pageId100064368354094Attribute the content to its owning Page/profile
authorNameNintendo of AmericaHuman-readable author label for reports
publishedAt2024-01-01T00:00:00.000ZSort/filter content chronologically
publishedTimestamp1704067200Epoch form for warehouse/date-math use
resolvedUrlhttps://www.facebook.com/NintendoAmerica/posts/123456789The canonical URL after Facebook's own OpenGraph resolution
scrapedAt2026-07-25T00:00:00.000ZAudit when the row was produced
facebookUrlsame as inputUrlCompatibility alias, kept for drop-in use with the base resolver's schema
urlsame as resolvedUrlCompatibility alias
facebookIdsame as storyId/postIdCompatibility alias
typesame as contentTypeCompatibility alias
openGraph{ "type": "article", "title": "...", "url": "..." }Read the page's own OpenGraph metadata without a second request
openGraphTextstringified openGraphFlat-file/CSV-friendly copy of the same data
noderaw Story node object, or nullDebug or extend extraction against the underlying payload
nodeTextstringified node, or nullFlat-file copy of the same
groupgroup metadata object, or nullPopulated only when the input URL is a /groups/ link
groupTextstringified group, or nullFlat-file copy of the same
groupTitlegroup name, or nullQuick group label without unpacking group
userprofile/page object, or nullPopulated only for generic page-route URLs
userTextstringified user, or nullFlat-file copy of the same
pageAdLibraryad-library reference object, or nullPresent only if the payload links the content to an Ads Library entry
pageAdLibraryTextstringified pageAdLibrary, or nullFlat-file copy of the same
source_urlsame as inputUrlCompatibility alias carried over from the base resolver
rawTextstringified full decoded recordAudit/debug trail for the whole row

Publish-date and timestamp data

publishedAt and publishedTimestamp come from the content's creation_time, found by walking the Story node embedded in Facebook's own application/json script blocks — the same data the public page renders from. publishedAt is normalized to ISO-8601 UTC; publishedTimestamp keeps the raw unix epoch for warehouse date-math. Both toggle off together via includePublishDate. A concrete use case: backfilling an absolute publish date onto a list of pfbid share links so an ads-reporting job can sort content chronologically without opening each link manually. This decode only succeeds when a Story node is present in the logged-out payload — see the limitation noted below.

ID resolution and URL-type detection

There are no location, category, or rating filters here — the "targeting" this Actor does is resolving what a URL actually points to. contentType is classified from the URL pattern itself (/reel/, /videos/, /photo, /posts/, /permalink/, /story.php), and the internal router separately detects whether a link is a content permalink, a /groups/ URL, or a generic page URL — which determines which fields get populated. pfbid is extracted straight from the URL string, independent of whatever the payload returns.

Why not build this yourself?

Facebook doesn't publish a stable, documented way to turn an arbitrary public URL — especially a pfbid… share link — into the numeric IDs and creation date behind it. Building this in-house means parsing Facebook's embedded application/json script blocks, which carry no versioned contract and change shape between post types (a Story node looks nothing like a video or reel node), then walking that tree for creation_time, post_id, and owning_profile under different key paths for each. On top of that, logged-out requests routinely hit login walls and checkpoints, which this Actor detects and works around with a guest cookie warmup and an automatic none → datacenter → sticky-residential proxy escalation with retries. None of this is exposed as a clean, callable endpoint anywhere — you either reverse-engineer the HTML yourself and maintain it as Facebook's markup shifts, or run it as a maintained Actor.

Build it yourself if you only ever need to parse one fixed URL shape and are comfortable re-patching your parser when Facebook changes its markup. Use this Actor when you're feeding it a mixed, growing list of link formats and want a stable JSON contract instead of a scraper you have to babysit.

How to use data extracted from Facebook?

Developers building integrations

The most direct use: converting pfbid share links and mixed-format permalinks into the storyId/postId values your ads-reporting, analytics, or internal CMS already keys on. Feed a batch of contentUrls, get back one row per link with storyId, postId, pageId, and publishedAt filled in, then join that dataset against your own tables by storyId/postId instead of storing raw, unstable share links. The dataset lands as structured JSON you can pull straight from the Apify API without any HTML parsing on your side.

Agencies normalizing bulk URL lists

Clients hand over Facebook links in every format imaginable — bare usernames, /permalink/ links, pfbid share links pasted from a chat thread. Running the whole batch through this Actor once produces a single normalized table (contentType, storyId, pageId, publishedAt) that can be deduplicated and merged before it goes into a client report, instead of manually classifying each link by hand every time a new list arrives.

Data engineering and pipelines

Because every row uses the same fixed key set regardless of link format, the dataset can be loaded straight into a warehouse table without special-casing pfbid links versus /videos/ links versus /reel/ links. storyId/postId serve as the join key, and scrapedAt gives you a clean ingestion timestamp for incremental-load logic.

AI agents and automated pipelines

An agent that receives a Facebook link pasted into a chat can call this Actor as a tool to resolve it into a storyId/postId before handing that ID to a second tool (a comments fetcher, an ads-library lookup) that expects a numeric ID rather than a raw URL.

🔼 Input sample

ParameterRequiredTypeDescriptionExample Value
contentUrlsNoarrayContent permalinks — one per line. Accepts /posts/, /permalink/, /photo, /videos/, /watch, /reel/, and /story.php links (full URLs or bare usernames/paths). The legacy startUrls field is also accepted for backward compatibility.["https://www.facebook.com/NintendoAmerica/posts/pfbid02JESEPS..."]
includePublishDateNobooleanDecode publishedAt (ISO-8601 UTC) and publishedTimestamp (unix epoch) from the content's creation_time. Turn off for an ID-only run. Default: true.true
includeAuthorIdNobooleanInclude the author pageId and authorName of the content owner. Turn off if you only need the content IDs. Default: true.true
proxyConfigurationNoobjectApify Proxy. Leave off for a direct run; on tougher networks the Actor auto-escalates none → datacenter → residential (sticky) with a guest datr warmup and 403 retries.{ "useApifyProxy": false }
{
"contentUrls": [
"https://www.facebook.com/NintendoAmerica/posts/pfbid02JESEPSvyiLGjvewuFYhviAwQjTdxZW1ZfnWTeCzxVWgZLT3xgoLHVDwvuenVRyKKl",
"https://www.facebook.com/watch/?v=123456789",
"https://www.facebook.com/reel/987654321"
],
"includePublishDate": true,
"includeAuthorId": true,
"proxyConfiguration": { "useApifyProxy": false }
}

Common pitfall: a bare profile/Page URL (or a link with none of the content markers above) routes to the generic page branch, not the content decoder — storyId, postId, publishedAt, and pfbid will all come back null for that row. Make sure every line in contentUrls is a specific post/photo/video/reel/story permalink, not a Page or profile home URL, if you need the date and ID fields populated.

🔽 Output sample

One dataset row per resolved content URL, pushed as structured JSON (exportable as CSV, Excel, XML, or RSS like any Apify dataset):

{
"inputUrl": "https://www.facebook.com/NintendoAmerica/posts/pfbid02JESEPSvyiLGjvewuFYhviAwQjTdxZW1ZfnWTeCzxVWgZLT3xgoLHVDwvuenVRyKKl",
"contentType": "post",
"storyId": "1122334455",
"postId": "1122334455",
"pfbid": "pfbid02JESEPSvyiLGjvewuFYhviAwQjTdxZW1ZfnWTeCzxVWgZLT3xgoLHVDwvuenVRyKKl",
"pageId": "100064368354094",
"authorName": "Nintendo of America",
"publishedAt": "2024-01-01T00:00:00.000Z",
"publishedTimestamp": 1704067200,
"resolvedUrl": "https://www.facebook.com/NintendoAmerica/posts/123456789",
"scrapedAt": "2026-07-25T09:14:02.000Z",
"facebookUrl": "https://www.facebook.com/NintendoAmerica/posts/pfbid02JESEPSvyiLGjvewuFYhviAwQjTdxZW1ZfnWTeCzxVWgZLT3xgoLHVDwvuenVRyKKl",
"url": "https://www.facebook.com/NintendoAmerica/posts/123456789",
"facebookId": "1122334455",
"type": "post",
"openGraph": {
"type": "article",
"title": "Nintendo of America",
"description": "New details revealed...",
"url": "https://www.facebook.com/NintendoAmerica/posts/123456789",
"image": "https://scontent.xx.fbcdn.net/...",
"locale": "en_US"
},
"openGraphText": "{\"type\": \"article\", \"title\": \"Nintendo of America\", ...}",
"node": null,
"nodeText": null,
"group": null,
"groupText": null,
"groupTitle": null,
"user": null,
"userText": null,
"pageAdLibrary": null,
"pageAdLibraryText": null,
"source_url": "https://www.facebook.com/NintendoAmerica/posts/pfbid02JESEPSvyiLGjvewuFYhviAwQjTdxZW1ZfnWTeCzxVWgZLT3xgoLHVDwvuenVRyKKl",
"rawText": "{\"contentType\": \"post\", \"storyId\": \"1122334455\", ...}"
}

How do you filter and target specific URLs/IDs?

This is a converter, not a searchable directory, so there is no category, location, price, or rating filter to configure — the only real control is includePublishDate/includeAuthorId, which trims the payload to an ID-only row when you don't need date or author fields, and the two decode paths the router picks between: a content permalink (/posts/, /videos/, /reel/, etc.) resolves the full ID + date set, while a /groups/ or generic Page/profile URL resolves only group/page identity fields and leaves publishedAt/storyId/postId null. Precision here comes entirely from what you feed into contentUrls — there's no query, category, or crawl mode, so scope your run by curating the exact list of permalinks you want resolved, one per line, rather than by any in-Actor filter.

▶️ Want to try other Facebook scrapers?

Scraper NameWhat it extracts
Facebook Posts Scraper: Performance AnalyzerFull page-timeline posts with engagement/performance metrics
Facebook Reels Scraper: by Keyword SearchReel media and metadata discovered by keyword
Facebook Photos Scraper & High-Res Photo ExportHigh-resolution photos from a page or profile
Facebook Page Posts & Comments ScraperPage posts together with their comment threads
Facebook Posts Search ScraperPosts discovered via keyword search
Facebook Group Profile ScraperGroup profile details from group URLs/usernames/IDs
Facebook Ads Library Scraper: Creative & Ad Text DetailsAd creatives and ad text from the public Ads Library
Facebook Comments Scraper: Sentiment & Toxicity AnalysisComment threads with sentiment/toxicity scoring

How to extract Facebook data programmatically

This Actor runs as a standard Apify Actor: one API call with your token, structured JSON back — no browser, no scraping code of your own.

Python example

from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run_input = {
"contentUrls": [
"https://www.facebook.com/NintendoAmerica/posts/pfbid02JESEPSvyiLGjvewuFYhviAwQjTdxZW1ZfnWTeCzxVWgZLT3xgoLHVDwvuenVRyKKl",
"https://www.facebook.com/reel/987654321",
],
"includePublishDate": True,
"includeAuthorId": True,
}
run = client.actor("SimpleAPI/facebook-url-to-id-date-extractor-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["contentType"], item["storyId"], item["publishedAt"])

MCP for AI agents

Register the Actor with Apify's MCP server to expose it as a callable tool to any MCP-compatible agent:

$npx -y @apify/actors-mcp-server --actors SimpleAPI/facebook-url-to-id-date-extractor-scraper

A concrete use case: an agent resolves a pfbid link a user pasted into chat into a storyId, then passes that ID to a second tool call instead of re-parsing the URL itself. Works with Claude Desktop, Claude Code, and other MCP-compatible clients.

Export to spreadsheets or CRM

Use the dataset's built-in Export button to download CSV/Excel directly. Map storyId or postId as the primary key column, pageId/authorName as the attribution columns, and publishedAt as your date column when importing into a spreadsheet, BI tool, or CRM.

Yes. This Actor only reads what a public, logged-out visitor already receives when opening the link — it does not log in, bypass authentication, or access private/restricted content. Because it processes URLs and IDs rather than scraping bulk profile or comment data, the personal-data footprint is minimal: the only potentially personal fields are authorName and pageId, which reflect public Page/profile attribution shown on the content itself. If a submitted link points to an individual's personal profile rather than a public Page, treat authorName/pageId as personal data and handle it under GDPR/CCPA. Otherwise this is governed by Facebook's Terms of Service rather than data-privacy law. Consult legal counsel for commercial applications involving bulk storage of personal data.

❓ FAQ

What happens if the linked post, photo, or reel has been deleted or made private?

The Actor still returns a row, but with fewer fields filled in. contentType is classified from the URL itself and pfbid/a numeric ID are pulled from the URL string regardless of the fetch outcome; publishedAt, pageId, and authorName only populate when a matching Story node is found in the public HTML payload, so a deleted, private, or blocked page returns those fields as null rather than a guessed value.

Can I get the author's name and page ID along with the content ID?

Yes — includeAuthorId (default true) includes pageId and authorName for the content owner, decoded from the same Story node the ID/date fields come from. Turn it off if you only need the identifiers.

How accurate is the publish date?

publishedAt/publishedTimestamp are read directly from the content's own creation_time field in the public payload at request time — not estimated or inferred. If Facebook's logged-out payload doesn't expose a Story node for that URL, the date fields come back null instead of a guess.

How many records can I get per run?

There's no fixed cap in the input schema — the Actor processes every URL you list in contentUrls. Each charged row_result event corresponds to one output row; normally that's one row per input URL, though a single permalink can occasionally produce more than one row if the payload contains multiple matching Story nodes. A URL that fails to fetch (blocked, deleted, timed out) produces no row and is not billed under row_result.

Does this work on Facebook group or Page URLs too, not just post links?

It accepts them, but the ID and date decode described in this README is specific to content permalinks. A /groups/ URL returns group identity fields (group, groupTitle, facebookId) instead, and a generic Page/profile URL returns user/facebookId fields — in both cases storyId, postId, pfbid, and publishedAt stay null, since those only exist on content permalinks.

Is the pfbid value mathematically decoded into the numeric post ID?

No — this is the one real limitation to know going in. Facebook doesn't publish a public mapping from a pfbid token to its underlying numeric ID, so the Actor returns pfbid verbatim, exactly as it appears in the URL. The numeric storyId/postId are recovered independently, by reading the Story node in the page's own public payload — not by reversing the pfbid string. When no Story node is present, you'll get the pfbid token but a null storyId/postId.

Does this Actor work with Claude, ChatGPT, and AI agent frameworks?

Yes. It's reachable through Apify's MCP server (npx -y @apify/actors-mcp-server --actors SimpleAPI/facebook-url-to-id-date-extractor-scraper) for MCP-compatible clients like Claude Desktop and Claude Code, and it's callable as a plain HTTP/API endpoint by any agent framework that can make an authenticated REST call.

Can I use this without a Facebook API key or developer account?

Yes. No Facebook login, API key, or developer account is needed — the Actor fetches each URL as a logged-out guest visitor. The only optional credential is Apify Proxy, which you can leave off entirely for a direct run.

Conclusion

Facebook URL to ID Converter takes a messy list of public Facebook post, photo, video, reel, or permalink links and turns it into a schema-stable dataset of content IDs and publish dates — no login, no HTML parsing, and no per-link-format special-casing on your side. It's built for developers and agencies who need storyId/postId/pageId/publishedAt as a reliable join key rather than a raw share link. Paste your URLs into contentUrls and start a run on the Actor's page in Apify Console, or call it through the API, to get your first batch of decoded rows.