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

2

Total users

1

Monthly active users

8 hours ago

Last modified

Categories

Share

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 distinct input it returns one row with the numeric ID, the object type and, for pages, the classic Page ID as well.

Numeric IDs are useful because vanity names change, while IDs stay the same. They let you:

  • join and deduplicate lists that mix vanity URLs, profile.php?id= URLs and mobile links,
  • feed tools and APIs that only accept numeric IDs,
  • check that a list of Facebook links still points to live, public pages,
  • tell a Facebook Page apart from a personal profile.

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 reported with a clear status instead of an ID.

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 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/
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
statusok, not_found, login_required or errorok
errorThe reason when the status is not okHTTP 404
resolvedAtThe time the row was produced, in UTC2026-09-29T19:57:10.512Z

All IDs are strings. Many Facebook IDs have 15 to 17 digits, which is more than a JavaScript number or a spreadsheet cell can hold exactly. Keeping them as strings means they never get rounded.

When a URL can't be resolved, the id field still holds a stable value that starts with unresolved-. Every row therefore has a unique id, and you can see which inputs failed. If two inputs resolve to the same Facebook object (for example facebook.com/nasa and profile.php?id=100044561550831), the second row gets a short suffix so ids stay unique.

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, 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 results 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. Facebook sends most datacenter IP addresses to its login page.
  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=.... 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 waits and retries with a new proxy session a few times before it reports login_required. 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. You still get one row per input, and the rows that couldn't be fetched say so in error.

Tips

  • Duplicates are removed after cleaning. https://m.facebook.com/natgeo, facebook.com/natgeo/ and natgeo count as the same input.
  • If a person or Page renames its vanity URL, the old URL may stop working. The numeric ID you stored earlier still identifies the same account.

Input

FieldTypeDescription
urlsarray of stringsFacebook URLs, vanity names or @handles to resolve. You need at least one.
maxItemsintegerMaximum number of results (1-10,000, default 100). You get one result per distinct URL.
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 get not_found.
maxConcurrencyintegerNumber of URLs worked on in parallel, Default 3, min 1, max 10.
proxyConfigurationobjectApify Proxy settings. 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 stops straight away with a clear error message if the input is invalid. That includes an empty URL list, a link that isn't a Facebook link, an unknown input field, or a value of the wrong type. A run in which none of the URLs resolves to an ID is marked as failed after its rows are saved, so you notice a bad list quickly.

Output

Every row carries all 16 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/"
}

A personal profile:

{
"inputUrl": "https://facebook.com/zuck",
"normalizedUrl": "https://www.facebook.com/zuck",
"sourceUrl": "https://www.facebook.com/zuck",
"type": "profile",
"id": "4",
"vanity": "zuck",
"method": "html",
"status": "ok",
"resolvedAt": "2026-09-29T20:00:02.361Z",
"name": "Mark Zuckerberg",
"canonicalUrl": "https://www.facebook.com/zuck/"
}

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 doesn't exist:

{
"inputUrl": "https://www.facebook.com/this.page.does.not.exist.xyz123",
"normalizedUrl": "https://www.facebook.com/this.page.does.not.exist.xyz123",
"sourceUrl": "https://www.facebook.com/this.page.does.not.exist.xyz123",
"type": "profile",
"id": "unresolved-d72efe38df69",
"vanity": "this.page.does.not.exist.xyz123",
"method": "html",
"status": "not_found",
"resolvedAt": "2026-09-29T20:00:04.526Z",
"error": "No ID on the page: it is removed, private or restricted, or the URL does not exist."
}

How much does it cost to use Facebook ID Finder?

The Actor uses pay-per-event pricing, so you pay per result. A URL resolved with status: ok is charged once. A URL whose ID is read straight from the URL, without any page request, is charged at a separate, lower per-result rate than a URL that needed a page fetch. Rows with not_found, login_required or error aren't 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 lower rate. 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 return status: not_found, which isn't charged.
  • Set Maximum results to limit how many URLs are processed. Each URL gives one row.

Use with the 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) => console.log(item.inputUrl, item.type, item.id, item.pageId));

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.

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

Your client will ask you to sign in to Apify the first time. After that, the agent can run the Actor and read its results.

Example prompts:

The input and output schemas describe every field, so the agent knows which inputs to send and what each output field means.

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 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 URL marked login_required or not_found?

Private groups, friends-only posts, age- or country-restricted pages and removed accounts can't be opened without logging in. The Actor reports them 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.

Can the output change over time?

Facebook can change its page markup at any time. If a field suddenly stays empty, please report it on the Issues tab so the Actor can be updated.

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, which laws such as the GDPR and the CCPA protect. Facebook's terms of service also limit automated access. You are responsible for making sure your use is lawful and has a legitimate purpose. If you're unsure, ask a lawyer. This Actor is an independent tool. Meta and Facebook don't operate, sponsor or endorse it.

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. Feature requests are welcome there too.