Facebook URL to ID Resolver
Pricing
Pay per event
Facebook URL to ID Resolver
Resolve public Facebook URLs into stable numeric IDs, normalized links, and typed page, profile, group, event, post, video, or photo records.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
Turn batches of public Facebook URLs into stable numeric IDs, normalized URLs, and typed records. The Actor handles common page, profile, group, event, post, video, and photo URL formats. It is designed for data teams that need a reliable facebook URL to ID step before enrichment, matching, API calls, or spreadsheet export.
What does this Actor do?
Facebook links come in many shapes.
A profile may use profile.php?id=..., a video may put its ID in the path, and a named page may contain no number at all.
This Actor standardizes those shapes into one output contract.
For each input URL it returns:
- the original URL;
- a normalized HTTPS Facebook URL without common tracking parameters;
- the numeric Facebook object ID when it can be determined safely;
- the detected object type;
- the resolution method;
- an explicit
resolvedorunresolvedstatus; - a per-URL error instead of a guessed ID.
Numeric formats are resolved locally without fetching Facebook. Single-segment named public pages use Facebook's public Page Plugin.
Who is it for?
Data engineers
Normalize social identifiers before loading records into a warehouse or calling a downstream API.
CRM and enrichment teams
Convert page and profile links collected from websites into joinable ID fields.
Researchers and analysts
Clean mixed Facebook URLs before comparing datasets or exporting them to a spreadsheet.
Automation builders
Place a deterministic resolver step between URL collection and Facebook content extraction.
Why use this resolver?
- Batch input: process up to 10,000 URLs in one run.
- Typed output: distinguish pages, profiles, groups, events, posts, videos, and photos.
- Safe behavior: unresolved aliases are reported, never fabricated.
- Low-cost path: numeric URLs do not require a browser, proxy, or Facebook request.
- Alias normalization: named public page aliases can resolve to the same stable ID.
- Integration-ready: every input gets a predictable dataset row.
Supported Facebook URL formats
| URL shape | Type | Resolution |
|---|---|---|
/profile.php?id=4 | profile | id query parameter |
/people/name/123... | profile | numeric path segment |
/123... | profile or page | numeric path segment |
/groups/123... | group | numeric path segment |
/groups/name/posts/123... | post | numeric post segment |
/events/123... | event | numeric path segment |
/PageName/posts/123... | post | numeric path segment |
/PageName/videos/123... | video | numeric path segment |
/watch/?v=123... | video | v query parameter |
/photo.php?fbid=123... | photo | fbid query parameter |
/permalink.php?story_fbid=123... | post | story_fbid query parameter |
/PageAlias | page | public Facebook Page Plugin lookup |
The Actor accepts facebook.com, mobile Facebook hosts, and fb.com.
It normalizes them to https://www.facebook.com/.
Getting started
- Open the Actor input.
- Add one or more public Facebook URLs to Facebook URLs.
- Optionally lower Maximum URLs to process for a sample.
- Click Start.
- Open the default dataset when the run finishes.
- Filter on
status = resolvedbefore sending IDs to downstream systems.
The default prefill uses real Nintendo page, group-post, and video URLs. It is suitable for a small first run.
Input parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
startUrls | array | yes | real Facebook examples | Facebook URLs as request-list objects or strings |
maxItems | integer | no | 100 | maximum URLs processed, from 1 to 10,000 |
Example input:
{"startUrls": [{ "url": "https://www.facebook.com/nintendo" },{ "url": "https://www.facebook.com/profile.php?id=4" },{ "url": "https://www.facebook.com/NintendoAmerica/videos/432168259120897/" }],"maxItems": 3}
Output fields
| Field | Nullable | Meaning |
|---|---|---|
sourceUrl | no | exact input URL |
normalizedUrl | no | canonicalized Facebook URL |
facebookId | yes | stable numeric ID when resolved |
objectType | no | detected object category |
parentId | yes | numeric owner or parent explicitly present in the URL |
resolutionMethod | no | url_path, query_parameter, facebook_page_plugin, or unresolved |
status | no | resolved or unresolved |
error | yes | explanation when unresolved |
resolvedAt | no | ISO 8601 processing timestamp |
Output example
A current named-page lookup produces a record shaped like this:
{"sourceUrl": "https://www.facebook.com/nintendo","normalizedUrl": "https://www.facebook.com/nintendo","facebookId": "119240841493711","objectType": "page","parentId": null,"resolutionMethod": "facebook_page_plugin","status": "resolved","error": null,"resolvedAt": "2026-08-02T04:00:00.000Z"}
Unresolved URLs still produce a row.
Their facebookId is null, status is unresolved, and error explains why.
Unresolved rows are not charged as item events.
How much does it cost to resolve Facebook URLs to IDs?
The Actor uses pay-per-event pricing. There is a one-time Start event of $0.005 per run. Each successfully resolved row emits one Item processed event. Unresolved rows have no item charge.
Current item prices decrease by plan tier:
| Tier | Price per resolved item |
|---|---|
| Free | $0.0016479 |
| Bronze | $0.0014329 |
| Silver | $0.0011177 |
| Gold | $0.00085975 |
| Platinum | $0.00057317 |
| Diamond | $0.00040122 |
At the Bronze price, excluding Apify platform usage:
- 1 resolved URL costs about $0.00643 including the start event;
- 100 resolved URLs cost about $0.14829;
- 1,000 resolved URLs cost about $1.43790.
Actual charges follow the tier active for your Apify account.
Resolution strategy
The Actor first inspects the URL structure. This covers numeric IDs at zero Facebook network cost.
If the URL is a single named page alias, the Actor calls Facebook's public Page Plugin and extracts its explicit pageID field.
Transient HTTP failures are retried with bounded backoff.
The resolver does not use a browser or proxy by default.
It does not infer an ID from a display name, image URL, or unrelated search result. That prevents false joins in downstream systems.
Batch and data-pipeline patterns
Prepare URLs for enrichment
Collect Facebook links from company websites, run this Actor, then pass only resolved IDs into an enrichment API.
Normalize aliases before deduplication
Resolve multiple named page aliases and group records by facebookId instead of URL text.
Export to a spreadsheet
Use the Apify dataset CSV or XLSX endpoint and retain status and error columns for review.
Schedule recurring cleanup
Schedule the same Task to normalize newly collected URLs. This Actor reports current resolution results; it does not compare runs or send alerts itself.
API usage with cURL
Replace YOUR_APIFY_TOKEN with an Apify API token:
curl -X POST \"https://api.apify.com/v2/acts/automation-lab~facebook-url-to-id-resolver/runs?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"startUrls": [{"url": "https://www.facebook.com/nintendo"}],"maxItems": 1}'
API usage with JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('automation-lab/facebook-url-to-id-resolver').call({startUrls: [{ url: 'https://www.facebook.com/nintendo' },{ url: 'https://www.facebook.com/profile.php?id=4' }],maxItems: 2});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
API usage with Python
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("automation-lab/facebook-url-to-id-resolver").call(run_input={"startUrls": [{"url": "https://www.facebook.com/nintendo"},{"url": "https://www.facebook.com/profile.php?id=4"},],"maxItems": 2,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item)
Use with Apify MCP
Add the Actor to Claude Code:
claude mcp add --transport http apify \"https://mcp.apify.com?tools=automation-lab/facebook-url-to-id-resolver"
Claude Desktop setup
Add this JSON to Claude Desktop's MCP configuration.
Cursor and VS Code setup
Use the same remote-server JSON in Cursor or VS Code's MCP server settings:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=automation-lab/facebook-url-to-id-resolver"}}}
Example prompts:
- "Resolve these Facebook page URLs and return their stable IDs."
- "Normalize this batch of Facebook group, post, and video links for a CSV export."
- "Show only resolved Facebook IDs and their object types."
Limits and expected failure behavior
- Named public pages are supported through the Page Plugin.
- Named personal profiles and named groups may not expose a public numeric ID.
- Opaque
pfbid...identifiers are not guessed or decoded. - Login-only, private, deleted, age-gated, or region-restricted objects may remain unresolved.
facebookIdis a string so large IDs retain precision.- A direct numeric URL can be parsed even if the object later becomes unavailable.
- Facebook can change public embed behavior without notice.
- The Actor resolves IDs; it does not scrape posts, comments, followers, or private metadata.
When one URL fails, the run continues and records that URL as unresolved.
Invalid non-Facebook input also becomes an unresolved diagnostic row.
A missing startUrls input fails the run with a clear error.
Tips for reliable runs
- Prefer canonical public desktop URLs.
- Keep numeric IDs in URLs when your upstream source provides them.
- Filter by
statusbefore calling another API. - Store
sourceUrlas lineage and usefacebookIdfor joins. - Use
maxItemsto test a subset of a large batch. - Review unresolved rows instead of silently discarding them.
Troubleshooting
Why is a named group unresolved?
The public Page Plugin resolves pages, not every named group. Use a group URL containing its numeric group ID when available. A group post URL with a numeric post segment can still resolve the post ID.
Why does a pfbid post return no numeric ID?
pfbid is an opaque Facebook identifier.
The Actor will not produce an unsafe numeric guess.
Use a URL format containing a stable numeric post ID.
Why do two page aliases return the same ID?
That is expected when Facebook redirects both aliases to the same page. The stable ID is useful for deduplication.
Why is the normalized URL different?
The Actor upgrades HTTP to HTTPS, uses www.facebook.com, removes fragments and common tracking parameters, and normalizes path slashes.
Responsible use and legality
Use this Actor only with public URLs and data you are authorized to process. Facebook IDs can be personal data when connected to individuals. Follow applicable privacy, data-protection, contractual, and platform rules. Do not use the Actor to bypass access controls or to identify private users.
The Actor does not log in, access private content, or require Facebook credentials. You are responsible for the lawful purpose, retention, and downstream use of results.
Related Automation Lab Actors
- Facebook Pages Scraper for public page details after URL resolution.
- Facebook Posts Scraper for post extraction workflows.
- Facebook Events Scraper for public event data.
- Facebook Pages Posts Scraper for page-to-post pipelines.
Use this resolver when stable identifiers and normalized links are the immediate job. Choose a related scraper when you need full content records.
FAQ
Does the Actor need a Facebook account?
No. It uses URL parsing and a public page embed surface.
Does it use a proxy?
No proxy is enabled by default. Numeric URLs need no HTTP request, while named pages use a lightweight public request.
Are all output rows charged?
No.
The run emits one start event, and only rows with status: resolved emit an item event.
Can it resolve 10,000 URLs?
The input supports up to 10,000 URLs. Runtime depends on how many named page aliases require network lookup. Numeric URL batches are substantially faster.
Does it return Facebook content or metadata?
No. It returns IDs, normalized URLs, types, methods, statuses, and diagnostics. Use a related content Actor after resolution.
Can I send strings instead of request-list objects through the API?
Yes.
The runtime accepts either strings or { "url": "..." } entries, while the Console editor presents request-list objects.