LinkedIn Ads
Read LinkedIn Campaign Manager through the Marketing API: ad accounts, campaign groups, campaigns and creatives, and ad analytics (impressions, clicks, spend, conversions, leads) by campaign, creative, day or member demographics such as company, job function and seniority.
7 天免费 · 无需信用卡 · EU 托管
问 LinkedIn 任何事
通过 AnythingMCP 对 LinkedIn Ads 试一个真实提示 — Claude 调用工具并返回答案。在你的消息上按 Enter 即可在 Cloud 安装。
在 Cloud 上安装 LinkedInClaude 是 AI,可能会出错。请核对回答。
2 分钟设置
- 1在 cloud.anythingmcp.com 开始免费试用。
- 2在连接器商店点击 LinkedIn Ads。提示时粘贴凭据。
- 3生成 MCP API 密钥,将 AI 客户端指向生成的 MCP URL。
配置 LinkedIn Ads
直接来自连接器定义:在哪里获取凭据、需要哪些权限,以及该适配器调用的是哪个 API。 由连接器作者以英文提供。
LinkedIn Ads (Marketing API)
This connector reads LinkedIn Campaign Manager data through the versioned Marketing API at https://api.linkedin.com/rest (header LinkedIn-Version: 202609, Rest.li 2.0): ad accounts, campaign groups, campaigns, creatives and ad analytics. It does not create or change anything.
Setup. Create an app at linkedin.com/developers (it must be linked to a LinkedIn Page), request the Advertising API product and wait for LinkedIn's approval (the Development tier is enough for your own accounts). Under Auth, add the redirect URI shown on the connector page as an authorized redirect URL, and copy the client ID and secret here. Save, then click Authorize with Provider and sign in with a member who has a role on the ad accounts. The scopes are r_ads (accounts, campaigns, creatives) and r_ads_reporting (analytics). Access tokens last 60 days; approved Advertising API apps also get a refresh token (one year), which the connector uses to renew access automatically. When the refresh token expires, authorize again.
Which tool first. linkedin_ads_list_my_ad_accounts returns the accounts the member can use as URNs like urn:li:sponsoredAccount:507404993; pass only the number as account_id. Then list campaign groups, campaigns and creatives, and read performance with the analytics tools.
Ids. LinkedIn returns URNs (urn:li:sponsoredCampaign:123, urn:li:sponsoredCreative:456). Every tool takes the plain number; the connector builds and encodes the URN itself. Analytics rows carry the URN of their pivot in pivotValues; match it against the list tools to get names.
Pagination. Search answers (accounts, campaign groups, campaigns, creatives) carry metadata.nextPageToken; pass it as page_token until it is missing. Analytics is not paginated and returns at most 15,000 rows.
Analytics. Give the date range as separate numbers (start_year, start_month, ...); the end date is inclusive. time_granularity ALL returns one row per pivot value, DAILY one row per day. Ask for the metrics you need in fields (at most 20) and always keep dateRange and pivotValues. Cost is costInLocalCurrency (the account currency) or costInUsd. Performance data is near real time and kept 10 years; demographic pivots (MEMBER_*) are approximate, delayed 12 to 24 hours, kept 2 years, show only the top 100 values per creative per day and drop values with fewer than 3 events. Test accounts have no analytics. An empty elements list means no activity or no access, not an error.
Limits. LinkedIn throttles per application and member per day, and analytics also by data volume (45 million metric values per 5 minutes). A 429 means wait and retry later.
Errors. 401: authorize again. 403 USER_NOT_AUTHORIZED or ACCESS_DENIED: the member has no role on that account, or the app lacks the Advertising API product or the r_ads_reporting scope. 426 or a version error: the LinkedIn-Version header is no longer supported (each version lives at least one year).