> ## 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_id": "ad_123",
    "ad_url": "https://example.com"
  },
);

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

### CLI

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

## 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": {
    "ad_id": "ad_123"
  }
}
```

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

## Input reference

Get detailed information about a specific B2B ad.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.ad_id` | `string` | No | — | B2B ad ID |
| `payload.ad_url` | `string` | No | — | Canonical live-docs field for the B2B ad identifier. |

<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.",
    "properties": {
      "ad_id": {
        "type": "string",
        "description": "B2B ad ID"
      },
      "ad_url": {
        "type": "string",
        "description": "Canonical live-docs field for the B2B ad identifier."
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.ad_id` | `string` | Yes | — | — |
| `result.data.company_name` | `string` | No | — | — |
| `result.data.ad_title` | `string` | No | — | — |
| `result.data.ad_description` | `string` | No | — | — |
| `result.data.ad_url` | `string` | No | — | Format: `uri`. |
| `result.data.campaign_info` | `object` | No | — | — |
| `result.data.campaign_info.campaign_name` | `string` | No | — | — |
| `result.data.campaign_info.start_date` | `string` | No | — | Format: `date`. |
| `result.data.campaign_info.end_date` | `string \| null` | No | — | Format: `date`. |
| `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": {
          "ad_id": {
            "type": "string"
          },
          "company_name": {
            "type": "string"
          },
          "ad_title": {
            "type": "string"
          },
          "ad_description": {
            "type": "string"
          },
          "ad_url": {
            "type": "string",
            "format": "uri"
          },
          "campaign_info": {
            "type": "object",
            "properties": {
              "campaign_name": {
                "type": "string"
              },
              "start_date": {
                "type": "string",
                "format": "date"
              },
              "end_date": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "ad_id"
        ],
        "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

* [LeadMagic provider guide](https://deepline.com/docs/providers/leadmagic/guide.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.