Facebook URL to ID Scraper avatar

Facebook URL to ID Scraper

Pricing

from $0.34 / 1,000 item extracteds

Go to Apify Store
Facebook URL to ID Scraper

Facebook URL to ID Scraper

Resolve public Facebook URLs into stable numeric IDs, typed canonical URLs, and clear per-link resolution metadata.

Pricing

from $0.34 / 1,000 item extracteds

Rating

0.0

(0)

Developer

Fetch Cat

Fetch Cat

Maintained by Community

Actor stats

0

Bookmarked

14

Total users

1

Monthly active users

7 days ago

Last modified

Security

Limited permissions

Share

Use this Facebook ID finder to convert public Facebook URLs into stable numeric IDs, typed canonical URLs, and integration-ready resolution records. Read IDs already present in page, profile, post, photo, reel, video, group, and event links, with optional public alias resolution for pages and profiles. It works as a bulk Facebook page ID finder and Facebook URL converter for downstream workflows.

Use the Actor to normalize social links before API calls, CRM enrichment, deduplication, analytics joins, or spreadsheet exports. Numeric URL formats resolve locally. Public vanity Page and Profile links are resolved when Facebook exposes a target-bound public identity.

Quick start

Start with the small input below, run the Actor and inspect its results.

{
"facebookUrls": [
{
"url": "https://www.facebook.com/nasa"
},
{
"url": "https://www.facebook.com/profile.php?id=4"
},
{
"url": "https://www.facebook.com/reel/10155466919515153"
}
],
"maxItems": 3
}

Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.

Ready-to-run examples

Choose a public example to see its settings before starting a run:

What you get

A resolution record for each processed normalized URL, with a numeric ID when resolved, object type, canonical URLs, method and explicit status or error. Numeric URL formats are read locally, while public Page/profile aliases depend on an exposed target-bound identity. Reading an ID is not account-existence or access verification.

Who is it for?

  • Developers normalizing Facebook links before API calls
  • Data teams deduplicating social profiles and joining records by stable IDs
  • CRM and automation teams validating public links in bulk
  • Analysts preparing clean Facebook URL datasets for spreadsheets or databases

How you can use the data

  • Prepare a mixed-link CRM inventory. Use the existing mobile profile and NASA alias recipe. Keep sourceUrl, canonicalUrl, facebookId, objectType and status together before joining records in your own system.
  • Separate object types before API use. Inspect typed numeric group, event, Reel, photo or post results rather than passing every ID as a Page ID. Only resolved records should enter downstream calls, and an ID does not provide access credentials.
  • Review unresolved aliases explicitly. Keep their source URL and error alongside successful results. Public Page/profile alias resolution can be unavailable, while opaque post tokens and vanity groups/events are unsupported as numeric identities.
  • Keep input lineage in deduplication. Retain original and normalized URLs with resolution times. The item cap admits the first nonempty entries before duplicate normalized URLs are removed, so duplicates can reduce the final distinct record count.

Input settings

{
"facebookUrls": [
{"url": "https://www.facebook.com/nasa"},
{"url": "https://www.facebook.com/profile.php?id=4"},
{"url": "https://www.facebook.com/reel/10155466919515153"}
],
"maxItems": 3
}

More input settings

FieldTypeDescription
facebookUrlsarrayOne or more public Facebook URL objects, up to 10,000
Maximum URLs (maxItems)integerAdmit the first N non-empty entries before removing duplicate normalized URLs. 1–10,000, default 100

Use URL objects as shown above. The form has no connection selector. No proxy configuration is supported.

Input recipes

Read IDs from numeric group and event links

{"facebookUrls":[{"url":"https://www.facebook.com/groups/20531316728"},{"url":"https://www.facebook.com/events/113779332012976"}]}

Normalize mixed URLs for a CRM import

{"facebookUrls":[{"url":"https://m.facebook.com/profile.php?id=4&utm_source=test"},{"url":"https://www.facebook.com/nasa"}],"maxItems":2}

Output data

Shape-only illustration for a numeric profile URL. This is not a live account verification.

{
"sourceUrl": "https://www.facebook.com/profile.php?id=4",
"canonicalUrl": "https://www.facebook.com/profile.php?id=4",
"facebookId": "4",
"objectType": "profile",
"parentId": null,
"ownerHandle": null,
"canonicalEntityUrl": "https://www.facebook.com/profile.php?id=4",
"resolutionMethod": "query_parameter",
"status": "resolved",
"error": null,
"resolvedAt": "2026-08-13T12:00:00.000Z"
}

More output fields

FieldDescription
sourceUrlSupplied URL with surrounding whitespace removed
canonicalUrlNormalized HTTPS Facebook URL with tracking removed
facebookIdStable numeric ID, or null when unresolved
objectTypepage, profile, profile_or_page, group, event, post, photo, video, reel, or unknown
parentIdExplicit numeric owner/parent from the source URL, when present
ownerHandleExplicit vanity owner handle from the source URL, when present
canonicalEntityUrlURL constructed from the ID and type, or null. Not a verified destination
resolutionMethodHow the ID was resolved
statusresolved or unresolved
errorClear reason for an unresolved row
resolvedAtISO 8601 processing timestamp

Download your results

Open your run's dataset, choose Export and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.

See Apify's download and export guide for the available formats and field options.

Pricing

Pay-per-event pricing uses one start event after valid input is admitted and one item event for each successfully resolved row. Unresolved diagnostic rows do not incur item events.

See the live Pricing tab for current plan-specific rates.

Tips for best results

  • Keep numeric IDs in URLs when available. Supported numeric formats can resolve locally without relying on a public alias page.
  • Filter for resolved status before downstream API use. Inspect object type rather than treating every numeric ID as a Page.
  • Preserve source URLs for lineage. Use resolved IDs with the corresponding type in your own joins.
  • Keep alias-heavy batches small. The five-minute run limit can leave larger inputs unfinished.
  • Read unresolved errors before retrying. Missing public alias identity does not establish privacy, deletion or account nonexistence.

Limits and caveats

Duplicate normalized URLs are processed once, after the first nonempty entries are admitted under the item cap. Results retain normalized input order rather than a user-selected sort.

An unresolved alias does not discard successfully resolved rows from the same batch. Invalid or non-Facebook input rejects the run before processing. Public alias identity can be unavailable when Facebook changes its logged-out response, without proving that an object is private or deleted.

The run has a five-minute limit, so large alias-heavy batches can stop before every entry is processed. Split them into smaller inputs and review outcomes rather than assuming complete processing.

Opaque post tokens, vanity groups/events and unsupported story-link forms remain unresolved as described in the supported-URLs section. Numeric IDs and constructed entity URLs do not verify an object's existence, public visibility or accessibility. No proxy configuration is supported.

Automation and integrations

Save your settings for next time

Once you have an input that works for you, save it as an Apify task. This keeps your settings together so you can use them again without filling in the form from scratch.

Run on a schedule

Need fresh results regularly? You can schedule the Actor or a saved task to run at a time that suits you.

Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.

Send results to your other tools

Use n8n, Make or Zapier to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the Apify integration guides for your chosen tool.

For a custom connection, an Apify webhook can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.

API usage

Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.

The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its defaultDatasetId to fetch the results.

For setup instructions, see Apify's JavaScript client guide, Python client guide and Actor runs API reference.

cURL

curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~facebook-url-to-id-scraper/runs' \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H 'Content-Type: application/json' \
--data @- <<'JSON'
{
"facebookUrls": [
{
"url": "https://www.facebook.com/nasa"
},
{
"url": "https://www.facebook.com/profile.php?id=4"
},
{
"url": "https://www.facebook.com/reel/10155466919515153"
}
],
"maxItems": 3
}
JSON

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/facebook-url-to-id-scraper').call({
"facebookUrls": [
{
"url": "https://www.facebook.com/nasa"
},
{
"url": "https://www.facebook.com/profile.php?id=4"
},
{
"url": "https://www.facebook.com/reel/10155466919515153"
}
],
"maxItems": 3
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/facebook-url-to-id-scraper').call(run_input={'facebookUrls': [{'url': 'https://www.facebook.com/nasa'}, {'url': 'https://www.facebook.com/profile.php?id=4'}, {'url': 'https://www.facebook.com/reel/10155466919515153'}], 'maxItems': 3})
print(client.dataset(run['defaultDatasetId']).list_items().items)

MCP and AI agents

You can ask your AI assistant to collect data with Facebook URL to ID Scraper and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.

Connect your assistant through the Apify MCP server. MCP gives your assistant a way to find this scraper, run it and read the results. Follow the official setup and sign-in guide for your app.

Easier setup with an Apify plugin

If you use a supported coding assistant, the official Apify plugin can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.

Use Apify AI in Console

Prefer to keep everything in Apify? Open Apify AI in Console and ask it to find Fetch Cat's Facebook URL to ID Scraper. You can describe the data you want and ask questions about the results.

Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.

Choose your assistant

Connect just this scraper

To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=fetch_cat/facebook-url-to-id-scraper"
}
}
}

Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.

Use Apify's general server

Already connected to the general Apify MCP server at https://mcp.apify.com? You can use it to find this scraper without adding another server. Ask your assistant to use Facebook URL to ID Scraper by Fetch Cat, or give it the identifier fetch_cat/facebook-url-to-id-scraper.

Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.

Example requests

  • “Use Fetch Cat’s Facebook URL to ID Scraper to retrieve resolution records for https://www.facebook.com/profile.php?id=4 and https://www.facebook.com/nasa, with a two-entry cap. Show IDs, object types, canonical URLs and statuses without claiming account verification.”
  • “Collect resolution records for the 3 numeric Facebook group, event and Reel links I provide. Keep the source URL and object type beside each ID so I can route downstream calls correctly.”
  • “Retrieve resolution records for my 3 supplied mixed Facebook links, including any unresolved alias. Keep explicit errors beside successful IDs and do not guess numeric IDs from opaque tokens.”

Normal Apify charges apply. Check the live Pricing tab before asking your assistant to run a larger batch.

Pay with x402

If your AI agent has a funded wallet, it can pay for Apify usage through x402. This experimental option lets an agent use Apify without a conventional account.

Apify AGI provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.

Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.

Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.

Other ways for agents to pay

Apify also supports MPP for prepaid access through AGI and Skyfire for eligible Actors. If your agent already uses one of these, see the agentic payment guide to choose the right setup.

What Facebook URLs are supported?

  • Pages and profiles: numeric paths, profile.php?id=..., and publicly visible vanity aliases
  • Posts: numeric /OWNER/posts/ID and /groups/GROUP/posts/ID or /groups/GROUP/permalink/ID paths, plus permalink.php?story_fbid=ID&id=PARENT
  • Photos: photo.php?fbid=...
  • Videos and reels: /videos/, /reel/, and watch/?v=...
  • Groups and events: numeric /groups/ID and /events/ID links
  • Desktop, mobile, facebook.com, web.facebook.com, and fb.com hosts

Opaque pfbid... tokens and vanity groups/events return unresolved. story.php links are not recognized as numeric post URLs. Use the supported permalink.php form instead. Alias lookups can also be unresolved when no identity is available publicly. Reading a numeric ID from a URL does not verify that the object exists, is public, or is accessible. IDs are not access credentials.

FAQ

What data can I export with Facebook ID Finder?

Each row includes the source and canonical URLs, numeric Facebook ID, object type, parent ID when present, owner handle, canonical entity URL, resolution method, status, error detail, and resolution timestamp. Export the dataset as JSON, CSV, Excel, XML, or another Apify-supported format.

Can I run Facebook URL to ID Scraper through an API, schedule, or MCP client?

Yes. Use the Apify API or client libraries for programmatic runs, Schedules for recurring batches, webhooks for completion events, or the Apify MCP server from a compatible AI client.

How much does it cost to use Facebook URL to ID Scraper?

The Actor charges one Start event after input validation and one Item extracted event only for each successfully resolved Facebook ID. Rates vary by Apify plan. The live Pricing tab is authoritative.

Why is a vanity group unresolved?

Vanity groups do not consistently expose a public numeric identity. Use a URL containing the numeric group ID.

Why is a pfbid post unresolved?

A pfbid is opaque. The Actor will not mislabel it as a stable numeric ID.

Are unresolved rows charged?

No item event is charged for an unresolved row. It remains in the dataset so your workflow can review it.

Does this Actor scrape Facebook content?

No. It resolves URL identity and normalization metadata only.

Support and feedback

For custom additions or integrations, email hello@fetchcat.dev.

Found an error or have a feature request? Open an issue with the run URL, a non-sensitive input example and what you expected.

Need help sharing it? See Apify’s guide to sharing a run when reporting an issue. Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.

Tried this scraper? We'd love to hear how it worked for you. Leave a review to help others choose the right tool and help us improve it. Your feedback means a lot to us.

Made with care for curious people, AI agents and the possibilities in data. ♥