Facebook Url To Id Scraper
Pricing
$14.99/month + usage
Facebook Url To Id Scraper
The Facebook URL To ID Scraper converts Facebook profile, page, group, and post URLs into their numeric IDs. It extracts clean, structured identifiers for automation, data matching, integrations, and advanced scraping workflows, delivered in JSON or CSV.
Pricing
$14.99/month + usage
Rating
5.0
(6)
Developer
Scraper Engine
Maintained by CommunityActor stats
0
Bookmarked
110
Total users
3
Monthly active users
4 days ago
Last modified
Categories
Share
Facebook ID Scraper — Convert URLs to Page, Group and Post IDs
Facebook URL to ID Scraper converts any public Facebook page, group, or post link into its stable numeric facebookId, along with the resolved url, the object type, and the OpenGraph metadata Facebook exposes on that link. Paste a list of URLs or usernames and each one comes back as a structured JSON row — no HTML parsing, no manual copy-pasting IDs out of page source. Start a run on Apify to convert your first batch.
What is Facebook URL to ID Scraper?
Facebook URL to ID Scraper is a utility Actor that takes a list of Facebook links, usernames, or keywords and resolves each one to its stable numeric Facebook ID, detecting whether the link points to a page, group, or post along the way. It fetches the public, logged-out version of each URL — no Facebook account, login, or cookies are required or used. It's built for developers, ad-tech engineers, and data teams who need clean numeric FB IDs to feed into the Graph API, ad platforms, CRMs, or deduplication pipelines instead of copy-pasting IDs out of page source by hand.
What Facebook ID data is publicly available to scrape?
Facebook exposes object identity and OpenGraph metadata on the logged-out version of most pages, groups, and post permalinks; content behind a closed group or a login/checkpoint wall is not accessible without an account.
| Data category | Publicly available (no login) | Requires login / membership |
|---|---|---|
| Page identity (ID, name, OpenGraph title/description/image) | Yes | — |
| Public group identity (ID, name, member-count text, join state) | Yes | — |
| Closed/private group interior and full member list | — | Requires membership |
| Post permalink metadata (post ID, story node, OpenGraph preview) | Yes | — |
| Full post body, comments, and reactions | — | Not extracted here |
Meta Ad Library hint tied to a page (pageAdLibrary ID) | Yes — public | — |
Facebook URL to ID Scraper only returns publicly visible data — what any visitor sees. Nothing behind a login wall.
What data can I extract with Facebook URL to ID Scraper?
Every resolved URL returns identity fields, nested context objects specific to the object type, and stringified text twins of those objects for easy table viewing. The 10 fields below are always present in each row (shown in the dataset's default view); the fields further down are added when the resolved object is a group or post.
| Field name | Description |
|---|---|
facebookUrl | The resolved/canonical Facebook URL for the input. |
url | The normalized URL (permalink form for posts). |
facebookId | The stable numeric (or string) Facebook ID resolved for the object. Null if no ID could be found. |
type | The detected object type: page, group, or post. |
source_url | The exact input value you supplied, before normalization. |
groupTitle | The group's display name (groups only). |
postId | The post-specific ID from the post's Story node (posts only). |
pageId | ID of the page/profile that owns a post, read from feedback.owning_profile (posts only). |
Nested context objects
| Field name | Description |
|---|---|
group | Group object: id, name, url, profile_picture.uri, viewer_join_state, viewer_forum_join_state, group_member_profiles.formatted_count_text (groups only). |
node | Post Story node: __typename, id, creation_time, seo_title, actors[] (posts, and groups when a story is embedded). |
user | Raw Facebook user/page object matched on the page (pages only); shape is passed through as Facebook returns it. |
pageAdLibrary | Ad Library / delegate-page ID hint, when Facebook exposes one (pages and posts). |
mainColumnTiles | Fallback identity object used only when no user object is found on a page. |
openGraph | OpenGraph + al: metadata: title, description, url, image, type, locale, app_name, package, app_store_id, alt. |
Table-display text fields
| Field name | Description |
|---|---|
openGraphText | JSON-stringified copy of openGraph, for flat table/CSV viewing. |
groupText | JSON-stringified copy of group. |
nodeText | JSON-stringified copy of node. |
pageAdLibraryText | JSON-stringified copy of pageAdLibrary. |
userText | JSON-stringified copy of user. |
rawText | JSON-stringified copy of the entire normalized row. |
🤖 Add-on: Need additional Facebook data?
If you need more than an ID, pair this Actor with a content-focused sibling: Facebook Page Posts Scraper With Engagement Analytics for post-level engagement once you have the page ID, Facebook Group Profile Scraper: Rules & Topics Extractor for group rules and topics, or Facebook Ads Library Scraper & Creative Media to pull ad creatives once you have a page's numeric ID from this Actor.
Why not build this yourself?
Facebook ships object data inside application/json script tags whose structure (__typename markers, nested group/node/user shapes) changes without notice, so a hand-rolled parser breaks silently every time Facebook updates its markup. Logged-out requests also get redirected to a login or checkpoint page unless the client carries a warmed-up guest session and routes through a residential IP — this Actor forces the Apify RESIDENTIAL proxy group, seeds a guest datr cookie on the Facebook homepage before every fetch, and retries up to three times on a fresh residential IP when a request is blocked. Maintaining that proxy rotation, session warmup, and block-detection logic (login/checkpoint redirects, HTML login-page signatures, short/error responses) yourself is ongoing engineering work; running it as an Actor means that logic is already built and versioned.
How to use Facebook URL to ID Scraper
Facebook URL to ID Scraper runs on the Apify platform — no separate signup or API key is needed beyond your Apify account.
- Open the Actor's page on its Apify Store listing (Scraper-Engine account) and click Try for free / Start.
- Provide the required input:
startUrls— a list of full Facebook URLs, bare usernames, or keywords, one per line. - Optionally configure
proxyConfiguration— it defaults to the RESIDENTIAL proxy group, which is recommended for reliable resolution. - Click Start to run the Actor.
- Download or stream the results from the dataset in JSON, CSV, or another Apify export format.
How to scale to bulk Facebook URL-to-ID conversion
startUrls is already an array, so bulk conversion just means pasting more lines into the same field — hundreds of URLs, usernames, or keywords in one run. The Actor processes them sequentially, resolving each one through a residential proxy with a short delay between requests, and pushes one dataset row per resolved object. There is no separate bulk-mode parameter; scaling up is simply a longer startUrls list, or multiple runs if you want to split a very large list across jobs.
What can you do with Facebook ID data?
- A growth engineer cleaning up a spreadsheet of mixed Facebook links uses
facebookIdandtypeto deduplicate pages, groups, and posts before loading them into a CRM. - An ads analyst building competitive research uses
pageAdLibraryalongsidefacebookIdto line a page's numeric ID up with Meta Ad Library lookups. - A data engineer building an ETL pipeline uses
urlandsource_urlto map legacy vanity links to permanent numeric IDs so downstream joins survive Facebook username changes. - A community manager tracking group health uses
groupTitleand thegroup_member_profiles.formatted_count_textfield to monitor member-count trends across groups they moderate. - An AI engineer building a lead-enrichment agent feeds
facebookId,openGraph.title, andopenGraph.descriptionstraight into an LLM prompt to summarize a page's public presence without writing an HTML parser.
How does Facebook URL to ID Scraper handle rate limits and blocking?
The Actor routes every request through the Apify RESIDENTIAL proxy group (the only proxy group this account exposes) and warms up a guest session on the Facebook homepage before each fetch to seed a datr cookie, which makes Facebook more willing to serve public content instead of a login wall. Each URL gets up to three fetch attempts, rotating to a fresh residential IP between attempts, if the response comes back as an HTTP 403/429/503, a redirect to a login or checkpoint page, or HTML that matches login-page or checkpoint-blocking signatures. If all attempts are blocked, the Actor logs a warning and moves on; if extracted data still looks like a login page after fetching, that item is dropped and not pushed to the dataset, so you are not charged for it. The Actor does not solve CAPTCHAs.
⬇️ Input
| Parameter | Required | Type | Description | Example Value |
|---|---|---|---|---|
startUrls | Yes | array | Full Facebook URLs, bare usernames, or keywords to resolve. One item per line — bulk-friendly for spreadsheet imports. | ["https://www.facebook.com/NintendoAmerica"] |
proxyConfiguration | No | object | Optional Apify Proxy configuration. Defaults to the RESIDENTIAL proxy group. | {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]} |
Example input
{"startUrls": ["https://www.facebook.com/NintendoAmerica"],"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"]}}
⬆️ Output
Results are pushed to the Actor's dataset as one flat, typed JSON row per resolved object, exportable in JSON, CSV, Excel, XML, or HTML table format directly from the Apify Console. Every row carries the same 10 base fields; extra nested keys appear depending on whether the object is a page, group, or post.
Example output
{"source_url": "https://www.facebook.com/NintendoAmerica","facebookUrl": "https://www.facebook.com/NintendoAmerica","url": "https://www.facebook.com/NintendoAmerica","facebookId": "175503395969","type": "page","user": {"id": "175503395969","name": "Nintendo of America"},"openGraph": {"title": "Nintendo of America","description": "Nintendo of America. 6,000,000 likes.","url": "https://www.facebook.com/NintendoAmerica","image": "https://scontent.xx.fbcdn.net/example.jpg","type": "website","locale": "en_US"},"pageAdLibrary": {"id": "175503395969"},"openGraphText": "{\"title\":\"Nintendo of America\",\"description\":\"Nintendo of America. 6,000,000 likes.\"}","groupText": null,"nodeText": null,"pageAdLibraryText": "{\"id\":\"175503395969\"}","userText": "{\"id\":\"175503395969\",\"name\":\"Nintendo of America\"}","rawText": "{\"source_url\":\"https://www.facebook.com/NintendoAmerica\",\"facebookId\":\"175503395969\", ...}"}
A group URL instead returns groupTitle and a populated group / groupText object with id, name, and member-count fields; a post permalink instead returns postId, pageId, and a populated node / nodeText Story object.
How does it work?
Facebook URL to ID Scraper makes a direct, logged-out HTTP request to each Facebook URL — an aiohttp fetch, not a full headless browser — routed through an Apify RESIDENTIAL proxy IP. Before the real request, it visits the Facebook homepage once on the same IP to pick up a guest datr cookie, which Facebook uses as a signal that the client isn't a bot. The response HTML is parsed with BeautifulSoup: OpenGraph and al: meta tags are read directly, and the embedded application/json script tags are walked recursively to find the group, node, user, or pageAdLibrary object and pull out the numeric ID. Only what's visible on the public, logged-out page is ever returned, and the output schema (the same field names described above) stays the same regardless of how Facebook's internal HTML structure changes.
Integrations
Facebook URL to ID Scraper runs on Apify, so it works with the tools already built around the Apify platform and any client that can make an HTTP request.
Calling Facebook URL to ID Scraper programmatically
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_API_TOKEN>")run = client.actor("scraper-engine/facebook-url-to-id-scraper").call(run_input={"startUrls": ["https://www.facebook.com/NintendoAmerica"]})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["facebookId"], item["type"])
Works in Go, Ruby, Node.js, cURL — any language that can make an HTTP request.
No-code tools (n8n, Make, LangChain)
In n8n, use the HTTP Request node pointed at the Actor's run endpoint (https://api.apify.com/v2/acts/scraper-engine~facebook-url-to-id-scraper/runs) with your API token. In Make, use the Apify app's "Run Actor" module and map startUrls from an upstream spreadsheet or webhook. In LangChain, wrap the same run/dataset calls in a custom tool or the community Apify tool integration so an agent can resolve Facebook IDs as part of a larger chain.
Is it legal to scrape Facebook IDs?
Scraping publicly available web data, such as the page, group, and post identifiers this Actor returns, is generally lawful in most jurisdictions. Facebook URL to ID Scraper only accesses the public, logged-out version of a URL — the same page any visitor without an account can see. Numeric Facebook IDs and page/group identifiers are technical and business data, not personal data by themselves, so this falls under Facebook's Terms of Service rather than a personal-data regime like GDPR or CCPA. If your use case involves resolving IDs tied to identifiable individuals at scale, or bulk-storing the results, consult legal counsel before you build on top of this data.
Frequently asked questions
What Facebook fields does Facebook URL to ID Scraper return?
facebookId, facebookUrl, type, url, and a nested context object (user, group, or node depending on the object type) are the core fields — see the data fields section above for the full list.
Does Facebook URL to ID Scraper require a Facebook account or login?
No. It only fetches the public, logged-out version of each URL — no account, password, or cookies need to be supplied.
How many Facebook URLs can I resolve in one run?
startUrls accepts an unbounded array — the Actor loops over every item sequentially with a short delay between requests. There is no fixed cap in the input schema; very large lists can also be split across multiple runs.
What happens if a URL doesn't resolve to a valid ID?
Two things can happen: if the fetch is blocked or redirected to a login/checkpoint page, the Actor drops that item entirely and pushes no row for it (so it isn't charged); if the page fetches successfully but no ID is found in the embedded data, a row is still pushed with facebookId set to null so you can see which inputs need review.
Can I scrape multiple Facebook URLs at once?
Yes. startUrls is an array — add as many URLs, usernames, or keywords as you need and they're all resolved within the same run.
Does Facebook URL to ID Scraper work with Claude, ChatGPT, and other AI agent tools?
Yes, indirectly: it's callable through the Apify API's run endpoint, so any agent framework that can make an HTTP request — LangChain, custom tool-calling agents, or a script behind an LLM — can trigger a run and consume the JSON output directly.
How does Facebook URL to ID Scraper compare to manually looking up Facebook IDs?
It replaces one-off manual steps — opening a page, viewing source, or using Facebook's Graph API Explorer one link at a time — with a single batch run that returns structured JSON for hundreds of URLs at once, without requiring an access token or app review.
Does Facebook URL to ID Scraper return data in a format LLMs can use directly?
Yes. Output is typed, normalized JSON with consistent field names across runs — no HTML parsing or CSS selectors needed. Pass it directly to an LLM prompt, index it into a vector store, or feed it to an agent tool.
What happens when Facebook changes its layout or anti-bot system?
The Actor is maintained and its output field names stay stable across updates; no specific turnaround time is promised for any given layout change.
Can I use Facebook URL to ID Scraper without managing proxies or browser infrastructure?
Yes. Residential proxy rotation and guest-session warmup are handled internally, and because the Actor uses direct HTTP fetches rather than a headless browser, there's no browser infrastructure to manage on your end either.
Which Facebook ID fields work best for AI training data and RAG indexing?
For RAG, index the high-information text fields — openGraph.title and openGraph.description — alongside facebookId as the lookup key. For training data or deduplication, facebookId and type are the most consistent structured fields across every row, since they're always present and typed as plain strings.
Related scrapers
| Scraper | What it extracts |
|---|---|
| Facebook Page Posts Scraper With Engagement Analytics | Page posts and engagement metrics |
| Facebook Group Profile Scraper: Rules & Topics Extractor | Group rules and topics |
| Facebook Ads Library Scraper & Creative Media | Ad Library creatives by page |
| Facebook Comments Scraper: Reaction Breakdown | Comments with reaction breakdowns |
| Facebook User Search Scraper: Photos & AI Bio Analysis | Profile search with photos and AI bios |
| Facebook Groups Search Scraper | Group discovery by keyword |
Your feedback
Found a bug or a field that doesn't match what's documented here? Let us know via the Actor's issue tracker on its Apify Store listing so it can get fixed — active maintenance keeps this Actor's output reliable for everyone using it.


