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

# LeadMagic: B2b Ads Details

> Get the details of one B2B ad, given its ad ID or URL. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Get the details of one B2B ad, given its ad ID or URL.

> [!NOTE]
>
> Tool ID: `leadmagic_b2b_ads_details`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'leadmagic_b2b_ads_details',
  {
    "ad_url": "https://example.com"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run leadmagic_b2b_ads_details --input '{
  "ad_url": "https://example.com"
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "message": "Example message",
    "company": {
      "name": "Example",
      "domain": "example.com",
      "industry": "example"
    },
    "ad_details": {
      "ad_id": "ad_123",
      "headline": "example",
      "description": "Example description"
    }
  }
}
```

Use `deepline describe leadmagic_b2b_ads_details --json` for the latest machine-readable contract.

## Input reference

Get detailed information about a specific B2B ad using its ad library URL, path, or numeric ID.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.ad_url` | `string` | No | — | B2B ad library URL, path (/ad-library/detail/\{id}), or numeric ad ID |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Get detailed information about a specific B2B ad using its ad library URL, path, or numeric ID.",
    "properties": {
      "ad_url": {
        "type": "string",
        "description": "B2B ad library URL, path (/ad-library/detail/{id}), or numeric ad ID"
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.message` | `string` | No | — | — |
| `result.data.company` | `object` | No | — | — |
| `result.data.company.name` | `string \| null` | No | — | — |
| `result.data.company.domain` | `string \| null` | No | — | — |
| `result.data.company.industry` | `string \| null` | No | — | — |
| `result.data.company.company_size` | `string \| null` | No | — | — |
| `result.data.company.linkedin_url` | `string \| null` | No | — | — |
| `result.data.company.logo_url` | `string \| null` | No | — | — |
| `result.data.company.city` | `string \| null` | No | — | — |
| `result.data.company.state` | `string \| null` | No | — | — |
| `result.data.company.country` | `string \| null` | No | — | — |
| `result.data.ad_details` | `object` | No | — | Normalized ad object (same shape as B2B Ads Search) plus raw source payload |
| `result.data.ad_details.ad_id` | `string` | No | — | — |
| `result.data.ad_details.headline` | `string \| null` | No | — | — |
| `result.data.ad_details.description` | `string \| null` | No | — | — |
| `result.data.ad_details.content` | `string` | No | — | — |
| `result.data.ad_details.link` | `string` | No | — | — |
| `result.data.ad_details.ad_url` | `string` | No | — | — |
| `result.data.ad_details.ad_type` | `string \| null` | No | — | — |
| `result.data.ad_details.creative_type` | `string \| null` | No | — | — |
| `result.data.ad_details.advertiser` | `string \| null` | No | — | — |
| `result.data.ad_details.advertiser_linkedin_url` | `string \| null` | No | — | — |
| `result.data.ad_details.cta_text` | `string \| null` | No | — | — |
| `result.data.ad_details.landing_page_url` | `string \| null` | No | — | — |
| `result.data.ad_details.image_url` | `string \| null` | No | — | — |
| `result.data.ad_details.carousel_images` | `array` | No | — | — |
| `result.data.ad_details.video_url` | `string \| null` | No | — | — |
| `result.data.ad_details.targeting` | `object \| null` | No | — | — |
| `result.data.ad_details.total_impressions` | `string \| null` | No | — | — |
| `result.data.ad_details.impressions_by_country` | `array` | No | — | — |
| `result.data.ad_details.message_ad` | `object \| null` | No | — | — |
| `result.data.ad_details.raw` | `record` | No | — | Original ad payload for unmapped fields |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "message": {
            "type": "string"
          },
          "company": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "domain": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "industry": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "company_size": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "linkedin_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "logo_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "additionalProperties": false
          },
          "ad_details": {
            "type": "object",
            "description": "Normalized ad object (same shape as B2B Ads Search) plus raw source payload",
            "properties": {
              "ad_id": {
                "type": "string"
              },
              "headline": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "content": {
                "type": "string"
              },
              "link": {
                "type": "string"
              },
              "ad_url": {
                "type": "string"
              },
              "ad_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "creative_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "advertiser": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "advertiser_linkedin_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cta_text": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "landing_page_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "image_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "carousel_images": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "video_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "targeting": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "total_impressions": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "impressions_by_country": {
                "type": "array",
                "items": {}
              },
              "message_ad": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "raw": {
                "type": "object",
                "description": "Original ad payload for unmapped fields"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `0.68` per pricing unit.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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