# Facebook URL to ID Finder: Pages, Profiles, Groups (`automation_craft/facebook-url-to-id`) Actor

Facebook URL to ID finder: turn up to 10,000 links into numeric IDs, no login. Page, group, post, video, reel, photo, event, share and fb.watch links give their IDs (person profiles on request), both Page IDs, group privacy and the Page that posted. Pay per resolved link, misses free. CSV or API.

- **URL**: https://apify.com/automation_craft/facebook-url-to-id.md
- **Developed by:** [Automation Craft](https://apify.com/automation_craft) (community)
- **Categories:** Social media, Developer tools, Marketing
- **Features:** Limited permissions
- **Stats:** 7 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.48 / 1,000 resolved urls

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Facebook URL to ID Finder: Pages, Profiles, Groups

**Facebook URL to ID Finder** turns Facebook links into their numeric IDs in bulk, without a login, cookies or a Graph API token. Paste up to 10,000 Page, profile, group, post, video, reel, photo, event, share or fb.watch links, @handles or bare ids, and get one row per link: the numeric id of what the link names, a Page's two ids with its name, category and likes, a group's name and privacy, the Page that published a post, video or reel. A link Facebook does not know, a link that is not Facebook's and a repeated link each get a free row that says why.

Numeric ids are what the Graph API, the Meta Ad Library, Ads Manager, custom audience uploads and many CRM and automation tools ask for, while people share links with address names, `pfbid` codes and short share codes. This Actor asks Facebook itself which page, profile, group or item each link names, so a Resolved URL row names what Facebook confirmed; the one id Facebook does not open to logged out readers, a group post's, is read from the link and marked as such.

### How to get Facebook IDs from links

1. Open the Actor and paste your links into **Facebook links** (`urls`), one per line, or upload a text or CSV file (or give a shared Google Sheet) in **Links from a file** (`startUrls`).
2. Leave the options as they are for Pages, groups, posts, videos, reels, photos and events. Switch on **Include personal data** only if you need the ids of persons' profiles and may lawfully process them.
3. Switch on **Ad Library check** or **Page contact** if you also want whether each Page runs ads, or its public contact details.
4. Click **Start**.
5. Download the rows as JSON, CSV or Excel, or read them through the API.

### What you get

One `link` row per input link, each with its position in your list (`inputIndex`; rows arrive as each link is answered). Fill rates below are measured on a platform run of 1,000 Page links of 2026-11-05 (993 resolved) and on the test scenarios of the same day. The main fields:

| Field | What it holds | Filled |
|---|---|---|
| `inputIndex`, `input`, `url`, `status` | the link's position in your list (from 1), the link as you gave it, the link as this Actor read it, and what happened | every row, except `input` and `url` on rows whose link may name a person while personal data is off (`inputIndex` places them) |
| `kind`, `id` | what the link names (`page`, `person`, `group`, `group_post`, `post`, `video`, `reel`, `photo`, `event`; `profile` on Link only rows) and its numeric id | every charged row (a group post link that names its post by a `pfbid` code gets a free `unsupported_link` row with the group's id, since Facebook gives no numeric post id for it) |
| `pageId`, `profileId` | a Page's classic page id (the one the Graph API and the Ad Library use) and its profile id | every Page row |
| `name`, `vanity`, `canonicalUrl` | the Page's, person's, group's or event's name, the address name, the clean link | `name` and `canonicalUrl` on 993 of 993 Pages; `vanity` on 416 (41.9 percent: the rest have no address name, their links are `/people/` or `profile.php` links) |
| `category`, `likes`, `followersText`, `isVerified`, `verification` | a Page's category, exact like count, rounded follower text and blue verification | `category`, `likes`, `isVerified`, `verification` 993 of 993 Pages; `followersText` 824 (83.0 percent) |
| `instagramUsername`, `instagramFollowers`, `description`, `createdAt`, `imageUrl`, `isDeleted` | the linked Instagram account, the Page's about text, its creation date, profile picture and deleted flag | `createdAt`, `imageUrl`, `isDeleted` 993 of 993 Pages; `description` 681 (68.6 percent); `instagramUsername` and `instagramFollowers` 408 (41.1 percent, the Pages that link an Instagram account) |
| `adLibraryUrl` | the Page's view in the Meta Ad Library | every Page row |
| `groupId`, `groupPrivacy` | a group's id and `public` or `private` | every group and group post row |
| `postId`, `storyId` | a post's id, and its story id when the owner is a Page or personal data is on | `postId` on every post row |
| `videoId`, `photoId`, `albumId`, `eventId` | the id of a video or reel, a photo (with its album where Facebook names one) or an event | every row of that kind; `albumId` on 1 of 1 photo of the platform test (Facebook names the album in the photo's link) |
| `ownerKind`, `ownerPageId`, `ownerProfileId`, `ownerName`, `ownerVanity`, `ownerCheck` | who published a post, video or reel: a Page with both its ids, its name and address name (a person only with personal data on) | 5 of 5 posts, videos and reels of the platform test named their Page owner |
| `professionalMode`, `professionalPageId` | a person's professional mode and its page id, with personal data on | person rows |
| `idSource`, `shareTarget`, `idFromLink` | how the id was found (`facebook`, `share_link`, `link`), where a share link led, and whether the id was read from the link | `idSource` on every charged row; the others where they apply |
| `message`, `duplicateOf`, `sameTargetAs` | why a row is free, and which input of the run a duplicate repeats | free rows |
| `scrapedAt` | when the row was written | every row |

#### A real run of 12 links (2026-11-05)

| Input | `status` | What came back |
|---|---|---|
| `https://www.facebook.com/nike` | `resolved` | `kind` page, `pageId` 15087023444, `profileId` 100044541544829, `likes` 39487983, `category` Sportswear Store |
| `https://www.facebook.com/groups/selftaughtprogrammers/` | `resolved` | `kind` group, `groupId` 387875758242831, `name` Self-Taught Programmers, `groupPrivacy` public |
| `https://www.facebook.com/NASA/posts/1649435266551843` | `resolved` | `kind` post, `postId` 1649435266551843, owner the NASA Page (`ownerPageId` 54971236771) |
| a `facebook.com/share/p/...` link to a post | `resolved` | the post's ids, with the link it led to in `shareTarget` |
| a reel link | `resolved` | `kind` reel, `videoId` 636216875539019, owner the Steven Bartlett Page |
| an event link | `resolved` | `kind` event, `eventId` 1023978871819924, `name` Red Hot Chili Peppers with Post Malone | Sydney |
| a photo link | `resolved` | `kind` photo, `photoId` 10154923624398445, `albumId` 865378804956830 |
| `https://www.facebook.com/zuck` | `personal_data_withheld` | a person's profile with personal data off: no ids, free |
| a made up address name | `not_found` | free |
| `https://example.com` | `not_facebook` | free |
| `15087023444` | `duplicate_target` | the same Page as input 1: its ids repeated, free |
| the first link again | `duplicate_input` | the answer of input 1 repeated, free |

The Nike row:

```json
{
  "type": "link",
  "inputIndex": 1,
  "input": "https://www.facebook.com/nike",
  "url": "https://www.facebook.com/nike",
  "status": "resolved",
  "kind": "page",
  "id": "15087023444",
  "name": "Nike",
  "pageId": "15087023444",
  "profileId": "100044541544829",
  "category": "Sportswear Store",
  "likes": 39487983,
  "idSource": "facebook"
}
```

#### Status values

| `status` | Meaning | Charged |
|---|---|---|
| `resolved` | Facebook confirmed what the link names (for a group post: the group; the post id is read from the link, `idFromLink` true); its ids are in the row | Resolved URL, once per page, profile, group or item per run |
| `id_from_link` | Link only: the id was read from the link itself, Facebook was not asked | ID from link |
| `personal_data_withheld` | the link names a person's profile and personal data is off | free |
| `not_found` | Facebook does not know the link (removed, never existed, or shown only to logged in visitors) | free |
| `invalid_link`, `not_facebook`, `unsupported_link` | not a link this Actor reads, another site's link, or a Facebook link that names no page, profile, group, post, video, reel, photo or event (a search, a hashtag, Marketplace) | free |
| `duplicate_input`, `duplicate_target` | the same link as an earlier input, or another link to a Page, profile, group or item another input of the run resolved (each is charged once; the row repeats its ids) | free |
| `needs_lookup` | Link only: the link carries no id of its own | free |
| `lookup_failed`, `skipped` | Facebook did not answer after the run's tries, or the run stopped before this link | free |

The last row of every run is a `summary` row with the run's counts. When more than 1,000 inputs share one free status, or the run's allowance of unpaid work cannot hold their writes, the rest are listed by position on one `outcome` row for that status.

#### Ad Library check and Page contact (add-ons)

With **Ad Library check** on, every Page the run resolved gets one `adLibraryCheck` row: `pageId`, `pageName`, `runsAds`, `activeAdsCount` and `adLibraryUrl`. Nike on 2026-11-05: `activeAdsCount` 3768, `runsAds` true.

With **Page contact** on, every Page gets one `pageContact` row with what the Page shows publicly: `websites`, `phones`, `emails`, `addresses`, `rating`, `recommendPercent`, `reviewCount`, `hours`, `priceRange`, `services`, `categories`, `followersText`, `followingText`, `coverPhotoUrl`. NASA: `websites` \["http://www.nasa.gov/"]; Nike: \["http://nike.com/"].

With **Exact followers and talking about** on (no extra charge), each Page this run resolved and charged gets one more free row, `pageFollowers`, with `pageId`, `followersCount` and `talkingAboutCount`, read from the Page's own page after its link row: NASA 28,732,663 followers and 119,671 talking about on 2026-11-05.

### How it works

- Facebook's own link resolver answers up to 15 links per request, without a login. It names the profile, group, post, video, photo or event behind each link, or says it does not know the link.
- A Page and a person's profile look the same to the resolver. For each profile, one read of Facebook's page plugin and one Meta Ad Library page record tell them apart (the Ad Library flags a person's professional page) and give a Page's classic page id. A profile neither read settles is a free `lookup_failed` row, never a guess.
- Share links (`facebook.com/share/...`) and fb.watch links are opened once first, and the link they lead to is resolved.
- Reels are confirmed through their watch form and photos through their bare id.
- Group posts: Facebook confirms the group; it does not open a group post to a logged out reader, so the post id is read from the link and the row says so (`idFromLink` true).
- The publisher of a post, video or reel goes through the same Page or person check, once per run for each publisher.

Accepted link forms: `www.`, `m.`, `web.`, `mbasic.` and country hosts of facebook.com (including `/p/<Name>-<id>/` Page links), `fb.com`, `fb.me`, `fb.watch`, with or without `https://`; `@handle`, a bare address name without a dot (`nike`) and a bare numeric id. Paths: the address name, `profile.php?id=`, `/people/`, `/pages/`, `/pg/`, groups, group posts, events, `watch`, `video.php`, `reel`, `/<page>/videos/`, `photo`, `photo.php`, `/<page>/photos/`, `story.php`, `permalink.php`, `/<page>/posts/` with numeric or `pfbid` ids, and `/share/` links. An address name with a dot needs the `@` or a link: `@chris.cox`.

#### Limits

- Up to 10,000 links a run, `urls` and `startUrls` together; set `maxItems` to look up only the first ones.
- Links that bill nothing (missing links, persons with personal data off, failed reads) still cost requests, so each run holds an allowance of unpaid work that grows with every billed row. A list that starts with many such links can use it up: the run then stops its lookups and the links not reached get a free `skipped` row to run again, alone or with links that resolve.
- The run uses 256 MB of memory.
- Link only reads an id only where the link carries one: an address name or a share link gives a free `needs_lookup` row.
- fb.watch links are opened through a US residential Apify proxy exit (Facebook shows its login page to datacenter exits); no extra charge.

### Input

| Field | What it does |
|---|---|
| `urls` | Facebook links, @handles or bare ids, one per line (a list of strings) |
| `startUrls` | a text or CSV file of links (an upload, or one link to a file or a shared Google Sheet); its links are looked up after the ones in `urls`. The API also reads `fbUrls`, joined after these two |
| `includePersonalData` | off (default): a person's profile gives a free row and a person who published a post, video or reel is not named; on: the person's profile id, address name, name and professional page id, the publisher's profile id and the post's story id |
| `checkContentOwner` | on (default): the publisher of a post, video or reel is checked and a Page is named with both its ids and its name; off: no check (faster) |
| `pageFollowers` | a free `pageFollowers` row per charged Page with its exact follower and talking about counts from the Page's own page; one more read per Page (slower) |
| `adLibraryCheck` | the Ad Library check add-on: one row per Page with whether it runs ads and its active ads count |
| `pageContact` | the Page contact add-on: one row per Page with its public contact fields |
| `linkOnly` | read the ids the links carry (`profile.php?id=`, numeric group, event, post, video, reel and photo ids) without asking Facebook, charged as ID from link; a profile id read this way is given only with personal data on; cannot be combined with `pageFollowers`, `adLibraryCheck` or `pageContact` |
| `maxItems` | look up only the first N links (1 to 10,000); the rest get a free `skipped` row |
| `maxConcurrency` | requests at once, 1 to 4 (default 4) |
| `residentialFallback` | when a request was refused on the run's own address and on the Apify datacenter proxy, try it once more through a US residential proxy (no extra charge; never for the Page contact page or a Page's main page, which are too large) |
| `includeRawData` | adds a `raw` object with Facebook's own answer behind each row (a person's only with personal data on) |
| `proxyConfiguration` | Apify Proxy, automatic (default): the run's own address first, the Apify datacenter proxy on a refusal; a datacenter group: that proxy only; no proxy: the run's own address only; your own proxy links: used for every request |

```json
{
  "urls": [
    "https://www.facebook.com/nike",
    "https://www.facebook.com/groups/selftaughtprogrammers/",
    "https://www.facebook.com/NASA/posts/1649435266551843",
    "@nasa"
  ],
  "adLibraryCheck": true
}
```

### How much does it cost to scrape Facebook IDs?

Pay per event. Prices per 1,000 events:

| Event | Free plan | Bronze | Silver | Gold |
|---|---|---|---|---|
| Resolved URL (one link resolved by Facebook) | $0.665 | $0.61 | $0.55 | $0.475 |
| ID from link (one id read from the link, Link only) | $0.40 | $0.37 | $0.33 | $0.285 |
| Ad Library check (add-on, one per Page) | $1.00 | $1.00 | $0.90 | $0.80 |
| Page contact (add-on, one per Page) | $1.00 | $1.00 | $0.90 | $0.80 |

Platinum and Diamond plans pay the Gold price. Each run also pays the Actor start event once, $0.004 per run on every plan (no tier discount).

The Store pricing card shows these same prices per 1,000 events, rounded to the cent: "$0.55 / 1,000" on the Resolved URL row means one resolved link costs $0.00055. Even on the Free plan one resolved link costs less than a tenth of a cent.

Examples at the Gold price: 1,000 Page links cost $0.004 + $0.475 = $0.479; the same 1,000 Pages with Ad Library check cost $0.004 + $0.475 + $0.80 = $1.279; 1,000 links read with Link only cost $0.004 + $0.285 = $0.289.

Free: every row that is not `resolved` or `id_from_link` (links Facebook does not know, invalid links, other sites' links, persons with personal data off, duplicates, failed lookups, skipped links), an add-on read that could not be completed, and the exact follower counts. A page, group or item named by two links of one run is charged once. If the input itself cannot be used, the run writes a free `invalid_input` status row, looks up nothing, and only the run's start fee was charged.

### Use it from the API

`run-sync-get-dataset-items` starts a run and returns the rows when it ends (Apify waits up to 300 seconds; start a normal run for long lists).

```bash
curl -X POST "https://api.apify.com/v2/acts/automation_craft~facebook-url-to-id/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://www.facebook.com/nike", "https://www.facebook.com/groups/selftaughtprogrammers/"]}'
```

```javascript
const res = await fetch('https://api.apify.com/v2/acts/automation_craft~facebook-url-to-id/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ urls: ['https://www.facebook.com/nike', '@nasa'] }),
});
const rows = await res.json();
for (const r of rows.filter((x) => x.type === 'link')) console.log(r.input, r.status, r.id);
```

```python
import requests

rows = requests.post(
    "https://api.apify.com/v2/acts/automation_craft~facebook-url-to-id/run-sync-get-dataset-items",
    params={"token": "<YOUR_APIFY_TOKEN>"},
    json={"urls": ["https://www.facebook.com/nike", "@nasa"]},
    timeout=320,
).json()
for r in rows:
    if r["type"] == "link":
        print(r["input"], r["status"], r["id"])
```

The Apify nodes of n8n, Make and Zapier run it by name, and AI agents can run it through the Apify MCP server (`https://mcp.apify.com`) as `automation_craft/facebook-url-to-id`.

### FAQ

#### How do I get the ID of a Facebook Page or profile from its URL?

Paste the link into `urls`. Facebook's own link resolver names the profile behind it, and the Page or person check gives a Page's classic page id and profile id. A person's profile id is given only with `includePersonalData` on.

#### How do I find a Facebook group ID?

Paste the group link (`facebook.com/groups/<name>/`). The row carries `groupId`, the group's `name` and `groupPrivacy` (public or private); a group post link gives the group's id and the post id read from the link.

#### Why does a Facebook Page have two IDs, and which one do I get?

A Page has a classic page id, which the Graph API, the Meta Ad Library and Ads Manager use (Nike: 15087023444), and a profile id from the newer Pages experience (Nike: 100044541544829). Every Page row carries both: `pageId` (also in `id`) and `profileId`.

#### Can I convert a list of profile links to IDs for a custom audience?

Yes, with `includePersonalData` on: a person's row then carries the profile id, address name and name. A person's ids are personal data, so you are responsible for a lawful use, GDPR included; with the switch off each person's link is a free `personal_data_withheld` row.

#### Do I need a Graph API token or a Facebook login?

No. The Actor reads only what Facebook shows to logged out visitors and asks for no token, cookie or account.

#### Why does this Actor run with limited permissions?

It runs with the least privilege Apify offers: it can only use its own run's dataset and key-value store, and it keeps no memory between runs.

### What this Actor does NOT do

- Log in, or take cookies or a Facebook account.
- Read inside private groups: a private group gives its id, name and privacy, nothing more.
- Scrape posts, comments, reactions or followers lists: it returns ids and the facts listed above, one row per link.
- Turn page names without a link into ids: that is the job of Facebook Page ID Finder (below).
- Monitor links or track changes between runs.
- Give a person's ids without `includePersonalData` on.
- Read Instagram or other sites' links: they get a free `not_facebook` row.
- Return comment ids.
- Name a photo's owner: Facebook shows a photo page only to logged in visitors, so a photo row gives the photo id and its album id.

### Changelog

- 0.1: first release.

### More data tools by Automation Craft

- [Facebook Page ID Finder: Names to Page IDs](https://apify.com/automation_craft/facebook-page-id-finder)
- [Facebook Post Scraper: Reactions and Shares by URL](https://apify.com/automation_craft/facebook-post-scraper)
- [Facebook Posts Scraper - Page Posts, No Login](https://apify.com/automation_craft/facebook-posts-scraper)
- [Facebook Groups Scraper: Posts of Public Groups](https://apify.com/automation_craft/facebook-groups-scraper)
- [Facebook Comments Scraper: Replies, No Login](https://apify.com/automation_craft/facebook-comments-scraper)
- [Meta Ads Library Scraper - Meta Ad Library API](https://apify.com/automation_craft/meta-ads-library-scraper)
- [Facebook Ads Library Scraper - Ad Library & Spy](https://apify.com/automation_craft/facebook-ads-library-scraper)

# Changelog

This Actor's version history is a separate document: https://apify.com/automation_craft/facebook-url-to-id/changelog.md

# Actor input Schema

## `urls` (type: `array`):

Facebook links to turn into numeric ids, one per line: Pages and profiles (facebook.com/nike, profile.php?id=, /people/ links), groups, posts (pfbid links included), videos, reels, photos, events, share links (facebook.com/share/...) and fb.watch links, in any form (m., web., mbasic., fb.com, fb.me, with or without https). An @handle (@nike) or a bare id also works. Up to 10,000 links a run, together with the file below.

## `startUrls` (type: `array`):

Upload a text or CSV file of Facebook links (one per line or one per cell), or give one link to such a file (a shared Google Sheet works). Its links are looked up after the ones above. Optional.

## `includePersonalData` (type: `boolean`):

Off (default): a link to a person's profile gives a free row without ids, and the owner of a post, video or reel that is a person is not named. On: the person's profile id, address name, name and professional page id, the owner's profile id and the post's story id. A person's ids are personal data: you are responsible for a lawful use, GDPR included.

## `checkContentOwner` (type: `boolean`):

On (default): the owner of a post, video or reel is checked once per run; a Page owner is named with both its ids and its name. Off: no owner check (faster); the owner's profile id is then given only with personal data on, since it may be a person's.

## `pageFollowers` (type: `boolean`):

For every Page this run resolved and charged, one more free row (pageFollowers) with the exact follower count and the talking about count from the Page's own page (no extra charge; one more page read per Page, so a large run is slower). Off (default): the rounded follower text and the exact like count on the link row only.

## `adLibraryCheck` (type: `boolean`):

For every Page found, one more row: whether the Page runs ads now and how many active ads the Meta Ad Library shows, with the Ad Library link. Charged per Page checked (Ad Library check event); a check that cannot be read is free.

## `pageContact` (type: `boolean`):

For every Page found, one more row with the contact fields the Page shows publicly: websites, phones, emails, address, rating and review count, hours, price range and services. Charged per Page read (Page contact event); a Page whose contact section cannot be read is free.

## `linkOnly` (type: `boolean`):

Read the ids the links themselves carry (profile.php?id=, group, event, post, video, reel and photo ids) without asking Facebook: faster, charged as ID from link. Links without an id of their own (an address name, a share link) give a free row. A profile id read this way is given only with personal data on. Cannot be combined with exact followers or the add-ons.

## `maxItems` (type: `integer`):

Look up only the first N links of the list; the rest get a free skipped row. Empty: every link.

## `maxConcurrency` (type: `integer`):

How many requests run at once, 1 to 4. Empty: 4.

## `residentialFallback` (type: `boolean`):

When a request was refused on the run's own address and on the Apify datacenter proxy, try it once more through a US residential proxy (no extra charge). Off (default): such a link gets a free lookup_failed row to run again later.

## `includeRawData` (type: `boolean`):

Adds a raw object to each row with Facebook's own answer behind it (the route, the page plugin's ids and the Ad Library's page record). A person's raw data only with personal data on.

## `proxyConfiguration` (type: `object`):

Apify Proxy (automatic, default): Facebook is read from the run's own address first and through the Apify datacenter proxy on a refusal. A datacenter group: the datacenter proxy only. No proxy: the run's own address only. Your own proxy links are used for every request. A residential group is read as the datacenter group.

## Actor input object example

```json
{
  "urls": [
    "https://www.facebook.com/nike",
    "https://www.facebook.com/groups/selftaughtprogrammers/",
    "https://www.facebook.com/NASA/posts/1649435266551843"
  ],
  "includePersonalData": false,
  "checkContentOwner": true,
  "pageFollowers": false,
  "adLibraryCheck": false,
  "pageContact": false,
  "linkOnly": false,
  "residentialFallback": false,
  "includeRawData": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `items` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://www.facebook.com/nike",
        "https://www.facebook.com/groups/selftaughtprogrammers/",
        "https://www.facebook.com/NASA/posts/1649435266551843"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation_craft/facebook-url-to-id").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": [
        "https://www.facebook.com/nike",
        "https://www.facebook.com/groups/selftaughtprogrammers/",
        "https://www.facebook.com/NASA/posts/1649435266551843",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automation_craft/facebook-url-to-id").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.facebook.com/nike",
    "https://www.facebook.com/groups/selftaughtprogrammers/",
    "https://www.facebook.com/NASA/posts/1649435266551843"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automation_craft/facebook-url-to-id --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation_craft/facebook-url-to-id"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ag4DyDsyw8kajRxUY/builds/cWYDb4dX5Kygxb5Yd/openapi.json
