Facebook URL To ID Scraper & Multi-URL ID Converter avatar

Facebook URL To ID Scraper & Multi-URL ID Converter

Pricing

from $5.99 / 1,000 results

Go to Apify Store
Facebook URL To ID Scraper & Multi-URL ID Converter

Facebook URL To ID Scraper & Multi-URL ID Converter

Facebook URL to ID Scraper converts Facebook profile, page, post, group, and other URLs into Facebook IDs. Supports bulk multi-URL conversion for fast data processing, automation, audience research, and social media analysis.

Pricing

from $5.99 / 1,000 results

Rating

0.0

(0)

Developer

Scrapier

Scrapier

Maintained by Community

Actor stats

0

Bookmarked

25

Total users

1

Monthly active users

8 days ago

Last modified

Share

Facebook URL to ID Scraper — Convert Page, Group & Post Links

Paste a messy list of Facebook links — page URLs, profile links, group invites, post permalinks, short links like fb.me, or mobile m.facebook.com mirrors — and get back a clean, deduplicated table with each link's canonical URL and its numeric Facebook ID. Every response is structured JSON, ready to pass into a CRM, a Graph API call, an ad-targeting workflow, or an LLM prompt. No Facebook login is required, and the same run handles pages, profiles, groups, posts, videos, reels, and photos in one pass.

What is the Facebook URL to ID Scraper?

The Facebook URL To ID Scraper & Multi-URL ID Converter takes any list of raw, unclean Facebook links and turns them into a normalized dataset: one row per unique link, tagged with its entity type (page, profile, group, post, video, reel, photo, or event) and resolved to a public Facebook ID where one exists. It runs without a Facebook account or login — it fetches public pages the same way a logged-out browser would, and falls back through proxy tiers automatically if Facebook serves a block page.

  • Expands short links and redirect wrappers (fb.me, fb.watch, l.facebook.com/l.php?u=) to their real destination
  • Normalizes mobile/basic/regional hosts (m., mbasic., web., touch.facebook.com) to a single canonical www.facebook.com form
  • Strips tracking query parameters (fbclid, mibextid, ref, etc.) while keeping identity parameters (id, story_fbid, fbid)
  • Deduplicates links that resolve to the same canonical URL and records which inputs were collapsed
  • Classifies each link's entity type from its URL shape and resolves a numeric Facebook ID for pages, profiles, groups, and posts
  • Optionally drops links that never resolve to a real ID, instead of returning them with a null value

What data can you get with the Facebook URL to ID Scraper?

Every run returns one row per unique link, covering three areas: how the link was cleaned, what it resolved to, and a human-readable preview of the raw entity data behind it.

Result TypeExtracted FieldsPrimary Use Case
Link cleaning & classificationinputUrl, expandedUrl, canonicalUrl, wasExpanded, entityType, duplicatesCollapsedAudit trail showing exactly how a pasted link was normalized before lookup
ID resolutionfacebookId, type, scrapedAtThe numeric Facebook ID plus its resolved type — the join key for CRMs, Graph API calls, and ad platforms
Raw entity payload (stringified)openGraphText, userText, groupText, nodeText, pageAdLibraryTextA quick, human-readable preview of the underlying page/group/post metadata without opening a nested JSON column

Not every pasted link resolves — it can be private, deleted, or still blocked after proxy retries. Rather than dropping these silently, the Actor keeps them as a distinct row when strictPublicOnly is off: facebookId is null, a resolved: false flag is set, and canonicalUrl / entityType stay populated so you know what the link was even without an ID. Set strictPublicOnly to true to drop these rows entirely instead.

Why not build this yourself?

Meta's Graph API can resolve some object IDs, but only through the Graph API Explorer or an authenticated app with a valid access token, app review, and object-specific permissions — it isn't a drop-in tool for pasting a mixed list of raw links and getting IDs back. Building your own link-to-ID converter means writing a redirect-follower for half a dozen shortener and mirror hosts, a canonicalization layer that strips tracking parameters without breaking identity ones, per-entity-type HTML parsers for pages, groups, and posts, and block-detection logic that escalates through proxy tiers when Facebook serves a login wall instead of the page. This Actor already does all of that, so a link cleanup job that would otherwise take a custom scraping pipeline runs as a single paste-and-run task.

How to scrape Facebook with the Facebook URL to ID Scraper?

  1. Open the Actor on its Apify Store page and click Run, or call it via the Apify API.
  2. Paste your links into rawLinks — one per line. This is the only field that matters; the run does nothing without at least one link.
  3. Leave expandShortLinks and dedupeByCanonical on (their defaults) unless you specifically want raw, unexpanded input preserved.
  4. Optionally set strictPublicOnly to true if you only want rows with a real resolved ID, and add proxyConfiguration if your network needs a proxy from the start.
  5. Start the run and download the results as JSON or CSV from the dataset once it finishes.
{
"rawLinks": [
"https://m.facebook.com/NintendoAmerica",
"https://fb.me/NintendoAmerica",
"https://www.facebook.com/groups/germtheory.vs.terraintheory"
]
}

rawLinks accepts an array of any length — there's no separate "batch mode" to enable. Paste ten links or ten thousand, mixed formats and all (short links, mobile URLs, bare usernames, full URLs with tracking parameters), and the Actor expands, canonicalizes, deduplicates, and resolves each one in the same run, with duplicate collapses recorded per row via duplicatesCollapsed and dedupedFrom rather than silently discarded.

⬇️ Input

ParameterRequiredTypeDescriptionExample Value
rawLinksNoArrayRaw, unclean link list, one per line. Handles short links (fb.me, fb.watch), mobile/basic hosts, l.facebook.com redirect wrappers, /share/ links, bare usernames, and full URLs mixed together.["https://m.facebook.com/NintendoAmerica"]
expandShortLinksNoBooleanWhen on, short/wrapper links are followed over the network (or decoded inline for l.facebook.com) before cleaning. Default true.true
dedupeByCanonicalNoBooleanWhen on, links that normalize to the same canonical URL collapse into one row; extras are recorded in dedupedFrom. Default true.true
strictPublicOnlyNoBooleanWhen on, links that can't be resolved to a public Facebook ID are dropped entirely instead of emitted with a null ID. Default false.false
proxyConfigurationNoObjectOptional Apify Proxy. The Actor automatically escalates to residential and retries on Facebook 403/login-wall responses regardless of this setting.{"useApifyProxy": false}
{
"rawLinks": [
"https://m.facebook.com/NintendoAmerica",
"https://www.facebook.com/NintendoAmerica?mibextid=xyz123",
"https://www.facebook.com/groups/germtheory.vs.terraintheory"
],
"expandShortLinks": true,
"dedupeByCanonical": true,
"strictPublicOnly": false,
"proxyConfiguration": {
"useApifyProxy": false
}
}

Pitfall: strictPublicOnly only controls whether unresolved rows are dropped — it does not change billing on its own. Every row that does get pushed to the dataset (resolved or unresolved) is charged under the same row_result event. If your list contains many private or dead links, set strictPublicOnly: true before running at scale so you aren't charged for rows carrying a null facebookId.

⬆️ Output

Results are pushed to the Actor's dataset in real time, one row per unique cleaned link, and can be exported as JSON, CSV, Excel, or the other formats Apify's dataset export supports.

Scraped results

[
{
"facebookUrl": "https://www.facebook.com/NintendoAmerica",
"url": "https://www.facebook.com/NintendoAmerica",
"facebookId": "115119528499425",
"type": "page",
"user": { "id": "115119528499425" },
"openGraph": {
"title": "Nintendo of America",
"type": "page",
"url": "https://www.facebook.com/NintendoAmerica",
"description": "Official Nintendo of America Facebook page."
},
"openGraphText": "{\"title\":\"Nintendo of America\",\"type\":\"page\",\"url\":\"https://www.facebook.com/NintendoAmerica\"}",
"userText": "{\"id\":\"115119528499425\"}",
"groupText": "null",
"nodeText": "null",
"pageAdLibraryText": "null",
"inputUrl": "https://m.facebook.com/NintendoAmerica",
"expandedUrl": "https://m.facebook.com/NintendoAmerica",
"canonicalUrl": "https://www.facebook.com/NintendoAmerica",
"wasExpanded": false,
"entityType": "page",
"duplicatesCollapsed": 2,
"dedupedFrom": [
"https://fb.me/NintendoAmerica",
"https://www.facebook.com/NintendoAmerica?mibextid=xyz123"
],
"scrapedAt": "2026-07-25T10:00:00.000000+00:00"
},
{
"facebookUrl": "https://www.facebook.com/groups/germtheory.vs.terraintheory",
"url": "https://www.facebook.com/groups/germtheory.vs.terraintheory",
"facebookId": "182233895440021",
"type": "group",
"group": {
"id": "182233895440021",
"name": "Germ Theory vs Terrain Theory",
"url": "https://www.facebook.com/groups/germtheory.vs.terraintheory",
"viewer_join_state": "NOT_JOINED"
},
"groupText": "{\"id\":\"182233895440021\",\"name\":\"Germ Theory vs Terrain Theory\"}",
"nodeText": "null",
"pageAdLibraryText": "null",
"userText": "null",
"inputUrl": "https://www.facebook.com/groups/germtheory.vs.terraintheory",
"expandedUrl": "https://www.facebook.com/groups/germtheory.vs.terraintheory",
"canonicalUrl": "https://www.facebook.com/groups/germtheory.vs.terraintheory",
"wasExpanded": false,
"entityType": "group",
"duplicatesCollapsed": 0,
"dedupedFrom": [],
"scrapedAt": "2026-07-25T10:00:05.000000+00:00"
},
{
"inputUrl": "https://www.facebook.com/profile.php?id=100064368354094",
"expandedUrl": "https://www.facebook.com/profile.php?id=100064368354094",
"canonicalUrl": "https://www.facebook.com/profile.php?id=100064368354094",
"wasExpanded": false,
"entityType": "profile",
"facebookUrl": "https://www.facebook.com/profile.php?id=100064368354094",
"url": "https://www.facebook.com/profile.php?id=100064368354094",
"facebookId": null,
"type": "profile",
"duplicatesCollapsed": 0,
"dedupedFrom": [],
"resolved": false,
"scrapedAt": "2026-07-25T10:00:10.000000+00:00"
}
]

How can I use the data extracted with the Facebook URL to ID Scraper?

  • Developers building on the Graph API: Graph API endpoints need a numeric object ID, not a vanity URL. Run your link list through this Actor first, then pass the facebookId values straight into your Graph API calls.
  • Ad campaign targeting by ID: Ads Manager, the Ad Library API, and audience-matching tools reference pages by ID. Convert a spreadsheet of competitor or partner page URLs into IDs before loading them into a targeting or exclusion list.
  • Data pipeline integration: Feed messy link lists collected from forms, CRMs, or scraped comment sections through rawLinks to get a deduplicated, canonical, ID-tagged table ready to join against existing records.
  • AI engineers and LLM developers: Ground an agent that receives raw Facebook links from a user by resolving them to stable IDs and entity types first, then passing that structured JSON into the model as context instead of an unparsed URL.

Integrate the Facebook URL to ID Scraper and automate your workflow

The Facebook URL To ID Scraper & Multi-URL ID Converter works with any language or tool that can send an HTTP request.

REST API with Python

import requests
ACTOR_ID = "scrapier~facebook-url-to-id-scraper-multi-url-id-converter"
TOKEN = "your_apify_token"
payload = {
"rawLinks": [
"https://fb.me/NintendoAmerica",
"https://m.facebook.com/groups/germtheory.vs.terraintheory",
]
}
url = f"https://api.apify.com/v2/acts/{ACTOR_ID}/run-sync-get-dataset-items?token={TOKEN}"
resp = requests.post(url, json=payload)
for row in resp.json():
print(row["canonicalUrl"], "->", row["facebookId"])

MCP for query-grounded AI agents

This Actor is reachable through Apify's generic Actors MCP Server — no dedicated MCP build required. Register it with:

npx -y @apify/actors-mcp-server --actors scrapier/facebook-url-to-id-scraper-multi-url-id-converter

An MCP-compatible client (Claude Desktop, Claude Code, or any MCP-aware agent framework) can then call the Actor as a tool: the agent receives a raw link from the user, calls the tool, gets back structured JSON with the resolved ID, and uses it in its next step.

Scheduled monitoring and delivery

The Actor itself has no built-in scheduler. Use Apify's Schedules to run it on a recurring cadence against a maintained link list, and Apify's dataset webhooks to push each run's results to your own endpoint as soon as the run finishes, instead of polling manually.

Yes — converting a publicly accessible Facebook URL into its numeric ID processes only what any visitor to that URL already sees; the Actor requires no login and accesses no private data. Page, group, and post IDs are technical, business-oriented identifiers rather than personal data by themselves, so this use case sits closer to a ToS and database-rights framing than to GDPR/CCPA personal-data rules — though resolving a personal profile.php link does return an identifier tied to an individual, so treat those rows with the same care as any personal data under your applicable law. Scraping for internal ID mapping or ad targeting carries a different risk profile than scraping for bulk storage or AI training. Consult your legal team for commercial use cases involving bulk data storage.

Frequently asked questions

Do I need a Facebook account or login to use this scraper?

No. The Actor fetches public pages the way a logged-out visitor would, warming a guest session cookie first to reduce login-wall redirects. You never provide Facebook credentials.

The input schema places no maximum on rawLinks — paste as many as you want. Each cleaned link is resolved sequentially with a short pause between requests, so total runtime scales with your list size and your run's compute/time budget rather than a fixed row cap.

What happens if a URL doesn't resolve to a valid ID?

By default it's still returned as a row with facebookId: null and resolved: false, tagged with whatever entityType and canonicalUrl were determined, so you can see what was attempted. Set strictPublicOnly to true to drop these rows instead of returning them.

Yes, when expandShortLinks is on (the default). fb.me, fb.watch, and m.me links are followed over the network to their real destination, and l.facebook.com/l.php?u= links are decoded inline without a network call.

Yes, when dedupeByCanonical is on (the default). Links that normalize to the same canonical www.facebook.com URL collapse into a single row, and the collapsed inputs are listed in that row's dedupedFrom field.

What Facebook entity types can it identify?

The entityType field classifies each cleaned link as one of page, profile, group, post, video, reel, photo, or event, based on the URL's path shape. ID resolution itself is implemented for pages, profiles, groups, and posts.

Do I need to configure a proxy?

No. Proxy use is optional, and the Actor automatically escalates from a direct connection to a datacenter proxy to a sticky residential proxy on its own if Facebook returns a block, login wall, or checkpoint page — regardless of what you set in proxyConfiguration.

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

Yes. It's reachable through Apify's Actors MCP Server (npx -y @apify/actors-mcp-server --actors scrapier/facebook-url-to-id-scraper-multi-url-id-converter) for MCP clients, and callable as a plain HTTP endpoint by any other agent framework that can issue a POST request.

How does this scraper compare to other Facebook URL-to-ID scrapers?

As observed on their Apify Store listings on 2026-07-26, both apify/facebook-url-to-id and scrapio/facebook-url-to-id-scraper also accept an array of multiple links per run and resolve redirects — bulk conversion is common across this category, not unique to this Actor. This Actor's distinct behavior is keeping unresolved links as visible null-ID rows (with a dedupedFrom audit trail for collapsed duplicates) rather than silently skipping them, which scrapio's listing states it does by default.

Can I use this scraper without managing proxies or platform credentials?

Yes. No Facebook login, cookies, or access token are required, and proxy configuration is optional — the Actor handles guest-session warmup and proxy escalation internally. You only need an Apify account to run it.

Your feedback

Found a link format this Actor doesn't clean correctly, or a field that's missing from a row? Let us know through the Issues tab on this Actor's Apify Store page — reports like this directly shape what gets fixed next.