What Is the LinkedIn Marketing API?
The LinkedIn Marketing API (also called LinkedIn Marketing Developer Platform) is a programmatic interface that allows developers and marketing technology platforms to automate LinkedIn advertising campaigns, access performance data, manage ad accounts, and integrate LinkedIn marketing capabilities into third-party tools and applications.
Unlike manually creating campaigns through LinkedIn Campaign Manager's web interface, the Marketing API enables software applications to create ads, adjust budgets, target audiences, and retrieve analytics programmatically through code. This allows marketing automation platforms, agencies managing hundreds of accounts, and enterprises with complex workflows to scale LinkedIn advertising beyond what manual management allows.
The API is designed for B2B marketing platforms (HubSpot, Hootsuite, Sprout Social), advertising agencies, enterprise marketing teams, and developers building custom marketing automation solutions. Individual advertisers typically don't interact with the API directly—they use tools built on top of it.
How the LinkedIn Marketing API Works
The LinkedIn Marketing API is a RESTful API using OAuth 2.0 authentication, allowing authorized applications to send requests and receive responses in JSON format. Applications authenticate using access tokens, make HTTP requests to API endpoints, and receive structured data responses.
Core API Capabilities
Campaign Management: Create, update, and manage LinkedIn advertising campaigns programmatically. Set campaign objectives (awareness, consideration, conversion), configure targeting parameters, establish budgets and schedules, and activate or pause campaigns without logging into Campaign Manager.
Ad Creative Management: Upload ad creatives (images, videos, documents), create ad variations, manage sponsored content, and update ad copy and calls-to-action through API calls. Build dynamic ad creative workflows that adapt based on performance or external data sources.
Targeting and Audience Management: Define audience targeting criteria (job titles, company size, industries, skills, locations) programmatically. Create and manage Matched Audiences (website retargeting, contact list uploads, account-based lists) through automated workflows.
Budget and Bid Management: Set campaign budgets, adjust bids based on performance data, implement automated bidding strategies, and control campaign pacing without manual intervention. Allow algorithmic budget optimization across multiple campaigns.
Analytics and Reporting: Retrieve campaign performance metrics (impressions, clicks, conversions, spend), access demographic breakdowns, pull conversion tracking data, and integrate LinkedIn advertising data into centralized analytics platforms or custom dashboards.
Lead Generation: Access leads captured through LinkedIn Lead Gen Forms programmatically, sync leads to CRM systems in real-time, and automate lead follow-up workflows triggered by form submissions.
Account Administration: Manage ad account access, configure conversion tracking, set up billing information, and handle administrative tasks across multiple ad accounts from centralized applications.
API Access Levels
Marketing Developer Platform Partner: Verified marketing technology platforms with LinkedIn partnership agreements. Partners get broader API access, higher rate limits, and ability to serve multiple customers. Examples: HubSpot, Hootsuite, Salesforce Marketing Cloud.
Marketing Developer Platform Access: Individual developers and companies building custom applications for their own use. More limited access than partners but sufficient for internal tools and workflows.
Application Process: Developers apply through LinkedIn Developer Portal, describe use case, demonstrate legitimate business purpose, and await approval. LinkedIn reviews applications to ensure API access aligns with platform policies and user privacy protections.
Learn how LinkedIn marketing strategies integrate with API-powered automation.
Why Use the LinkedIn Marketing API
Use Cases and Benefits
1. Marketing Automation Platform Integration
The Problem: Marketers use multiple tools (HubSpot, Marketo, Salesforce) but must switch to LinkedIn Campaign Manager for LinkedIn ads, breaking workflow continuity.
API Solution: Marketing automation platforms integrate LinkedIn Marketing API, allowing users to create LinkedIn campaigns, adjust budgets, and view performance data without leaving their primary platform. Unified marketing workflow across all channels.
Example: HubSpot users create LinkedIn ads directly in HubSpot interface, sync LinkedIn leads to HubSpot CRM automatically, and view LinkedIn performance alongside other channels in HubSpot analytics dashboard.
2. Multi-Account Management at Scale
The Problem: Agencies managing 50+ client LinkedIn ad accounts must manually log in and out of each account, making bulk changes, reporting, and optimization impossibly time-consuming.
API Solution: Build or use tools that manage all accounts from single interface. Make bulk campaign changes, generate cross-account reports, and optimize campaigns across entire client portfolio programmatically. This is critical for social media client onboarding at scale.
Example: Agency uses API-powered dashboard showing all clients' LinkedIn performance in one view, makes budget adjustments across 100 campaigns with single action, and generates client reports automatically.
3. Dynamic Campaign Optimization
The Problem: Manual campaign optimization is slow—marketers check performance weekly and make adjustments based on outdated data.
API Solution: Build automated optimization systems that monitor performance continuously, adjust bids based on conversion data, pause underperforming ads, and scale winning campaigns without human intervention.
Example: E-commerce company builds system that automatically increases budgets on LinkedIn campaigns driving high-value purchases and decreases spend on campaigns with poor ROAS, optimizing 24/7 based on real-time data.
4. Custom Attribution and Analytics
The Problem: LinkedIn Campaign Manager analytics don't integrate with custom attribution models or proprietary data warehouses.
API Solution: Pull LinkedIn advertising data via API into centralized data warehouse, combine with data from other channels, and build custom attribution models showing true marketing impact across entire customer journey. Connect this to B2B marketing attribution strategies and marketing performance metrics.
Example: SaaS company combines LinkedIn ad data with website analytics, sales CRM data, and customer success metrics to calculate lifetime value by LinkedIn campaign and optimize budget allocation accordingly.
5. Automated Lead Management
The Problem: LinkedIn Lead Gen Forms capture leads, but manual CSV downloads and CRM uploads create delays in sales follow-up, reducing conversion rates.
API Solution: Automatically sync LinkedIn leads to CRM in real-time, trigger immediate sales notifications, and begin automated email nurture sequences within minutes of form submission. Crucial for improving conversion rates and understanding customer acquisition cost.
Example: B2B company syncs LinkedIn leads to Salesforce instantly, assigns leads to sales reps based on territory rules, and sends personalized follow-up email within 5 minutes of submission—while competitors wait hours or days for manual processing. This approach also works with B2B social media strategy and LinkedIn demographics targeting.
6. Programmatic Creative Management
The Problem: Testing 100 ad variations manually is impractical—creating, uploading, and managing creatives through web interface doesn't scale.
API Solution: Generate ad variations programmatically (different headlines, images, CTAs), upload via API, and manage creative testing at scale. Build dynamic creative optimization systems.
Example: Marketing team uses template system generating 50 ad variations targeted to different industries and job roles, uploads all via API, and runs automated tests to identify highest-performing combinations.
Understand marketing operations supporting API-driven marketing automation.
LinkedIn Marketing API vs. Other LinkedIn APIs
The LinkedIn API Ecosystem
LinkedIn Marketing API:
- Purpose: Advertising and sponsored content management
- Access: Requires application and approval
- Use cases: Campaign automation, ad management, performance analytics
- Users: Marketing platforms, agencies, advertisers
LinkedIn REST API:
- Purpose: General platform integrations (profile data, connections, posts)
- Access: Requires application and approval
- Use cases: Profile authentication, social sharing, content posting
- Users: Apps integrating LinkedIn login or sharing
LinkedIn Compliance API:
- Purpose: Page and organization management for compliance purposes
- Access: Restricted to LinkedIn Page Admins
- Use cases: Page management, content moderation, compliance workflows
- Users: Enterprise administrators
LinkedIn Talent Solutions API:
- Purpose: Recruiting and talent management integrations
- Access: Limited to LinkedIn Recruiter customers
- Use cases: Job posting, applicant tracking, talent sourcing
- Users: HR platforms, recruiting software
Key Distinction: Marketing API is specifically for advertising and sponsored content—it doesn't access member profile data, connections, or organic LinkedIn activity. It's focused on campaign management and advertising performance.
Technical Implementation Overview
Getting Started with LinkedIn Marketing API
Step 1: Create LinkedIn Developer Account
Register at LinkedIn Developer Portal, accept developer agreement, and create application. Provide application name, description, logo, website, and privacy policy.
Step 2: Apply for Marketing API Access
Submit Marketing Developer Platform application describing:
- Business use case (what you're building)
- Expected request volume
- Target customers (if building tool for others)
- Company and contact information
LinkedIn reviews applications within 2-4 weeks. Approval isn't guaranteed—legitimate business purposes aligned with platform policies have higher acceptance rates.
Step 3: Implement OAuth 2.0 Authentication
LinkedIn uses OAuth 2.0 three-legged authentication flow:
- Redirect users to LinkedIn authorization page
- User grants permissions to your application
- LinkedIn redirects back with authorization code
- Exchange code for access token
- Use access token in API requests
Required Permissions (Scopes):
r_ads(read advertising accounts and campaigns)rw_ads(write/modify advertising accounts and campaigns)r_ads_reporting(read advertising analytics and reports)w_organization_social(post sponsored content on behalf of organizations)
Step 4: Make API Requests
Send HTTP requests to LinkedIn API endpoints using access token for authentication.
Example: Retrieve Ad Accounts
GET https://api.linkedin.com/v2/adAccountsV2
Authorization: Bearer {access_token}
Example: Create Campaign
POST https://api.linkedin.com/v2/adCampaignsV2
Authorization: Bearer {access_token}
Content-Type: application/json
{
"account": "urn:li:sponsoredAccount:123456",
"name": "Q1 Lead Generation Campaign",
"type": "SPONSORED_UPDATES",
"status": "ACTIVE",
"dailyBudget": {
"amount": "100",
"currencyCode": "USD"
}
}
Step 5: Handle Rate Limits
LinkedIn enforces rate limits preventing abuse. Typical limits:
- Application-level throttling (requests per day)
- User-level throttling (requests per user per day)
- Endpoint-specific limits
Implement exponential backoff retry logic when hitting rate limits. Monitor X-RateLimit-* response headers showing remaining quota.
Step 6: Error Handling
API returns standard HTTP status codes and detailed error messages:
200Success400Bad Request (invalid parameters)401Unauthorized (invalid/expired token)403Forbidden (insufficient permissions)429Too Many Requests (rate limit exceeded)500Internal Server Error
Implement robust error handling logging failures and retrying transient errors.
Learn about social media advertising technical foundations supporting API integrations.
Common LinkedIn Marketing API Endpoints
Key API Resources
Ad Accounts Management:
GET /v2/adAccountsV2- List ad accounts user has access toGET /v2/adAccountsV2/{id}- Retrieve specific ad account detailsGET /v2/adAccountUsersV2- List users with access to ad account
Campaign Management:
GET /v2/adCampaignsV2- List campaigns in ad accountPOST /v2/adCampaignsV2- Create new campaignPUT /v2/adCampaignsV2/{id}- Update existing campaignDELETE /v2/adCampaignsV2/{id}- Delete campaign
Creative Management:
GET /v2/adCreativesV2- List ad creativesPOST /v2/adCreativesV2- Create ad creativePUT /v2/adCreativesV2/{id}- Update creativePOST /v2/assets- Upload image or video assets
Targeting:
GET /v2/targeting/facets- Retrieve available targeting facetsGET /v2/targeting/facet/{facet}/values- Search targeting options (companies, job titles, etc.)
Analytics:
GET /v2/adAnalytics- Retrieve campaign analyticsGET /v2/conversions- Access conversion tracking dataGET /v2/adAnalyticsByCreative- Performance by creativeGET /v2/adAnalyticsByDemographics- Demographic breakdowns
Lead Generation:
GET /v2/leadForms- List Lead Gen FormsGET /v2/leadFormResponses- Retrieve form submissions
Conversion Tracking:
GET /v2/conversions- List conversion eventsPOST /v2/conversions- Create conversion tracking pixel
API Versioning
LinkedIn uses API versioning to introduce changes without breaking existing integrations. Current version is v2. When v3 launches, v2 remains supported during deprecation period (typically 6-12 months), giving developers time to migrate.
Best Practice: Always specify API version in requests and monitor LinkedIn Developer Blog for deprecation announcements.
LinkedIn Marketing API Limitations
What You Can't Do
Organic Content Limitations: Marketing API primarily focuses on paid advertising. While you can post sponsored content (paid), organic company page posting uses separate LinkedIn REST API with different permissions and capabilities.
Member Profile Data Restrictions: Marketing API doesn't provide access to LinkedIn member profile data, connections, messages, or activity. Privacy-focused design ensures advertising APIs can't harvest personal member information.
Rate Limits: API rate limits prevent building high-frequency trading-style systems constantly polling for data updates. Applications must work within LinkedIn's throttling constraints.
Conversion Attribution Windows: API provides attribution data within LinkedIn's standard attribution windows (7-day click, 1-day view). Custom attribution windows requiring access to raw click/impression timestamps may not be supported.
Historical Data Access: Analytics data availability is limited (typically 2 years). Very old campaign data may not be accessible via API.
Certain Administrative Functions: Some advanced account administration tasks still require Campaign Manager web interface. API doesn't expose every possible configuration option.
No Direct Member Targeting: Cannot target specific LinkedIn members by username or profile URL. All targeting must use LinkedIn's standard targeting criteria (job title, company, industry, etc.). Privacy protection prevents direct member-level ad targeting.
Tools Built on LinkedIn Marketing API
Marketing Platforms Using the API
Marketing Automation Platforms:
- HubSpot (integrated LinkedIn ad management)
- Marketo Engage (LinkedIn integration for account-based marketing)
- Salesforce Marketing Cloud (LinkedIn advertising integration)
- Pardot (LinkedIn campaign integration)
Social Media Management:
- Hootsuite (LinkedIn ad campaign management)
- Sprout Social (LinkedIn advertising features)
- Buffer (LinkedIn scheduling and analytics)
Advertising Management:
- AdStage (cross-channel advertising management including LinkedIn)
- WordStream (PPC management including LinkedIn)
- Smartly.io (social advertising automation)
Analytics Platforms:
- Supermetrics (data connector pulling LinkedIn data to reporting tools)
- Funnel.io (marketing data aggregation including LinkedIn)
- Datorama (Salesforce's marketing intelligence including LinkedIn)
Lead Management:
- Zapier integrations (LinkedIn Lead Gen Form to CRM workflows)
- LeadsBridge (LinkedIn lead sync automation)
- PieSync (bidirectional CRM sync including LinkedIn leads)
Custom Solutions: Many enterprises and agencies build proprietary tools on LinkedIn Marketing API for specific workflows, client reporting, or competitive advantages.
Explore LinkedIn marketing strategies supported by API-powered tools.
Best Practices for Using LinkedIn Marketing API
Developer and Marketer Guidelines
1. Respect Rate Limits
Don't hammer the API with excessive requests. Implement intelligent caching, batch operations where possible, and exponential backoff when hitting limits. Aggressive API usage risks application suspension.
2. Secure Token Management
Access tokens grant full control over advertising accounts. Store tokens securely (encrypted databases, secrets management systems), never commit tokens to version control, rotate tokens periodically, and implement token expiration handling.
3. Error Handling and Logging
API calls fail for many reasons (network issues, rate limits, invalid parameters). Implement thorough error handling, log failures with context for debugging, and build retry logic for transient failures while avoiding infinite loops.
4. Test in Sandbox Environment
Before running code against production ad accounts, test thoroughly in development environment. LinkedIn provides testing capabilities (though not full sandbox)—use test ad accounts with minimal budgets during development.
5. Monitor API Changes
Subscribe to LinkedIn Developer Blog and API changelog. Breaking changes are announced with deprecation timelines, but staying informed prevents unexpected integration failures.
6. Efficient Data Retrieval
Use API filters and pagination to retrieve only needed data. Pulling entire datasets when you need small subsets wastes rate limit quota and processing time. Implement field selectors requesting only required response fields.
7. Respect User Privacy
Even though Marketing API doesn't expose member profile data, applications should still prioritize privacy—use minimal necessary permissions, provide clear privacy policies, and handle advertising data responsibly.
8. Build for Scale
Design systems handling multiple ad accounts, high campaign volumes, and concurrent operations. Implement queuing systems for API requests, use asynchronous processing for bulk operations, and architect for horizontal scaling.
Frequently Asked Questions
What is the LinkedIn Marketing API?
The LinkedIn Marketing API (LinkedIn Marketing Developer Platform) is a programmatic interface that allows developers and marketing platforms to automate LinkedIn advertising campaigns, access performance data, manage ad accounts, and integrate LinkedIn marketing capabilities into third-party tools. The API enables software applications to create ads, adjust budgets, target audiences, and retrieve analytics through code rather than manual Campaign Manager interface interaction. It's designed for B2B marketing platforms (HubSpot, Hootsuite), advertising agencies, and enterprises building custom marketing automation solutions.
Who can access the LinkedIn Marketing API?
Access requires application and approval through LinkedIn Developer Portal. Two access levels exist: Marketing Developer Platform Partner (verified marketing technology platforms with LinkedIn partnerships, broader access and higher rate limits) and Marketing Developer Platform Access (individual developers and companies building custom applications for their own use, more limited access). Developers apply describing their use case, demonstrating legitimate business purpose, and awaiting approval (typically 2-4 weeks). Individual advertisers typically don't use the API directly—they use tools built on top of it by approved developers.
What can you do with the LinkedIn Marketing API?
The API enables: campaign management (create, update, pause campaigns programmatically), ad creative management (upload creatives, manage variations), targeting and audience management (define criteria, manage Matched Audiences), budget and bid management (set budgets, adjust bids automatically), analytics and reporting (retrieve performance metrics, access demographic data), lead generation (access Lead Gen Form submissions programmatically), and account administration (manage access, configure tracking). Primary use cases include marketing automation platform integration, multi-account management for agencies, dynamic campaign optimization, custom attribution analytics, and automated lead syncing to CRMs.
How is the LinkedIn Marketing API different from other LinkedIn APIs?
LinkedIn Marketing API specifically focuses on advertising and sponsored content management—campaign automation, ad management, and performance analytics. LinkedIn REST API handles general platform integrations (profile data, connections, social sharing). LinkedIn Compliance API manages pages and organizations for compliance purposes. LinkedIn Talent Solutions API supports recruiting integrations. Marketing API doesn't access member profile data, connections, or organic LinkedIn activity—it's focused exclusively on advertising capabilities. This separation protects member privacy while enabling sophisticated advertising automation.
Do I need programming skills to use the LinkedIn Marketing API?
Yes, the API requires programming knowledge (typically Python, JavaScript/Node.js, Java, or PHP) to build integrations. You need to understand: RESTful API concepts, OAuth 2.0 authentication, HTTP requests and JSON responses, error handling, and rate limiting. However, most marketers don't interact with the API directly—they use marketing automation platforms (HubSpot, Hootsuite, Sprout Social) or advertising management tools that have already integrated the LinkedIn Marketing API, providing user-friendly interfaces built on top of the technical API infrastructure.
What are the LinkedIn Marketing API rate limits?
LinkedIn enforces rate limits preventing abuse, though exact limits aren't publicly documented and vary by endpoint and access level. Typical limits include: application-level throttling (total requests per day), user-level throttling (requests per user per day), and endpoint-specific limits. When hitting rate limits, API returns 429 Too Many Requests status. Best practices: implement exponential backoff retry logic, monitor X-RateLimit-* response headers showing remaining quota, cache data to minimize unnecessary requests, use batch operations where possible, and avoid polling endpoints excessively. Partner-level access typically gets higher rate limits than individual developer access.
Can the LinkedIn Marketing API access organic post data?
LinkedIn Marketing API primarily focuses on paid advertising (sponsored content, ads, campaigns). Organic company page posting uses the separate LinkedIn REST API with different permissions and capabilities. You can create sponsored content (paid promotion of posts) through the Marketing API, but general organic posting, engagement metrics for organic content, and company page analytics use different API endpoints. The REST API provides some organic content capabilities for company pages, but with more limited functionality compared to advertising features. This separation reflects LinkedIn's focus on advertising monetization while restricting organic reach automation.
How much does LinkedIn Marketing API access cost?
The LinkedIn Marketing API itself is free to access—LinkedIn doesn't charge licensing fees for API usage. However, costs include: developer time building and maintaining integrations (significant initial and ongoing investment), infrastructure costs (servers, databases, monitoring tools), LinkedIn advertising spend (API enables campaign management but you still pay for actual ad delivery), and potential third-party tool costs if using platforms that integrate the API. While API access is free, building production-quality integrations requires substantial technical resources, which is why most marketers use existing tools (HubSpot, Hootsuite) rather than building custom solutions.
Ready to integrate LinkedIn advertising into your marketing automation? Use SocialRails to manage LinkedIn campaigns alongside other social platforms. Learn more about LinkedIn marketing and marketing operations supporting API-driven workflows.