---
title: "Adyntel / Facebook and Instagram ads a company is running"
description: "Adyntel tool adyntel-facebook on looot: input fields, $0.00642 per call, output shape, and code to run it with curl, JavaScript or Python."
sidebar:
  hidden: true
---

{/* Generated by scripts/generate-api-reference.mjs from data/api-reference.json. Do not edit. */}

Lists the ads a company runs on Facebook and Instagram, from the Meta Ad Library. Send company_domain (or facebook_url); country_code narrows it. Send one of: company_domain, facebook_url.

- **Tool id:** `adyntel-facebook`
- **Provider:** [Adyntel](/providers/adyntel)
- **Job:** [Search the Meta ad library](/reference/jobs/ads-meta-search) (`ads.meta.search`)
- **Price:** $0.00642 per call. A call that fails at the provider costs $0.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `active_status` | string | no | This filters the search in the ad library by active, inactive or all ads. |
| `all_ads` | boolean | no | This will automatically use the continuation_token and scrape all the pages, returning all available ads. |
| `company_domain` | string | no | Company website. Example: "nike.com" |
| `continuation_token` | string | no | Token used to grab the next set of ads |
| `country_code` | string | no | Parameter used to filter results for a specific country. |
| `facebook_url` | string | no | Facebook page url (needs to start with https://) |
| `media_type` | string | no | Parameter used to filter results for a specific type of media. |
| `webhook_url` | string | no | Webhook URL where the data will be returned |

## Output

Shape of the run's `result`, checked against 2 real answers:

```txt
{ page_id, results: { url, page_id, end_date, snapshot: { body: { ... }, cards: { ... }[], title, images: { ... }[], videos: { ... }[], caption, page_id, cta_text, cta_type, link_url, page_name, extra_links: unknown[], extra_texts: unknown[], extra_images: unknown[], extra_videos: unknown[], display_format, page_categories: string[], page_like_count, link_description, page_entity_type, page_profile_uri, current_page_name, page_is_profile_page, page_profile_picture_url }, is_active, page_name, categories: string[], start_date, entity_type, collation_id, ad_archive_id, end_date_string, start_dat... ...
```

The shape is cut here. Signed in, `looot inspect adyntel-facebook` prints all of it.

## Run it

Every call needs your API token in `LOOOT_TOKEN`; [Sign in](/get-started/sign-in#use-the-token-in-scripts-and-agents) shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With `wait: 30` the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll `GET /v1/runs/<runId>`.

Example input with placeholder values:

<CodeGroup>

```bash curl
curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"adyntel-facebook","input":{"company_domain":"nike.com"},"wait":30}'
```

```js JavaScript
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "adyntel-facebook",
    input: {
      company_domain: "nike.com",
    },
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
```

```python Python
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "adyntel-facebook",
        "input": {
            "company_domain": "nike.com",
        },
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))
```

</CodeGroup>

To let looot pick among every provider of this job instead, send `job:ads.meta.search` as `endpointId`; see [the job page](/reference/jobs/ads-meta-search).
