B2B Ad Details
Get detailed information about a specific B2B advertisement using its URL.
POST
/
v1
/
ads
/
b2b-ads-details
B2B Ad Details
curl --request POST \
--url https://api.leadmagic.io/v1/ads/b2b-ads-details \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"ad_url": 633872143
}
'import requests
url = "https://api.leadmagic.io/v1/ads/b2b-ads-details"
payload = { "ad_url": 633872143 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ad_url: 633872143})
};
fetch('https://api.leadmagic.io/v1/ads/b2b-ads-details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadmagic.io/v1/ads/b2b-ads-details"
payload := strings.NewReader("{\n \"ad_url\": 633872143\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadmagic.io/v1/ads/b2b-ads-details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ad_url' => 633872143
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "Ad details retrieved successfully",
"credits_consumed": 2,
"ad_details": {
"ads_type": "Video Ad",
"content": "Start your day knowing what deals you need to focus on instead of opening up a dozen tabs in your CRM.",
"image": null,
"heading": "Discover how our platform drives better sales outcomes",
"sub_heading": null,
"availability_duration": null,
"cta": {
"button_text": "Learn more",
"link": "https://leadmagic.io/why-leadmagic/?trk=ad_library_ad_preview_headline_content"
},
"video": {
"video_thumbnail": "https://media.licdn.com/dms/image/v2/D4D10AQGzuzrGo4HoHw/videocover-high/videocover-high/0/1729725542194/InstantDemoStartofDaymp4?e=2147483647&v=beta&t=mu3nEXijLeoh_jU49uhAGqgEWlVrH5j7oT4B4UBgezk",
"data_sources": [
{
"type": "video/mp4",
"src": "https://dms.licdn.com/playlist/vid/v2/D4D10AQGzuzrGo4HoHw/progressive-servable-video/progressive-servable-video/0/1729725541436/InstantDemoStartofDaymp4?e=2147483647&v=beta&t=OIP5SAQ2zRwNyY97Sgh0RRDUZqZvFYW0MUDHP5F8Q54",
"bitrate": 6284199
},
{
"type": "video/mp4",
"src": "https://dms.licdn.com/playlist/vid/v2/D4D10AQGzuzrGo4HoHw/mp4-640p-30fp-crf28/mp4-640p-30fp-crf28/0/1729725548053/InstantDemoStartofDaymp4?e=2147483647&v=beta&t=9cV-2R6MxcHoetYcg1Wuos9Wyi73haSAIgzlFFe4Izc",
"bitrate": 245220
},
{
"type": "video/mp4",
"src": "https://dms.licdn.com/playlist/vid/v2/D4D10AQGzuzrGo4HoHw/mp4-360p-30fp-crf28/mp4-360p-30fp-crf28/0/1729725547788/InstantDemoStartofDaymp4?e=2147483647&v=beta&t=xSM4xV1YorfPdlNWuSYqg9nacRTLE0F_DkLzdK9mgdQ",
"bitrate": 109857
},
{
"type": "video/mp4",
"src": "https://dms.licdn.com/playlist/vid/v2/D4D10AQGzuzrGo4HoHw/mp4-720p-30fp-crf28/mp4-720p-30fp-crf28/0/1729725549253/InstantDemoStartofDaymp4?e=2147483647&v=beta&t=f_bLk9pQQU8O5XoBapMPtqz-bZD6RQqTVLYkrYSAnlU",
"bitrate": 316022
}
]
},
"total_impressions": null,
"country_impressions": [],
"targeting_language": null,
"targeting_location": null,
"organization": {
"b2b_profile": 10454372,
"advertiser": "LeadMagic"
},
"about_ad_paying_entity": "Paid for by LeadMagic Inc."
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/validation_error",
"title": "Request validation failed. Check your input parameters.",
"status": 400,
"code": "validation_error",
"param": [
"email"
],
"detail": "Email format is invalid. Expected format: user@domain.com",
"action": "Provide a valid email address in the 'email' field.",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/missing_authentication",
"title": "Authentication required. Provide a valid API key in the X-API-Key header (case-insensitive).",
"status": 401,
"code": "missing_authentication",
"docs": "https://leadmagic.io/docs/api-reference/authentication"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/insufficient_credits",
"title": "Insufficient credits: need 5, have 2.50. Add credits to continue.",
"status": 402,
"code": "insufficient_credits",
"detail": "This request requires 5 credit(s) but your account only has 2.50 credits remaining.",
"action": "Add credits to your account at https://app.leadmagic.io/billing or contact support@leadmagic.io for enterprise plans.",
"docs": "https://leadmagic.io/docs/api-reference/credits",
"context": {
"credits_required": 5,
"credits_available": 2.5,
"credits_needed": 2.5
}
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/resource_not_found",
"title": "Resource not found.",
"status": 404,
"code": "resource_not_found",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/rate_limit_exceeded",
"title": "Rate limit exceeded: 300 requests per 1 minute. Wait and try again.",
"status": 429,
"code": "rate_limit_exceeded",
"detail": "You have exceeded the maximum allowed request rate. Please wait before making additional requests.",
"action": "Wait 42 seconds before retrying. Consider implementing exponential backoff.",
"docs": "https://leadmagic.io/docs/api-reference/rate-limits",
"context": {
"limit": 300,
"window": "1 minute",
"remaining": 0,
"reset_at": 1706745642,
"retry_after_seconds": 42
}
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/INTERNAL_ERROR",
"title": "Something went wrong on our end. Our team has been notified and is investigating.",
"status": 500,
"code": "INTERNAL_ERROR",
"detail": "This is a temporary server error. The issue has been automatically reported to our team.",
"action": "Wait 30 seconds and retry your request. If the problem persists, contact support@leadmagic.io",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}B2B Ad Details
Get detailed information about a specific B2B professional network advertisement. Includes full creative content, video data, targeting, and performance metrics.Endpoint Details
- Pricing
- Rate Limits
| Metric | Value |
|---|---|
| Cost | 2 credits per ad |
| No Results | FREE if ad not found |
Use the ad ID from B2B Ads Search to get complete details.
Per-Endpoint Limit
| Metric | Value |
|---|---|
| Requests/Minute | 300 |
| Burst Capacity | ~5 requests/second |
Rate limits are subject to change. Custom rate limits are available on enterprise plans — contact us.
Quick Example
curl -X POST 'https://api.leadmagic.io/v1/ads/b2b-ads-details' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"ad_url": "https://www.linkedin.com/ad-library/detail/633872143"}'
const response = await fetch('https://api.leadmagic.io/v1/ads/b2b-ads-details', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ad_url: 'https://www.linkedin.com/ad-library/detail/633872143'
})
});
const data = await response.json();
console.log(`Ad headline: ${data.headline}`);
import requests
response = requests.post(
'https://api.leadmagic.io/v1/ads/b2b-ads-details',
headers={'X-API-Key': 'YOUR_API_KEY'},
json={'ad_url': 'https://www.linkedin.com/ad-library/detail/633872143'}
)
data = response.json()
print(f"Ad headline: {data.get('headline', 'N/A')}")
Request Parameters
string
required
The Ad Library URL or ID (from B2B Ads Search).
Get the
ad_url from the link field in B2B Ads Search results.Response
string
required
Ad identifier
string
Ad headline
string
Full ad copy
object
Advertiser company info (name, profile URL)
object
Creative assets (images, videos)
object
Targeting criteria (if available)
string
When ad started
object
Impression range (if available)
number
required
Credits used (2 if found, 0 if not)
Example Response
{
"ad_id": "633872143",
"headline": "Transform your sales with AI",
"content": "Our platform helps sales teams close more deals with AI-powered insights...",
"advertiser": {
"name": "LeadMagic",
"profile_url": "linkedin.com/company/leadmagichq"
},
"creative": {
"image_url": "https://...",
"video_url": null,
"format": "single_image"
},
"targeting": {
"locations": ["United States", "Canada"],
"industries": ["Technology", "Finance"]
},
"started_running": "2026-01-15",
"impressions": {
"min": 10000,
"max": 50000
},
"credits_consumed": 2,
"message": "Ad details found."
}
Success Messages
| Message | Meaning | Cost |
|---|---|---|
Ad details found. | Full ad data returned | 2 credits |
Ad not found. | Ad doesn’t exist or expired | FREE |
Workflow
1
Search for Ads
Use B2B Ads Search to find ads for a company.
2
Get Ad IDs
Extract the
link field from search results.3
Fetch Details
Use this endpoint to get full creative and targeting data.
4
Analyze
Study messaging, targeting, and creative approaches.
Best Practices
Batch strategically
Batch strategically
Only fetch details for the most relevant ads from search results.
Study targeting
Study targeting
Targeting data reveals which audiences competitors prioritize.
Download video content
Download video content
Video URLs allow you to analyze video ad creative in detail.
Use Cases
Creative Analysis
Study complete ad creative including video content.
Targeting Intelligence
Understand competitor audience targeting strategies.
Performance Benchmarks
Use impression data to benchmark ad performance.
Competitive Reports
Build detailed competitive advertising reports.
Authorizations
Your LeadMagic API key. Header name is case-insensitive (X-API-Key, X-API-KEY, x-api-key all work).
Body
application/json
The URL of the B2B advertisement from the ad library
Example:
633872143
Was this page helpful?
⌘I
B2B Ad Details
curl --request POST \
--url https://api.leadmagic.io/v1/ads/b2b-ads-details \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"ad_url": 633872143
}
'import requests
url = "https://api.leadmagic.io/v1/ads/b2b-ads-details"
payload = { "ad_url": 633872143 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ad_url: 633872143})
};
fetch('https://api.leadmagic.io/v1/ads/b2b-ads-details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadmagic.io/v1/ads/b2b-ads-details"
payload := strings.NewReader("{\n \"ad_url\": 633872143\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadmagic.io/v1/ads/b2b-ads-details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ad_url' => 633872143
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "Ad details retrieved successfully",
"credits_consumed": 2,
"ad_details": {
"ads_type": "Video Ad",
"content": "Start your day knowing what deals you need to focus on instead of opening up a dozen tabs in your CRM.",
"image": null,
"heading": "Discover how our platform drives better sales outcomes",
"sub_heading": null,
"availability_duration": null,
"cta": {
"button_text": "Learn more",
"link": "https://leadmagic.io/why-leadmagic/?trk=ad_library_ad_preview_headline_content"
},
"video": {
"video_thumbnail": "https://media.licdn.com/dms/image/v2/D4D10AQGzuzrGo4HoHw/videocover-high/videocover-high/0/1729725542194/InstantDemoStartofDaymp4?e=2147483647&v=beta&t=mu3nEXijLeoh_jU49uhAGqgEWlVrH5j7oT4B4UBgezk",
"data_sources": [
{
"type": "video/mp4",
"src": "https://dms.licdn.com/playlist/vid/v2/D4D10AQGzuzrGo4HoHw/progressive-servable-video/progressive-servable-video/0/1729725541436/InstantDemoStartofDaymp4?e=2147483647&v=beta&t=OIP5SAQ2zRwNyY97Sgh0RRDUZqZvFYW0MUDHP5F8Q54",
"bitrate": 6284199
},
{
"type": "video/mp4",
"src": "https://dms.licdn.com/playlist/vid/v2/D4D10AQGzuzrGo4HoHw/mp4-640p-30fp-crf28/mp4-640p-30fp-crf28/0/1729725548053/InstantDemoStartofDaymp4?e=2147483647&v=beta&t=9cV-2R6MxcHoetYcg1Wuos9Wyi73haSAIgzlFFe4Izc",
"bitrate": 245220
},
{
"type": "video/mp4",
"src": "https://dms.licdn.com/playlist/vid/v2/D4D10AQGzuzrGo4HoHw/mp4-360p-30fp-crf28/mp4-360p-30fp-crf28/0/1729725547788/InstantDemoStartofDaymp4?e=2147483647&v=beta&t=xSM4xV1YorfPdlNWuSYqg9nacRTLE0F_DkLzdK9mgdQ",
"bitrate": 109857
},
{
"type": "video/mp4",
"src": "https://dms.licdn.com/playlist/vid/v2/D4D10AQGzuzrGo4HoHw/mp4-720p-30fp-crf28/mp4-720p-30fp-crf28/0/1729725549253/InstantDemoStartofDaymp4?e=2147483647&v=beta&t=f_bLk9pQQU8O5XoBapMPtqz-bZD6RQqTVLYkrYSAnlU",
"bitrate": 316022
}
]
},
"total_impressions": null,
"country_impressions": [],
"targeting_language": null,
"targeting_location": null,
"organization": {
"b2b_profile": 10454372,
"advertiser": "LeadMagic"
},
"about_ad_paying_entity": "Paid for by LeadMagic Inc."
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/validation_error",
"title": "Request validation failed. Check your input parameters.",
"status": 400,
"code": "validation_error",
"param": [
"email"
],
"detail": "Email format is invalid. Expected format: user@domain.com",
"action": "Provide a valid email address in the 'email' field.",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/missing_authentication",
"title": "Authentication required. Provide a valid API key in the X-API-Key header (case-insensitive).",
"status": 401,
"code": "missing_authentication",
"docs": "https://leadmagic.io/docs/api-reference/authentication"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/insufficient_credits",
"title": "Insufficient credits: need 5, have 2.50. Add credits to continue.",
"status": 402,
"code": "insufficient_credits",
"detail": "This request requires 5 credit(s) but your account only has 2.50 credits remaining.",
"action": "Add credits to your account at https://app.leadmagic.io/billing or contact support@leadmagic.io for enterprise plans.",
"docs": "https://leadmagic.io/docs/api-reference/credits",
"context": {
"credits_required": 5,
"credits_available": 2.5,
"credits_needed": 2.5
}
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/resource_not_found",
"title": "Resource not found.",
"status": 404,
"code": "resource_not_found",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/rate_limit_exceeded",
"title": "Rate limit exceeded: 300 requests per 1 minute. Wait and try again.",
"status": 429,
"code": "rate_limit_exceeded",
"detail": "You have exceeded the maximum allowed request rate. Please wait before making additional requests.",
"action": "Wait 42 seconds before retrying. Consider implementing exponential backoff.",
"docs": "https://leadmagic.io/docs/api-reference/rate-limits",
"context": {
"limit": 300,
"window": "1 minute",
"remaining": 0,
"reset_at": 1706745642,
"retry_after_seconds": 42
}
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}{
"success": false,
"errors": [
{
"type": "https://api.leadmagic.io/errors/INTERNAL_ERROR",
"title": "Something went wrong on our end. Our team has been notified and is investigating.",
"status": 500,
"code": "INTERNAL_ERROR",
"detail": "This is a temporary server error. The issue has been automatically reported to our team.",
"action": "Wait 30 seconds and retry your request. If the problem persists, contact support@leadmagic.io",
"docs": "https://leadmagic.io/docs/api-reference/errors"
}
],
"meta": {
"request_id": "ea6e3248-f4d2-437d-bca3-20881b529129",
"timestamp": "2024-02-01T12:00:00.000Z"
}
}