# Public profile

> A Facebook Page's or public person's name, pictures, verification and follower counts.

- **Request:** `GET https://api.lurkapi.com/v1/facebook/profile`
- **Auth:** `x-api-key` header ([get a free key](https://lurkapi.com/login?next=/dashboard))
- **Cost:** 1 credit per call. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)).
- **MCP tool:** `facebook_profile` on `https://api.lurkapi.com/mcp`
- **Freshness:** responses are cached for up to 10 minutes
- **Try it live:** https://lurkapi.com/docs/facebook/profile#try (no signup)
- **Platform:** [Facebook](https://lurkapi.com/docs/facebook.md) (facebook.com/ads/library)
- **Web page:** https://lurkapi.com/docs/facebook/profile

## When to use this

Pass any Facebook profile URL: a Page or a person, by username, profile.php?id= or /people/ link. `type` says whether it's a Page or a personal profile. Pages and personal profiles in public or professional mode return what logged-out visitors see; fields that don't apply stay null. A private personal profile returns 403 `not_public` and an unknown username 404 `not_found`; both are charged 1 credit. Facebook shows logged-out visitors the same page for a private profile and a deleted or unused profile.php id, so those return `not_public` too. This endpoint returns metadata, not a feed.

## Parameters

All parameters go in the query string.

| Name | Type | Required | Default | Allowed values | Description | Example |
| --- | --- | --- | --- | --- | --- | --- |
| `url` | string | yes |  |  | A Facebook Page or personal profile URL: a username (https://www.facebook.com/NASA), profile.php?id=, /people/<name>/<id> or /pages/<name>/<id>. Groups, share links and other paths are rejected. | `https://www.facebook.com/NASA` |

## Example request

Replace `YOUR_API_KEY` with your key, or set `LURKAPI_KEY` for the code. [Get a free key](https://lurkapi.com/login?next=/dashboard).

curl:

```bash
curl "https://api.lurkapi.com/v1/facebook/profile?url=https%3A%2F%2Fwww.facebook.com%2FNASA" \
  -H "x-api-key: YOUR_API_KEY"
```

JavaScript:

```js
const params = new URLSearchParams({
  url: "https://www.facebook.com/NASA",
});
const res = await fetch(`https://api.lurkapi.com/v1/facebook/profile?${params}`, {
  headers: { "x-api-key": process.env.LURKAPI_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data);
```

Python:

```python
import os
import requests

res = requests.get(
    "https://api.lurkapi.com/v1/facebook/profile",
    params={
        "url": "https://www.facebook.com/NASA",
    },
    headers={"x-api-key": os.environ["LURKAPI_KEY"]},
    timeout=60,
)
data = res.json()
if not data["success"]:
    raise RuntimeError(f"{data['code']}: {data['error']}")
print(data)
```

## Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in `…`.

200 OK (application/json):

```json
{
  "success": true,
  "credits_remaining": 999999,
  "credits_charged": 1,
  "id": "100044561550831",
  "type": "page",
  "page_id": "54971236771",
  "url": "https://www.facebook.com/NASA",
  "name": "NASA - National Aeronautics and Space Administration",
  "description": "NASA - National Aeronautics and Space Administration. 28,727,665 followe…",
  "is_verified": true,
  "followers_count": 28727665,
  "followers_text": "28M followers",
  "following_count": 52,
  "talking_about_count": 101631,
  "profile_picture_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.30808-1/243095782_41666103649…",
  "cover_photo_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.99422-6/809146614_44840139285…"
}
```

## Response fields

Every field of a successful response. `[]` marks a list: `a[].b` is the `b` of each item in `a`. **nullable** fields can be `null`; **optional** fields can be missing.

| Field | Type | Description |
| --- | --- | --- |
| `success` | `true` | Always true here; errors have `success: false`. |
| `credits_remaining` | `number` | Your balance after this call. On anonymous playground calls: free tries left today. |
| `credits_charged` | `number` | Credits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1). |
| `id` | `string` | Facebook's profile id. New-style Pages and professional-mode personal profiles also have a separate page_id. |
| `type` | `string`, nullable | `page` for a business Page, `personal` for a person's profile (including professional mode); null if Facebook doesn't say. |
| `page_id` | `string`, nullable | The delegate Page id, useful for Ad Library company ads. Pages always have one; personal profiles only in professional mode, otherwise null. |
| `url` | `string` | The canonical public Facebook profile URL. |
| `name` | `string` | The Page or person's display name. |
| `description` | `string`, nullable | The exact public description, which can include the Page name, follower counts and biography. |
| `is_verified` | `boolean`, nullable | Whether the public header shows Facebook's verification badge; null if omitted. |
| `followers_count` | `number`, nullable | Exact follower count from public page metadata; rounded display counts are not converted into exact counts; null when Facebook does not disclose it to public visitors. |
| `followers_text` | `string`, nullable | The follower count label shown in the header, which is often rounded (for example 28M followers). |
| `following_count` | `number`, nullable | Exact following count, when the public header shows an unrounded number; null when Facebook does not disclose it to public visitors. |
| `talking_about_count` | `number`, nullable | The talking-about count reported in Facebook's public page metadata. Pages and professional-mode profiles only; null for other personal profiles; null when Facebook does not disclose it to public visitors. |
| `profile_picture_url` | `string`, nullable | The public profile-picture CDN URL. CDN links expire. |
| `cover_photo_url` | `string`, nullable | The public cover-photo CDN URL; null when there is none. CDN links expire. |

## Caching and freshness

Responses are cached for up to 10 minutes, so a repeat call within that window can return the same data. It still costs 1 credit.

## Errors

Errors return `{ success: false, error, code, docs }` with the HTTP status below. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)). [All error codes](https://lurkapi.com/docs.md#errors).

| Status | Code | Meaning |
| --- | --- | --- |
| 401 | `missing_api_key` | No API key. Send it in the `x-api-key` header. |
| 401 | `invalid_api_key` | The key is unknown or was revoked. |
| 402 | `insufficient_credits` | Not enough credits for this call. Buy a pack or wait for tomorrow's top-up. |
| 403 | `not_public` | The platform confirmed this account or content isn't available to logged-out visitors. Use a publicly visible target. Charged when the platform was checked. |
| 404 | `not_found` | The endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked. |
| 405 | `method_not_allowed` | Endpoints take GET with query params. |
| 429 | `rate_limited` | Too many calls at once. Wait for the `retry-after` seconds, then retry. |
| 500 | `internal_error` | Something broke on our side. Retry; 5xx errors are free. |
| 502 | `upstream_error` | The platform didn't give a usable answer. Retry; 5xx errors are free. |
| 503 | `upstream_busy` | All our connections to the platform are busy. Retry in a few seconds; 5xx errors are free. |
| 504 | `upstream_timeout` | The platform took over 30 seconds to answer. Retry; timeouts are free. |

## Use it in Claude

Once LurkAPI is [connected to Claude](https://lurkapi.com/docs.md#claude), this endpoint is the `facebook_profile` tool. Ask in plain English, for example:

Ask Claude:

```text
Use LurkAPI's facebook_profile with url "https://www.facebook.com/NASA" and summarize what you find.
```

Claude calls `facebook_profile` with arguments like these, and each call costs 1 credit:

Tool arguments:

```json
{
  "url": "https://www.facebook.com/NASA"
}
```

Tool results skip nulls and empty lists to save tokens.

---

Previous: [Search Ad Library companies](https://lurkapi.com/docs/facebook/search-companies.md) · Next: [Public post](https://lurkapi.com/docs/facebook/post.md)
