Facebook URL to ID avatar

Facebook URL to ID

Pricing

Pay per usage

Go to Apify Store
Facebook URL to ID

Facebook URL to ID

Facebook URL to ID: paste Facebook Page, group, event or post links, handles or mobile links and get the numeric Facebook ID, object type, name and canonical URL. Free. Batch input with dedupe and a status per line. Personal profiles are skipped. No login.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Viktor Dubnytskiy

Viktor Dubnytskiy

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

17 hours ago

Last modified

Features

Limited permissions

Share

Free. Paste Facebook Page, group, event or post links in any form and get back the numeric Facebook ID, the object type, the name and Facebook's canonical URL, one row per line you pasted. No login, no cookies.

Try it: the prefilled example returns 6 rows in about 10 seconds. The actor is free; you pay only Apify platform usage (about $0.002 for the example).

Coverage: public Pages, public groups, events and posts. Personal profiles are recognised and skipped on purpose (no ID, no name, no URL). Objects that Facebook says do not exist come back as not_found; private groups and anything Facebook only shows behind its login page come back as unavailable.

Why this one

  • Paste anything, not only desktop links. Bare handles (nasa, @nasa), numeric IDs, m.facebook.com, web.facebook.com, fb.com, /pg/ and /pages/<name>/<id> links, tracking parameters: all are normalized to one www.facebook.com URL before the lookup. In the example, https://m.facebook.com/Microsoft/?ref=bookmarks resolves to 100064903443387.
  • Duplicates are resolved once. The example lists NASA twice (nasa and profile.php?id=100044561550831); the second row is marked duplicateOf: "nasa" and is not fetched again. An exact repeat of a line gets its own row too, so the output always has one row per input line (line = position in your list).
  • Every line gets an answer with a status. ok, ok_unverified, not_found, unavailable, blocked, invalid or skipped, so a 500-line list can be joined back on line without guessing which lines failed.
  • IDs that the URL already carries cost no request. Group post permalinks, reels, watch?v= and story_fbid links are answered instantly as ok_unverified (read from the link, not checked against Facebook).
  • Same input format as other Facebook ID tools. A saved fbUrls: [{"url": ...}] input can be pasted as-is.

What you get

Real rows from the example dataset:

inputtypeidnamestatus
nasapage100044561550831NASA - National Aeronautics and Space Administrationok
https://m.facebook.com/Microsoft/?ref=bookmarkspage100064903443387Microsoftok
https://www.facebook.com/groups/pythonprogramminglanguage/group692268140863644Pythonok
https://www.facebook.com/events/1343159087434618/event1343159087434618New York Rangers vs. Philadelphia Flyersok
https://www.facebook.com/NASA/posts/pfbid02hwYX8...post1671214107707292ok
https://www.facebook.com/profile.php?id=100044561550831page100044561550831NASA - National Aeronautics and Space Administrationok, duplicateOf nasa

Full row: line, input, url (normalized; /<post id> for posts, empty for profiles), type, id, name, status, canonicalUrl, category (Pages, e.g. "Government organization"), legacyPageId (the classic Page ID when Facebook still shows it, e.g. NASA 54971236771), duplicateOf, duplicateOfLine, skipped, tier, scrapedAt.

If you are moving from a tool that returns the classic Page ID, that number is in legacyPageId; id is the current Page profile ID.

For posts canonicalUrl is the neutral https://www.facebook.com/<post id> permalink.

Next step: our Facebook scrapers

You have the ID; these actors (paid per result, no login) take the same Pages, groups and events further:

Input

FieldMeaningDefault
urlsURLs, handles or numeric IDs, one per line6 example lines
fbUrlsOptional [{"url": ...}] list, the format other Facebook ID tools use; merged with urlsempty
maxItemsRows to return, one per input line; lines past it are not processed1000

For lists longer than 1,000 lines raise maxItems. When it cuts a list, the run log and the RUN_SUMMARY record (unprocessedLines) say how many lines were left out.

Cost

The actor itself is free. Apify bills platform usage (compute and proxy traffic) to your account: Pages, events and posts are read without a proxy where Facebook allows it, public groups need a residential IP (about 0.2 MB of residential traffic per group in the example).

Found it useful? A short review on the Store page helps other people find this actor. If something is wrong, open an issue on the actor page.

How it works

  1. Each line is normalized: host, path form and tracking parameters are cleaned, the object type is read from the path.
  2. IDs already in the URL (group posts, reels, watch links) are returned directly.
  3. Everything else is read from the page Facebook serves to logged-out visitors (fb://profile/<id>, fb://group/<id>, eventID, the canonical post URL). Four lookups run in parallel with short pauses. When Facebook answers with its login page, the lookup is retried on a datacenter and then a residential IP; public groups go straight to residential and get a second try on a fresh residential session.
  4. A line is not_found only when Facebook says "This content isn't available right now". A line that gets the login page on every IP is unavailable (missing, private or walled: Facebook does not say which). A line refused outright on every IP is blocked.
  5. A run in which nothing resolved, nothing was proven missing and at least one line hit a wall ends as blocked, so a walled run is never mistaken for an empty answer.

Limits

  • Personal profiles are never resolved: the row says type: "profile", status: "skipped" and carries no ID or name. A Page is resolved only when Facebook marks it as a Page.
  • Private and secret groups and objects visible only to logged-in users come back as unavailable.
  • Post names are not returned (post text can name people); use the ID.
  • Share links (/share/...) and fb.me links are followed, but Facebook does not always redirect logged-out visitors.

FAQ

Which ID do I get for a Page? The current Page profile ID that Facebook uses in its apps (fb://profile/<id>). When Facebook still exposes the classic Page ID, it is in legacyPageId.

Does it need a Facebook account? No. There is no login or cookie field.

Why was a line skipped? It points to a personal profile. Resolving people is out of scope.

Changelog

  • 0.1: initial release: Pages, groups, events and posts; handle and mobile-link normalization; per-line status; duplicates resolved once; free; profiles and posts never carry a URL that names a person.