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

Hanna Nosova

Hanna Nosova

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

11 days ago

Last modified

Share

Facebook ID Finder — URL to Numeric ID Scraper

Use this Facebook ID finder to convert public Facebook URLs into stable numeric IDs, typed canonical URLs, and integration-ready resolution records. Process pages, profiles, posts, photos, reels, videos, groups, and events in one batch without logging in or scraping private content. 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.

Input example

{
"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
}

Output example

{
"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"
}

What Facebook URLs are supported?

  • Pages and profiles: numeric paths, profile.php?id=..., and publicly visible vanity aliases
  • Posts: numeric /posts/ and group post/permalink paths, plus story_fbid
  • 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, and fb.com hosts

Opaque pfbid... tokens, vanity groups/events, private objects, deleted links, and login-only pages may be returned as unresolved. The Actor never guesses an ID.

Input settings

FieldTypeDescription
facebookUrlsarrayOne or more public Facebook URL objects, up to 10,000
maxItemsintegerMaximum unique URLs to process, from 1 to 10,000

The runtime also accepts facebookUrls entries as plain strings through the API. Legacy startUrls and fbUrls aliases remain accepted for workflow compatibility.

Output fields

FieldDescription
sourceUrlExact URL supplied by the user
canonicalUrlNormalized HTTPS Facebook URL with tracking removed
facebookIdStable numeric ID, or null when unresolved
objectTypePage, profile, 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
canonicalEntityUrlType-specific URL built from the resolved numeric ID
resolutionMethodHow the ID was resolved
statusresolved or unresolved
errorClear reason for an unresolved row
resolvedAtISO 8601 processing timestamp

Input recipes

Resolve known numeric objects cheaply

{"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}

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

Pricing

This Actor uses pay-per-event pricing: one Start event per run and one Item resolved event for each successfully resolved row. Unresolved diagnostic rows do not incur an item event. See the live Pricing tab for current plan-specific rates.

Tips and limits

  • Keep numeric IDs in links whenever your upstream source provides them.
  • Filter on status = resolved before passing IDs to downstream APIs.
  • Preserve sourceUrl for lineage and use facebookId for stable joins.
  • Duplicate normalized URLs are processed once per run.
  • One inaccessible URL does not discard successful rows from the same batch.
  • Facebook can change what anonymous public pages expose; unresolved rows explain the limitation.

API usage

JavaScript

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' }],
maxItems: 1,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("fetch_cat/facebook-url-to-id-scraper").call(run_input={
"facebookUrls": [{"url": "https://www.facebook.com/profile.php?id=4"}],
"maxItems": 1,
})

cURL

curl -X POST "https://api.apify.com/v2/acts/fetch_cat~facebook-url-to-id-scraper/runs?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"facebookUrls":[{"url":"https://www.facebook.com/nasa"}],"maxItems":1}'

MCP and AI agents

Add Apify MCP to Claude Code:

$claude mcp add apify --transport http "https://mcp.apify.com?tools=fetch_cat/facebook-url-to-id-scraper"

Or configure any MCP-compatible client:

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

Example prompts:

  • “Resolve these Facebook URLs and return only records whose status is resolved.”
  • “Convert this list of Facebook page, group, and post links to numeric IDs.”
  • “Normalize these Facebook links and preserve the source URL for each row.”

Use only public URLs you are authorized to process. Facebook IDs can be personal data when linked to individuals, so apply appropriate privacy and retention controls. The Actor does not log in, bypass access controls, or access private Facebook content.

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 per run 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

If a public URL format should resolve but does not, open an issue on the Actor page with a non-private example URL and the run ID. Do not share credentials or private links.