# Facebook Profiles in bulk API (facebook.profiles_batch)

- Canonical page: [https://everyinfra.com/en/facebook-api/profiles_batch](https://everyinfra.com/en/facebook-api/profiles_batch?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "facebook", "action": "profiles_batch", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Billing unit: each element in `usernames` counts as one call; the number of elements you send sets the charge
- Returns: list
- Mode: sync only; everything it returns (every target of a batch, or every SKU of a product) is read in one call, and "mode": "async" returns 422 before any charge

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=facebook&action=profiles_batch

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| usernames | not declared | yes | not declared | Facebook Pages for `profiles_batch`, as an array of up to 20 entries; a comma-separated string is not accepted. Each entry is a Page username such as `natgeo` (a leading @ is dropped), a numeric Page ID, or a Page link such as `https://www.facebook.com/natgeo` or a `profile.php?id=` link. List each Page once; a different capitalization is still the same Page. A request with an unrecognized entry, a duplicate or more than 20 entries is rejected with a 422 before any charge. Billed per Page; Pages not found are not charged and are listed in `missed`. |
| limit | integer (1–) | no | not declared | The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| name | Name of the object itself, for account, product and business capabilities. |
| url | Link to the record on the platform. |
| bio | Profile bio written by the account; may contain line breaks and emoji. |
| category | Category name in the platform's own taxonomy, not normalized across platforms. |
| like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
| follower_count | Followers. null means not disclosed, not 0. |
| is_verified | Whether the platform verified the account. null means it cannot be determined. |
| phone | Contact phone number, passed through without format normalization. |
| email | Contact email address, passed through as is. |
| website | External website entered by the account or business. |
| rating | Rating. **The scale varies by platform**: rating_scale on the same row gives the maximum (usually 5; Booking, Douban, iQIYI and NAVER use 10). Convert with rating_scale before comparing across platforms, or the comparison can come out backwards. |
| rating_scale | Maximum of rating in the same row: 5 for five-star scales, 10 for ten-point scales. Present only when the row has a rating. |
| avatar_url | Avatar image link. Some platforms return sized CDN links that can expire. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
| input | The entry that this row answers, returned exactly as you passed it: for profiles_batch an entry of usernames, for posts_batch an entry of urls. Use it to match rows to your entries; the returned url and id can be written differently, for example a Page ID where you passed a link, or a full post link where you passed a short link. |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "facebook",
  "action": "profiles_batch",
  "params": {
    "usernames": [
      "natgeo",
      "NASA"
    ]
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "facebook",
        "action": "profiles_batch",
        "params": {
            "usernames": [
                "natgeo",
                "NASA",
            ],
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "facebook",
  "action": "profiles_batch",
  "results": [
    {
      "id": …,
      "name": …,
      "url": …,
      "bio": …,
      "category": …,
      "like_count": …,
      "follower_count": …,
      "is_verified": …,
      "phone": …,
      "email": …,
      "website": …,
      "rating": …,
      "rating_scale": …,
      "avatar_url": …,
      "platform": …,
      "input": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=facebook
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
