MMetadata /docs
Docs/Tools/resolve_linkedin_ad_library_links

resolve_linkedin_ad_library_links

Map LinkedIn Ad Library links (linkedin.com/ad-library/detail/<id>), sponsoredCreative URNs or bare LinkedIn creative ids to the ads in this account's Metadata library, so an ad…

Read creative

Returns data. Calling it changes nothing, so it is safe in an unattended loop.

What it does

Map LinkedIn Ad Library links (linkedin.com/ad-library/detail/<id>), sponsoredCreative URNs or bare LinkedIn creative ids to the ads in this account's Metadata library, so an ad the user points at by its LinkedIn link can be REUSED in a new campaign instead of rebuilt.

                   WHAT IT CAN AND CANNOT RESOLVE (repeat this to the user when a link is not found):
                   - It resolves ONLY ads that were launched THROUGH METADATA. Every ad Metadata
                     publishes to LinkedIn is recorded with the LinkedIn creative id LinkedIn gave
                     it, and that id is exactly what the Ad Library link carries. Those come back
                     with the library ad (id, name, type) plus the experiment and campaign that ran
                     them, ready to attach by name.
                   - An ad launched natively in LinkedIn Campaign Manager (a sponsored personal
                     post, a Thought Leader ad, anything built outside Metadata) is NOT in the
                     library and CANNOT be imported from the link, by this tool or any other. The
                     only way to run it here is to rebuild it from its source files (image, video,
                     PDF) with the ad tools.
                   - LinkedIn only. Meta or Google ad library links are refused per item.

                   HOW IT SEARCHES: the platform has no lookup by LinkedIn creative id, so this scans
                   the account's LinkedIn ads newest first (100 per page, `max_pages` pages, default
                   20, so the newest 2,000 ads) and stops as soon as every id is found. A miss with
                   `reached_end: false` means the ad may simply be older than the scan: pass
                   `campaign_ids` to narrow the scan to the campaigns that ran it, or raise
                   `max_pages`. A miss with `reached_end: true` means the account never launched
                   that ad through Metadata.

                   PARAMETERS:
                   - links: Ad Library URLs, `urn:li:sponsoredCreative:<id>` URNs or numeric LinkedIn
                     creative ids (1 to 20 per call).
                   - campaign_ids: optional wizard campaign ids that restrict the scan.
                   - max_pages: optional, 1 to 50, default 20.

                   RETURNS: {success, found, not_found, scanned_ads, scanned_pages, reached_end,
                   results: [{input, linkedin_creative_id, found: true, library_ad: {id, name, type,
                   channel, status, image_url}, experiment: {id, name, goal}, campaign: {id, name,
                   status}, stats: {spend, impressions, clicks, leads}, destination_url, reuse} |
                   {input, linkedin_creative_id, found: false, reason}]}

                   NEXT STEPS: attach a found ad by its library NAME through create_campaign /
                   add_and_edit_campaign_elements (`ads.list`), or read it with
                   get_ad_details(ids=<library_ad.id>). Never re-upload a found ad's creative: that
                   creates a duplicate library entry.

Arguments

ArgumentTypeNotes
links array required LinkedIn Ad Library URLs, sponsoredCreative URNs, or numeric LinkedIn creative ids.
campaign_ids array Optional wizard campaign ids to restrict the scan to.
max_pages integer Pages of 100 LinkedIn ads to scan, newest first. Default 20.

Request

Request template, not a complete runnable example. Replace placeholders, empty objects, arrays, and zero values with valid account-specific inputs. Read required fields and nested constraints in the full schema. Confirm the account, connected channels, and referenced assets before calling a write tool.

curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
  -H "Authorization: $METADATA_PAT" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"resolve_linkedin_ad_library_links","arguments":{"links":[]}}}'

Response

No recorded response. This tool needs arguments that only exist inside an account, so no response is recorded here. The request is an illustrative template. Fill required fields and check the current schema before calling it. No response is fabricated.

Other creative tools:

Browse the tool catalog · machine-readable index