Sourcelane

Facebook URL to ID Converter

Facebook

Operated by Sourcelane✓ verified

Convert Facebook URLs and usernames to numeric IDs in bulk: page, profile, group, post, video, reel, photo and event IDs, plus owner ID, name and canonical URL.

Read full description

A bulk Facebook link and username resolver that converts lists of Facebook URLs or vanity usernames into canonical numeric IDs and associated metadata. The connector resolves pages, profiles, groups, posts, videos, reels, photos and events by reading numeric IDs from URLs or performing lookups that follow redirects and expand share/short links (including pfbid and fb.watch). Outputs per-input, flat records containing the resolved numeric ID(s), entity type, the legacy/classic page ID used by Ads tools, owner identifier and display name, entity title, vanity username, page category, canonical URL and a status/error indicator. Supports multiple host variants and share link formats, performs parallel lookups for throughput, and can run without a Facebook login or cookies.

Verified Sep 28, 3:55 AM

$0.0005

per lookup

Up to 100 per call. Only pay for results returned; failed calls are refunded.

What people use it for

You give it

  • Facebook URLs or usernamesrequired

    One per line.

Optional settings

Include names and owner IDsUse backup lookupParallel lookupsRetry blocked lookups with residential proxy

You get back

People & accounts
Profile IDOwner IDOwner nameNameUsername
Links & media
Input URLVideo IDPhoto IDCanonical URL
Other details
TypeFacebook IDPage IDGroup IDPost IDEvent IDAlbum IDCategory+1 more

Trust & reliability

7d uptime trend
WindowUptimeSuccess ratep50p95Calls
24h————0
7d————0
30d————0

Calling contract

Call it through Sourcelane's gateway or MCP server. We run the connector, apply your agent's spend guardrails, and bill only the results returned.

Call it via Sourcelane

curl -X POST https://api.usesourcelane.com/v1/call \
  -H "Authorization: Bearer sl_live_your_agent_key" \
  -H "Content-Type: application/json" \
  -d '{"listing":"facebook-url-to-id","params":{"urls":["https://www.facebook.com/nike","https://www.facebook.com/groups/germtheory.vs.terraintheory","https://www.facebook.com/NintendoAmerica/posts/pfbid09PPhHDZ1wEi19DBTuZJ8L7ZMxiGGpSyfRXPiPx3gKK17KBh2k53HERZzjK7VYZP7l","https://www.facebook.com/reel/2166091230582141/","zuck"]},"maxResults":10}'

Request params

FieldTypeRequiredDescription
urlsarrayrequiredOne per line. Pages, profiles (vanity or profile.php?id=), groups, posts (incl. pfbid links), videos, reels, photos, events, share links, or bare usernames like 'nike'.
includeDetailsbooleanoptionalOn: every URL is looked up to add the name, owner ID, classic Page ID, category and canonical URL. Off: URLs that already contain a numeric ID are converted instantly from the URL alone (fastest); only usernames, pfbid posts and share links are looked up.
useFallbackbooleanoptionalWhen a profile, page or post cannot be read directly, try a second lookup method before giving up. Groups and events have no backup lookup.
maxConcurrencyintegeroptionalHow many URLs are looked up at the same time.
useResidentialFallbackbooleanoptionalIf Facebook blocks a lookup through the proxy above, retry it through a residential proxy before giving up.

Each result contains

FieldTypeDescription
inputUrlstringInput
statusstringStatus
typestringType
facebookIdstringFacebook ID
profileIdstring—
pageIdnullPage ID
groupIdnull—
postIdnull—
videoIdnull—
photoIdnull—
eventIdnull—
albumIdnull—
ownerIdnullOwner ID
ownerNamenull—
namestringName
usernamestringUsername
categorynull—
canonicalUrlstringCanonical URL
resolvedBystring—
errornullError

Use Facebook URL to ID Converter from Claude, ChatGPT or Cursor

Pick your tool and connect in under a minute. Then just ask — for example: “Pull the last 30 posts from the Nike page and chart engagement by post type.”

Connect Claude

Web, desktop and mobile. One click, then confirm.

  1. 1Click Add to Claude — claude.ai opens with Sourcelane filled in
  2. 2Click Continue to confirm — it then works in Claude desktop and mobile too
Manual setup (config files, REST, Python) +

Claude Code

Adds the Sourcelane MCP server with your key as a header.

terminal
claude mcp add --transport http sourcelane https://api.usesourcelane.com/mcp \
  --header "Authorization: Bearer sl_live_your_agent_key"

Claude Desktop (config file)

Alternative to the connector URL: add to claude_desktop_config.json, then restart Claude.

claude_desktop_config.json
{
  "mcpServers": {
    "sourcelane": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.usesourcelane.com/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer sl_live_your_agent_key"
      }
    }
  }
}

Cursor & Windsurf

Add to ~/.cursor/mcp.json (or Windsurf's mcp_config.json).

mcp.json
{
  "mcpServers": {
    "sourcelane": {
      "url": "https://api.usesourcelane.com/mcp",
      "headers": {
        "Authorization": "Bearer sl_live_your_agent_key"
      }
    }
  }
}

VS Code

Save as .vscode/mcp.json. VS Code prompts for your key once.

.vscode/mcp.json
{
  "servers": {
    "sourcelane": {
      "type": "http",
      "url": "https://api.usesourcelane.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:sourcelane-key}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "sourcelane-key",
      "description": "Sourcelane agent key",
      "password": true
    }
  ]
}

ChatGPT Custom GPT (Actions)

Create a GPT → Actions → Import from URL, then Authentication: API Key, Bearer.

OpenAPI schema URL
https://usesourcelane.com/openapi.json

REST

One POST. Pass maxResults to cap cost.

curl
curl -X POST https://api.usesourcelane.com/v1/call \
  -H "Authorization: Bearer sl_live_your_agent_key" \
  -H "Content-Type: application/json" \
  -d '{"listing":"facebook-url-to-id","params":{"urls":["https://www.facebook.com/nike","https://www.facebook.com/groups/germtheory.vs.terraintheory","https://www.facebook.com/NintendoAmerica/posts/pfbid09PPhHDZ1wEi19DBTuZJ8L7ZMxiGGpSyfRXPiPx3gKK17KBh2k53HERZzjK7VYZP7l","https://www.facebook.com/reel/2166091230582141/","zuck"]},"maxResults":10}'

Python, LangChain, CrewAI, OpenAI Agents SDK…

Wrap the REST call as a tool, or point an MCP client at the endpoint.

python
import requests

res = requests.post(
    "https://api.usesourcelane.com/v1/call",
    headers={"Authorization": "Bearer sl_live_your_agent_key"},
    json={
        "listing": "facebook-url-to-id",
        "params": {"urls":["https://www.facebook.com/nike","https://www.facebook.com/groups/germtheory.vs.terraintheory","https://www.facebook.com/NintendoAmerica/posts/pfbid09PPhHDZ1wEi19DBTuZJ8L7ZMxiGGpSyfRXPiPx3gKK17KBh2k53HERZzjK7VYZP7l","https://www.facebook.com/reel/2166091230582141/","zuck"]},
        "maxResults": 10,
    },
    timeout=300,
)
body = res.json()
print(body["receipt"]["chargedMicros"], "micro-USD for", body["receipt"]["results"], "results")
print(body["data"])

Reviews

—

0 reviews

5
0
4
0
3
0
2
0
1
0

Leave a review

Loading reviews…

Related Facebook connectors

See all Facebook data connectors →

Guides that use this connector