Facebook ID Finder avatar

Facebook ID Finder

Pricing

from $2.31 / 1,000 results

Go to Apify Store
Facebook ID Finder

Facebook ID Finder

Convert Facebook URLs, vanity names or @handles into numeric IDs. Works for pages, profiles, groups, posts, videos and reels, and returns the ID, name, vanity name, object type, current and classic Page IDs and the source URL. No Facebook login needed.

Pricing

from $2.31 / 1,000 results

Rating

0.0

(0)

Developer

Axiom Works

Axiom Works

Maintained by Community

Actor stats

0

Bookmarked

14

Total users

6

Monthly active users

12 days ago

Last modified

Share

Returns: one row per resolved Facebook URL with inputUrl, id, type, method, status, sourceUrl and idUrl. Input: {"urls": ["https://www.facebook.com/profile.php?id=4"], "fetchDetails": false, "maxItems": 1} Best for: Facebook URL to ID conversion, normalizing mixed Facebook link lists, feeding numeric IDs to other Facebook tools.

{"inputUrl":"https://web.facebook.com/profile.php?id=4","sourceUrl":"https://www.facebook.com/profile.php?id=4","type":"profile","id":"4","method":"url_parse","status":"ok","idUrl":"https://www.facebook.com/profile.php?id=4"}

What does Facebook ID Finder do?

Facebook ID Finder is a Facebook URL to ID converter: it turns public Facebook links into the numeric IDs that Facebook uses internally. You give it a list of page, profile, group, post, video or reel URLs, bare vanity names such as cocacola, or handles such as @Meta. For each resolved input it returns one row with the numeric ID and object type. Fetched Pages can also include the classic Page ID. Unresolved inputs are skipped and recorded in the default key-value store under UNRESOLVED.

Numeric IDs help track objects when vanity names change. The inputUrl, normalizedUrl, id and type fields help join mixed link lists and distinguish fetched Pages from profiles.

The Actor reads public pages only. It does not log in, and it does not use cookies or a Facebook account. Private groups, friends-only posts and removed pages are skipped with a diagnostic in UNRESOLVED, rather than emitted as dataset rows.

Facebook pages now have two IDs. Since Facebook moved Pages to the "new Pages experience", every Page has a profile ID, and most also keep their older classic Page ID. Different tools expect different IDs. Facebook ID Finder returns both: id holds the current profile ID and pageId holds the classic Page ID. You don't need to guess which one your tool wants.

What data can you get from Facebook ID Finder?

Each result row has these fields:

FieldDescriptionExample
inputUrlThe URL, vanity name or handle exactly as you entered ithttps://www.facebook.com/nasa
normalizedUrlThe cleaned Facebook URL that was resolvedhttps://www.facebook.com/nasa
sourceUrlThe URL the data came from, after redirectshttps://www.facebook.com/NASA/
typeprofile, page, group, group_post, post, video, photo, event or unknownpage
idThe main numeric Facebook ID, as a string100044561550831
pageIdThe classic Page ID (Pages only)54971236771
vanityThe public vanity nameNASA
nameThe public display nameNASA - National Aeronautics and Space Administration
canonicalUrlThe canonical link of the pagehttps://www.facebook.com/NASA/
idUrlA link that opens the profile, page or group by its numeric ID (null for posts, videos and unresolved rows)https://www.facebook.com/profile.php?id=100044561550831
imageUrlThe page image (og:image) when Facebook returns ithttps://scontent.fesb9-1.fna.fbcdn.net/v/t39.30808-1/example.png
descriptionThe page description (og:description), first 500 characters, when Facebook returns itNASA - National Aeronautics and Space Administration. 28,724,325 followers
followersCountCount parsed from the public description, when available28724325
talkingAboutCountCount parsed from the public description, when available85845
ownerIdThe author or owner ID of a post or video, when shown54971236771
postIdThe feed post ID linked to a post or video, when shown1641734060655297
videoIdThe video ID of a video or reel28263630716612782
methodurl_parse if the ID was read from the URL, html if the page was fetchedhtml
statusEmitted rows are ok; unresolved outcomes are saved separatelyok
errorNull in resolved dataset rows; see UNRESOLVED for diagnosticsnull
resolvedAtThe time the row was produced, in UTC2026-09-29T19:57:10.512Z

IDs are strings to preserve long numeric values without rounding.

When a URL cannot be resolved, it produces no dataset row. Its input and reason are saved in UNRESOLVED. All emitted rows have status: ok. If two distinct inputs resolve to the same object, the second row's id receives a short suffix to keep record identifiers unique; consumers requiring a strictly numeric ID should use the first row or the numeric portion before the suffix. idUrl is null for rows whose ID has that suffix.

How to use Facebook ID Finder

  1. Open the Actor in Apify Console and go to the Input tab.
  2. Paste your Facebook links into Facebook URLs, vanity names or @handles, one per line. Full URLs from www.facebook.com, m.facebook.com, web.facebook.com, mbasic.facebook.com and fb.com work, as do fb.watch short links, bare vanity names and @handles.
  3. Set Maximum distinct targets to process to limit how many URLs are processed.
  4. Leave Fetch page details on if you want names, vanity names, canonical URLs and classic Page IDs. Turn it off if you only need IDs and most of your URLs already contain them.
  5. Keep the default residential proxy setting. The first request for each URL goes through a datacenter proxy; if Facebook answers with its login page, the Actor retries through the proxy you configured and then through a residential proxy.
  6. Click Start. When the run finishes, open the Output tab to see the table, or download the results as JSON, CSV, Excel or HTML.

How the Actor resolves each URL

The Actor always reads the URL first. Many Facebook URLs already contain the ID: profile.php?id=4, /groups/1449013568720516, /NASA/posts/1641734060655297, /reel/28263630716612782 or watch?v=..., /events/1234567890, /NASA/videos/123 or permalink.php?story_fbid=123&id=456 (the last also fills ownerId). If you turned off Fetch page details, these URLs are resolved instantly without any request to Facebook. They are marked method: url_parse.

Every other URL, such as a vanity name or a group slug, is requested once from Facebook through the proxy. The Actor follows up to five redirects on Facebook hosts and reads the IDs from the public page. These rows are marked method: html.

If Facebook answers with its login page, the Actor doesn't download that page. It waits and retries with a new proxy session, first through the configured proxy and then through a residential one, before it reports login_required. A URL that appears several times with different letter case, such as nasa and NASA, is requested only once. Requests are spread out over time rather than sent all at once, so the Actor stays polite to Facebook. Each URL gets at most 30 seconds, including retries.

If the run is about to reach its timeout, or you abort it, the Actor stops fetching and saves the URLs it hasn't finished from the URL alone. Numeric URLs can still produce resolved rows; unfinished vanity URLs are skipped with their reason in UNRESOLVED.

Input

FieldTypeDescription
urlsarray of stringsFacebook URLs, vanity names or @handles to resolve. You need at least one.
maxItemsintegerDistinct-target processing cap (1-10,000, default 100). Unresolved targets count; only resolved targets produce rows.
fetchDetailsbooleanDefault true. Requests each page to add name, vanity, canonical URL, Page ID and owner ID. With false, URLs that already contain a numeric ID are resolved without a request; vanity URLs are still requested.
resolveFromUrlOnlybooleanDefault false. true never contacts Facebook and overrides fetchDetails. Only IDs already present in the URLs are returned. Vanity URLs are skipped with diagnostics in UNRESOLVED.
maxConcurrencyintegerNumber of URLs worked on in parallel, Default 3, min 1, max 10.
proxyConfigurationobjectApify Proxy settings used when the first, datacenter attempt hits the login page. Residential proxies work best for Facebook.

Example input:

{
"urls": [
"https://www.facebook.com/nasa",
"https://m.facebook.com/natgeo",
"@Meta",
"cocacola",
"https://www.facebook.com/groups/wordpress",
"https://www.facebook.com/reel/28263630716612782"
],
"maxItems": 10,
"fetchDetails": true,
"maxConcurrency": 3,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}

The run fails with an actionable input error for an empty URL list, wrong field types, unknown fields, or a list containing no valid Facebook targets. Invalid entries in a mixed list are logged and skipped while valid targets continue. A valid list that yields no resolved IDs ends successfully with an empty dataset and guidance in the run status. For offline-only mode, supply numeric URLs or set resolveFromUrlOnly to false. For blocked public targets, check the residential proxy settings and retry later. Private content cannot be resolved by enabling details.

Output

Every emitted row carries all 21 fields; values that don't apply are null. The examples below omit null fields for brevity and come from a local test run. A Facebook Page, fetched with details:

{
"inputUrl": "https://www.facebook.com/nasa",
"normalizedUrl": "https://www.facebook.com/nasa",
"sourceUrl": "https://www.facebook.com/NASA/",
"type": "page",
"id": "100044561550831",
"vanity": "NASA",
"method": "html",
"status": "ok",
"resolvedAt": "2026-09-29T19:59:59.338Z",
"pageId": "54971236771",
"name": "NASA - National Aeronautics and Space Administration",
"canonicalUrl": "https://www.facebook.com/NASA/",
"idUrl": "https://www.facebook.com/profile.php?id=100044561550831",
"description": "NASA - National Aeronautics and Space Administration. 28,724,325 followers · 85,845 talking about this."
}

A reel resolved from the URL alone, with Fetch page details turned off:

{
"inputUrl": "https://www.facebook.com/reel/28263630716612782",
"normalizedUrl": "https://www.facebook.com/reel/28263630716612782",
"sourceUrl": "https://www.facebook.com/reel/28263630716612782",
"type": "video",
"id": "28263630716612782",
"method": "url_parse",
"status": "ok",
"resolvedAt": "2026-09-29T19:58:47.680Z"
}

A URL that does not exist produces no dataset row. Check the default key-value store's UNRESOLVED value for the target and reason. login_required and not_found are internal resolution outcomes, not dataset records. Agents should treat a skipped target as unresolved, rather than infer that a page was deleted: restrictions and temporary Facebook blocking can produce the same outcome.

How much does it cost to use Facebook ID Finder?

The Actor uses pay-per-event pricing, so you pay per result. Each resolved URL is charged once, using url-parsed-result for offline parsing and result for HTML resolution. Unresolved targets are not emitted or charged. The current rates are on the Actor's Pricing tab. Apify platform usage, such as the residential proxy, is included in the per-result price.

To keep costs down:

  • Turn off Fetch page details for URLs that already contain an ID, such as /reel/28263630716612782. Those rows show method: url_parse and use the offline event. Rows fetched from the page show method: html.
  • Turn on Resolve from URL only to send no page requests. Vanity URLs such as https://www.facebook.com/nasa can't be resolved this way and are skipped without a dataset row or event charge.

Set Maximum distinct targets to process to limit how many URLs are processed. Each resolved URL gives one row.

Use with AI agents (MCP)

You can call Facebook ID Finder from AI agents and assistants that support the Model Context Protocol (MCP), such as Claude Desktop, Claude Code, Cursor or VS Code. Add the Apify MCP server to your client configuration and load this Actor as a tool:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com/?tools=axiomworks/facebook-id-finder"
}
}
}

Authenticate your MCP client with Apify to run the Actor and read results.

Example prompts:

The input and output schemas describe the accepted arguments and returned fields. For a quick numeric-ID request, use {"urls":["https://www.facebook.com/profile.php?id=4"],"fetchDetails":false,"maxItems":1}. This makes no Facebook request. Leave fetchDetails true for public page details; fields absent from the public page remain null. In URL-only mode, supplying a vanity handle cannot return an ID. Read UNRESOLVED when the result count is smaller than the number of distinct targets. A successful empty run means no target resolved, not that every URL was confirmed deleted.

Integrations and API

You can run the Actor through the Apify API. Replace <YOUR_API_TOKEN> with your Apify API token (in cURL, $APIFY_TOKEN holds it).

Python

from apify_client import ApifyClient
client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("axiomworks/facebook-id-finder").call(run_input={
"urls": ["https://www.facebook.com/nasa", "@Meta"],
"maxItems": 10,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["inputUrl"], item["type"], item["id"], item.get("pageId"))

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('axiomworks/facebook-id-finder').call({
urls: ['https://www.facebook.com/nasa', '@Meta'],
maxItems: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => process.stdout.write(`${[item.inputUrl, item.type, item.id, item.pageId].join(" ")}\n`));

cURL

curl -X POST "https://api.apify.com/v2/acts/axiomworks~facebook-id-finder/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://www.facebook.com/nasa", "@Meta"], "maxItems": 10}'

You can also connect Facebook ID Finder to Make, Zapier, n8n, Google Sheets, Slack, webhooks and other tools from the Integrations tab.

FAQ

Does Facebook ID Finder need a Facebook account?

No. It only reads pages that anyone can open without logging in. You never enter a Facebook password or cookies.

Why do I get fewer results than maxItems?

You get one result per successfully resolved distinct input URL. A run with 5 URLs returns at most 5 rows, even with maxItems set to 100. Duplicate inputs are merged.

What is the difference between id and pageId?

For Facebook Pages, id is the profile ID used by the new Pages experience, which is what you see in profile.php?id= links. pageId is the older classic Page ID, which some tools and integrations still expect. Personal profiles and groups have only id.

How does the Actor tell a Page from a profile?

A row is marked page when the fetched page carries a classic Page ID and Facebook labels it as a Page. Otherwise it is profile. Rows resolved from the URL alone use the URL pattern, so profile.php?id= links are reported as profile until you fetch details.

Why is a target skipped?

Private or restricted content and removed accounts may be unavailable publicly. The Actor skips them and saves a reason in UNRESOLVED instead of guessing an ID. If many public URLs come back as login_required, check that you are using residential proxies.

Yes. fb.watch and facebook.com/share/... links are followed through up to five redirects on Facebook hosts, and the final page is resolved.

Does it collect personal data?

For profiles it returns only the numeric ID, public display name, vanity name and canonical URL. It doesn't collect posts, friends, photos or contact details.

This Actor only reads publicly available pages, without logging in, and it returns IDs and public names rather than personal content. Even so, public data can include personal data, protected by laws such as the GDPR and CCPA. Facebook's terms of service also limit automated access. You are responsible for ensuring your use is lawful and has a legitimate purpose. If unsure, ask a lawyer. This Actor is not affiliated with or endorsed by Facebook or Meta.

Feedback

Found a URL type that doesn't resolve, a wrong ID or a missing field? Please open an issue on the Actor's Issues tab with the input URL and the run ID.