Reference
LinkedIn Ads tools
Manage LinkedIn campaigns, search targeting options, estimate audience size and access B2B marketing analytics.
On this page
Before you begin
Connect the relevant LinkedIn Ads account through Accounts, then connect your AI assistant. Confirm the target account and date range before querying data or making changes.
This is the generated catalog. The tools shown in your AI assistant depend on your connected accounts, active workspace, role, write permissions, enabled features and the client's supported tool surface. A listed tool is not a promise that it is enabled in every workspace. See accounts, workspace access and troubleshooting.
Available tools
6 tools · API 202609.
| Tool | Access | Purpose |
|---|---|---|
linkedin_list_ad_accounts | Read | List accounts or get single account details |
linkedin_query | Read | Query campaigns, campaign groups or creatives, search targeting options and estimate audience size |
linkedin_manage | Write | Manage campaign groups, campaigns and creatives; inline image/video DRAFT creation is limited to explicitly enabled pilot accounts |
linkedin_get_analytics | Read | Get analytics at account or campaign level |
linkedin_get_creatives_with_images | Read | Get creatives with performance data and optional images |
linkedin_upload | Write | Upload a private staged JPEG/PNG or MP4, or inspect its LinkedIn processing status. |
Write tools can change account settings, campaigns or workspace content. Confirm the target and proposed changes before running them.
Private local uploads support Meta, TikTok, LinkedIn and Google Ads. Your workspace needs upload access to the destination, and your AI client needs file access and HTTP upload. JPEG/PNG images up to 20 MB (20,000,000 bytes) and MP4 videos up to 500 MB (500,000,000 bytes) are supported by the upload flow; destination-specific restrictions still apply. Existing account-library IDs remain available. Read the upload guide before uploading.
Use linkedin_query to search targeting options and estimate audience size. For explicitly enabled pilot accounts, the create_inline action of linkedin_manage can create image or video DRAFT creatives from existing organization-owned media. DRAFT creation does not establish ad approval or activate a campaign. Read media to LinkedIn draft ads for the account, campaign and readback requirements.
Example questions
Show my LinkedIn ad accounts
What's my LinkedIn campaign performance?
Which LinkedIn creatives have the best CTR?
Compare performance across campaign groups
What's my cost per lead on LinkedIn?
Find LinkedIn targeting options for a job title
Estimate the audience size for my proposed LinkedIn targeting criteria
Prepare an image or video draft proposal for my enabled LinkedIn pilot account
API capabilities
Available fields and combinations depend on the resource, account and campaign type. Adapt the examples to your selected account.
Metrics
| Category | Fields |
|---|---|
| Traffic | impressions, clicks, costInLocalCurrency, externalWebsiteConversions, dateRange |
| Engagement | likes, comments, shares, follows, totalEngagements, viralImpressions, viralClicks |
| Video | videoViews, videoStarts, videoFirstQuartileCompletions, videoMidpointCompletions, videoThirdQuartileCompletions, videoCompletions, fullScreenPlays |
| Conversion | externalWebsiteConversions, externalWebsitePostClickConversions, externalWebsitePostViewConversions, leadGenerationMailContactInfoShares, oneClickLeads, talentLeads |
Dimensions
| Category | Fields |
|---|---|
| Aggregation Level | ACCOUNT, CAMPAIGN, CAMPAIGN_GROUP, CREATIVE |
| Time Granularity | DAILY, MONTHLY, ALL |
Query examples
Campaign Performance Report
Get daily campaign metrics over a date range
Tool: linkedin_get_analytics.
linkedin_get_analytics(
account_id="urn:li:sponsoredAccount:123456",
pivot="CAMPAIGN",
time_granularity="DAILY",
start_date="2025-01-01",
end_date="2025-01-31"
)
Find Targeting Options
Search a targeting facet by text and retain the returned URNs for campaign targeting
Tool: linkedin_query.
linkedin_query(
account_id="123456",
entity_type="targeting_entities",
targeting_facet="urn:li:adTargetingFacet:titles",
targeting_query="data engineer"
)
Estimate Audience Size
Use the same targetingCriteria object as a campaign. Counts are rounded estimates, not expected reach; total=0 can mean fewer than 300 members
Tool: linkedin_query.
linkedin_query(
account_id="123456",
entity_type="audience_count",
targeting_criteria={"include": {"and": [
{"or": {"urn:li:adTargetingFacet:locations": ["urn:li:geo:102890719"]}}
]}}
)
Creative A/B Test Analysis
Compare creative performance within a campaign
Tool: linkedin_get_analytics.
linkedin_get_analytics(
account_id="urn:li:sponsoredAccount:123456",
campaign_id="urn:li:sponsoredCampaign:789",
time_granularity="ALL",
start_date="2025-01-01",
end_date="2025-01-31"
)
Technical reference
API endpoint: api.linkedin.com/rest. Status: stable.
Monthly versioning (YYYYMM format). 12-month support window. Version header required on all requests.
OAuth scopes
| Scope | Description | Required |
|---|---|---|
r_ads | Read access to ad accounts and campaigns | Yes |
r_ads_reporting | Read access to analytics and reporting | Yes |
rw_ads | Required for advertising writes | No |
w_organization_social | Required to upload organization-owned media and create organization posts | No |
r_organization_social | Required to read back organization posts | No |
Limitations and notes
- API version header required on every request (LinkedIn-Version: 202609)
- Old versions sunset after 12 months
- URN encoding required (urn:li:sponsoredAccount:123)
- Analytics data may have up to 24-hour delay
- Additional scopes are optional for reporting but required for their listed actions. Advertising writes require rw_ads and a suitable account role; organization posting and post readback also require their respective social scopes and a suitable page role
- Inline image/video creation is limited to explicitly enabled pilot accounts and also requires workspace write permission. Check current access and roles when an operation is refused; a refusal alone does not establish that reconnection is needed
- Targeting search requires a full facet URN and search text. Audience counts use campaign targetingCriteria and are rounded estimates, not delivery forecasts
