> ## Documentation Index
> Fetch the complete documentation index at: https://creatorinsights.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Facebook Company Ads

Fetches all ads currently running for a specific company from the Meta Ad Library. Each ad includes ad\_archive\_id, page\_name, is\_active, publisher\_platform, and a snapshot with body, images, videos, and display\_format. Supports filtering by country, media\_type, date range, and language with cursor-based pagination. Both GET and POST are supported. If the cursor becomes too large after extensive pagination, use POST and send the same parameters in the JSON body. Scraper responses preserve their public source field names by default (trim omitted or true) while removing only noisy, heavy, or unsafe fields. Set trim=false for the full sanitized source response.

Intelligence uses plan credits; niche searches start at 2, other ordinary fetches at 1, and applicable options can cost more.

> [!NOTE]
>
> Examples use illustrative values. The playground sends a real request. Intelligence can consume plan credits. Publishing examples save drafts.

## Endpoint

**GET** `https://api.creatorinsights.in/v1/ad-intelligence/meta-company-ads`

**Content type:** Query parameters; no JSON request body.

**Authentication:** `x-api-key: YOUR_SAVED_API_KEY`

**MCP tool:** `fetch_facebook_company_ads`. See [MCP Setup](https://creatorinsights.mintlify.site/mcp-setup.md) for AI clients.

## Request parameters

**x-workspace-id** `string`

Active workspace ID or current name in your organization. Optional header alternative to passing workspace in the query.

**pageId** `string`

The companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName

**companyName** `string`

The name of the company. Can either use this or pageId

**country** `string`

This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.

**status** `string`

Status of the ad. Defaults to ACTIVE. Allowed values: `ALL`, `ACTIVE`, `INACTIVE`.

**media\_type** `string`

Media type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme. Allowed values: `ALL`, `IMAGE`, `VIDEO`, `MEME`, `IMAGE_AND_MEME`, `NONE`.

**language** `string`

Language to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc

**sort\_by** `string`

Sort by impressions (high to low), or Most Recent (relevancy\_monthly\_grouped). Defaults to impressions. Allowed values: `total_impressions`, `relevancy_monthly_grouped`.

**start\_date** `string`

Start date to search for. Format: YYYY-MM-DD

**end\_date** `string`

End date to search for. Format: YYYY-MM-DD

**cursor** `string`

Cursor to paginate through results

**trim** `boolean` (default: true)

Defaults to true: preserve public source field names, metrics, and public media URLs while removing only noisy, heavy, or unsafe fields. Set false for the full sanitized source response; credentials, transport headers/context, internal credit data, and upstream-provider identity are always removed.

**workspace** `string`

Workspace ID or current name in the authenticated organization. Required for paid requests when the organization has more than one active workspace. The selected workspace receives this request charge.

## Request example

Send these arguments as URL query parameters.

```json theme={null}
{
  "companyName": "Example Company",
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME"
}
```

```bash cURL theme={null}
curl --get 'https://api.creatorinsights.in/v1/ad-intelligence/meta-company-ads' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  --data-urlencode 'companyName=Example Company' \
  --data-urlencode 'workspace=YOUR_WORKSPACE_ID_OR_CURRENT_NAME'
```

```javascript Node.js theme={null}
const parameters = {
  "companyName": "Example Company",
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME"
};
const url = new URL('https://api.creatorinsights.in/v1/ad-intelligence/meta-company-ads');
for (const [name, value] of Object.entries(parameters)) url.searchParams.set(name, String(value));
const response = await fetch(url, { headers: { 'x-api-key': process.env.CREATOR_INSIGHTS_API_KEY } });
const raw = await response.text();
let result;
try { result = JSON.parse(raw); } catch { throw new Error('Non-JSON response: ' + response.status); }
if (!response.ok || result.success === false) throw new Error(result.message || result.error || 'Request failed');
console.log(result.data);
```

```python Python theme={null}
import json, os, requests

arguments = json.loads("{\"companyName\":\"Example Company\",\"workspace\":\"YOUR_WORKSPACE_ID_OR_CURRENT_NAME\"}")
response = requests.get("https://api.creatorinsights.in/v1/ad-intelligence/meta-company-ads",
    headers={"x-api-key": os.environ["CREATOR_INSIGHTS_API_KEY"]},
    params=arguments, timeout=120)
response.raise_for_status()
result = response.json()
print(result["data"])
```

## Response example

HTTP 200. Illustrative values; optional fields can be omitted, null, or empty. Additional platform fields may be returned.

```json Success theme={null}
{
  "success": true,
  "data": {
    "success": true,
    "results": [
      {
        "ad_archive_id": "1234567890123456789",
        "end_date": 1767225600,
        "is_aaa_eligible": false,
        "is_active": false,
        "page_id": "1234567890123456789",
        "page_name": "Example creator content",
        "political_countries": [],
        "reach_estimate": null,
        "snapshot": {
          "body": {
            "text": "Example creator content"
          },
          "branded_content": null,
          "brazil_tax_id": null,
          "byline": null,
          "caption": "Example creator content",
          "cards": [],
          "cta_text": "Example creator content",
          "cta_type": "example",
          "country_iso_code": null,
          "current_page_name": "Example creator content",
          "disclaimer_label": null,
          "display_format": "example",
          "event": null,
          "images": [],
          "is_reshared": false,
          "link_description": null,
          "link_url": "https://example.com/sample",
          "page_categories": [
            "example"
          ],
          "page_entity_type": "example",
          "page_id": "1234567890123456789",
          "page_is_deleted": false,
          "page_is_profile_page": false,
          "page_like_count": 120,
          "page_name": "Example creator content",
          "page_profile_picture_url": "https://example.com/sample",
          "page_profile_uri": "https://example.com/sample",
          "root_reshared_post": null,
          "title": "Example creator content",
          "videos": [
            {
              "video_hd_url": "https://media.example.com/sample.mp4",
              "video_preview_image_url": "https://media.example.com/sample.jpg",
              "video_sd_url": "https://media.example.com/sample.mp4",
              "watermarked_video_hd_url": "",
              "watermarked_video_sd_url": ""
            }
          ],
          "additional_info": null,
          "ec_certificates": [],
          "extra_images": [],
          "extra_links": [
            "https://example.com/sample"
          ],
          "extra_texts": [],
          "extra_videos": [
            {
              "video_hd_handle": "https://media.example.com/sample.mp4",
              "video_sd_handle": "https://media.example.com/sample.mp4",
              "watermarked_video_hd_url": null,
              "watermarked_video_sd_url": null
            }
          ]
        },
        "total_active_time": null,
        "spend": null,
        "start_date": 1767225600,
        "publisher_platform": [
          "example"
        ],
        "url": "https://example.com/sample",
        "start_date_string": "2026-01-01T00:00:00Z",
        "end_date_string": "2026-01-01T00:00:00Z"
      }
    ],
    "cursor": "EXAMPLE_CURSOR"
  },
  "credits_charged": 1
}
```

## Response fields

**success** `boolean` *required*

Whether this operation succeeded. Also check HTTP status and nested platform statuses.

**data** `object` *required*

Operation-specific payload. See the nested field table and response example below.

**credits\_charged** `number`

Creator Insights plan credits for this call; the example is illustrative.

| Field | Type | Description |
| - | - | - |
| `success` | boolean | Example response field. Availability depends on the record and selected options. |
| `data` | object | Public source field names are preserved by default when trim is omitted or true; only noisy, heavy, or unsafe fields are removed. Set trim=false for the full sanitized source response. Fields vary with source availability; unavailable metrics are null. |
| `data.success` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.results` | array | List of returned entries; may be empty. |
| `data.results[].ad_archive_id` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].end_date` | integer | Example response field. Availability depends on the record and selected options. |
| `data.results[].is_aaa_eligible` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.results[].is_active` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.results[].page_id` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].page_name` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].political_countries` | array | List of returned entries; may be empty. |
| `data.results[].reach_estimate` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].snapshot` | object | Nested object. Expand the response schema for its fields. |
| `data.results[].snapshot.body` | object | Nested object. Expand the response schema for its fields. |
| `data.results[].snapshot.branded_content` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].snapshot.brazil_tax_id` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].snapshot.byline` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].snapshot.caption` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.cards` | array | List of returned entries; may be empty. |
| `data.results[].snapshot.cta_text` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.cta_type` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.country_iso_code` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].snapshot.current_page_name` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.disclaimer_label` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].snapshot.display_format` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.event` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].snapshot.images` | array | List of returned entries; may be empty. |
| `data.results[].snapshot.is_reshared` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.link_description` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].snapshot.link_url` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.page_categories` | array | List of returned entries; may be empty. |
| `data.results[].snapshot.page_entity_type` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.page_id` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.page_is_deleted` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.page_is_profile_page` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.page_like_count` | integer | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.page_name` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.page_profile_picture_url` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.page_profile_uri` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.root_reshared_post` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].snapshot.title` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].snapshot.videos` | array | List of returned entries; may be empty. |
| `data.results[].snapshot.additional_info` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].snapshot.ec_certificates` | array | List of returned entries; may be empty. |
| `data.results[].snapshot.extra_images` | array | List of returned entries; may be empty. |
| `data.results[].snapshot.extra_links` | array | List of returned entries; may be empty. |
| `data.results[].snapshot.extra_texts` | array | List of returned entries; may be empty. |
| `data.results[].snapshot.extra_videos` | array | List of returned entries; may be empty. |
| `data.results[].total_active_time` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].spend` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.results[].start_date` | integer | Example response field. Availability depends on the record and selected options. |
| `data.results[].publisher_platform` | array | List of returned entries; may be empty. |
| `data.results[].url` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].start_date_string` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].end_date_string` | string | Example response field. Availability depends on the record and selected options. |
| `data.cursor` | string | Example response field. Availability depends on the record and selected options. |
| `credits_charged` | number | Example response field. Availability depends on the record and selected options. |

The interactive schema includes deeper nested fields. Sample fields are descriptive, not a promise that every record includes them.

## n8n and JSON tool endpoint

**POST** `https://api.creatorinsights.in/api/v1/tools/fetch_facebook_company_ads`. Use Header Auth with `x-api-key` and body content type JSON. This alias returns the n8n envelope below; included operations can report zero credits\_deducted.

```bash theme={null}
curl -X POST 'https://api.creatorinsights.in/api/v1/tools/fetch_facebook_company_ads' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"companyName":"Example Company","workspace":"YOUR_WORKSPACE_ID_OR_CURRENT_NAME"}'
```

```json theme={null}
{
  "status": true,
  "tool": "fetch_facebook_company_ads",
  "credits_deducted": 1,
  "data": {
    "success": true,
    "results": [
      {
        "ad_archive_id": "1234567890123456789",
        "end_date": 1767225600,
        "is_aaa_eligible": false,
        "is_active": false,
        "page_id": "1234567890123456789",
        "page_name": "Example creator content",
        "political_countries": [],
        "reach_estimate": null,
        "snapshot": {
          "body": {
            "text": "Example creator content"
          },
          "branded_content": null,
          "brazil_tax_id": null,
          "byline": null,
          "caption": "Example creator content",
          "cards": [],
          "cta_text": "Example creator content",
          "cta_type": "example",
          "country_iso_code": null,
          "current_page_name": "Example creator content",
          "disclaimer_label": null,
          "display_format": "example",
          "event": null,
          "images": [],
          "is_reshared": false,
          "link_description": null,
          "link_url": "https://example.com/sample",
          "page_categories": [
            "example"
          ],
          "page_entity_type": "example",
          "page_id": "1234567890123456789",
          "page_is_deleted": false,
          "page_is_profile_page": false,
          "page_like_count": 120,
          "page_name": "Example creator content",
          "page_profile_picture_url": "https://example.com/sample",
          "page_profile_uri": "https://example.com/sample",
          "root_reshared_post": null,
          "title": "Example creator content",
          "videos": [
            {
              "video_hd_url": "https://media.example.com/sample.mp4",
              "video_preview_image_url": "https://media.example.com/sample.jpg",
              "video_sd_url": "https://media.example.com/sample.mp4",
              "watermarked_video_hd_url": "",
              "watermarked_video_sd_url": ""
            }
          ],
          "additional_info": null,
          "ec_certificates": [],
          "extra_images": [],
          "extra_links": [
            "https://example.com/sample"
          ],
          "extra_texts": [],
          "extra_videos": [
            {
              "video_hd_handle": "https://media.example.com/sample.mp4",
              "video_sd_handle": "https://media.example.com/sample.mp4",
              "watermarked_video_hd_url": null,
              "watermarked_video_sd_url": null
            }
          ]
        },
        "total_active_time": null,
        "spend": null,
        "start_date": 1767225600,
        "publisher_platform": [
          "example"
        ],
        "url": "https://example.com/sample",
        "start_date_string": "2026-01-01T00:00:00Z",
        "end_date_string": "2026-01-01T00:00:00Z"
      }
    ],
    "cursor": "EXAMPLE_CURSOR"
  }
}
```

## Errors

Handle non-2xx responses before mapping data. Error codes vary with the cause; these are representative examples. A 429 response may be plain text. Never treat a queued post as published or blindly retry a partial publication.

```json theme={null}
{
  "success": false,
  "error": "UNAUTHORIZED",
  "message": "Missing or invalid API key"
}
```

| HTTP status | Meaning |
| - | - |
| 400 | Invalid arguments |
| 401 | Missing or invalid API key |
| 402 | Insufficient Creator Insights plan credits |
| 403 | Subscription or permission required |
| 404 | Resource not found |
| 409 | Conflicting request, idempotency key, or unfinished upload |
| 410 | Managed media expired; upload the file again |
| 413 | Media too large |
| 415 | Unsupported media type |
| 422 | Account selection, connection, or platform payload needs attention |
| 500 | Authentication or server error |
| 503 | Service temporarily unavailable or operation failed; inspect saved status before retrying |
| 429 | Rate limit; inspect response headers and retry later. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.