Linkedin Ad Library Apiのロゴ

Linkedin Ad Library Api

コミュニティ
scavio-ai
linkedin-ad-library-api

Search ads running across LinkedIn by keyword and/or advertiser company id, returning each ad's advertiser, ad copy, format, promoted label, thumbnail and a detail link, then open one ad in full with its media, headline, who paid for it and the advertiser's company URL. 2 endpoints, 6 credits each, structured JSON.

概要

公開者scavio-ai
リポジトリskills
スキル名linkedin-ad-library-api
スター
67
フォーク
0
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    scavio-aiがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Linkedin Ad Library Api」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/scavio-ai/skills/tree/main/skills/linkedin-ad-library-api
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/scavio-ai/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/linkedin-ad-library-api .claude/skills/linkedin-ad-library-api
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでLinkedin Ad Library Apiを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にLinkedin Ad Library Apiを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Linkedin Ad Library Apiは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

LinkedIn Ad Library API - Search Ads and Ad Detail

Search the ads running across LinkedIn by keyword and/or advertiser, then open any ad in full with its creative, headline, format, who paid for it and the advertiser's company URL. Both endpoints return structured JSON.

When to trigger

Use this skill when the user asks to:

  • Find LinkedIn ads for a keyword, topic or advertiser
  • See what ads a company is running on LinkedIn and pull the creative
  • Build a competitor swipe file of B2B / sponsored-content ads
  • Get one ad in full: advertiser, ad copy, headline, format, media and who paid for it
  • Do paid-social, demand-gen or ad-intelligence research on LinkedIn

Setup

Get a free API key at scavio.dev (50 free credits to get started, no card required):

bash
export SCAVIO_API_KEY=sk_live_your_key

If you do not have a key yet

An agent running this skill without SCAVIO_API_KEY set will get 401 on every call below. The whole path from nothing to a working key is self-serve:

  1. Sign up at dashboard.scavio.dev - email or Google, no card required.
  2. A key is created for the account automatically at signup. It is on the dashboard under API Keys, ready to copy.
  3. A new account starts with 50 credits. Endpoints in this skill cost 1 credit each unless the table below says otherwise.

When the balance runs out the API answers 402 with a JSON body carrying billing_url. Topping up needs no code change - the same key keeps working. The smallest purchase is 2,500 credits for $25, and monthly plans work out cheaper per credit if the usage is steady rather than one-off.

Every request is a POST with a JSON body and:

Authorization: Bearer $SCAVIO_API_KEY

Endpoints

Base URL: https://api.scavio.dev. Every LinkedIn Ads endpoint costs 6 credits.

EndpointCreditsWhat it returns
POST /api/v1/linkedin/ads/search6The ads on the page for a keyword and/or advertiser: ad_id, advertiser, ad copy, format, creative type, sponsored flag, headline, thumbnail, advertiser logo, and a detail link
POST /api/v1/linkedin/ads/detail6One ad in full: advertiser and company URL, who paid for it, ad copy, headline, format, the media items, and a detail link

Parameters

ads/search

Provide a keyword or a company_id (or both).

ParameterTypeDefaultDescription
keywordstring--Keyword to search ads by
company_idstring--The advertiser's numeric LinkedIn company id
countriesstring or string[]--One or more 2-letter country codes to restrict results to
date_optionstring--Restrict to ads seen within a recent time window

ads/detail

Provide an ad_id or a url (one is required).

ParameterTypeDefaultDescription
ad_idstring--The ad's numeric id, as carried by every search result
urlstring--A full ad detail URL (linkedin.com/ad-library/detail/...), as an alternative to ad_id

Scope notes

  • ads/search requires a keyword or a company_id - a bare call with neither is rejected.
  • search returns the ads on one page and a total_seen count; it does not deep-paginate the whole library.
  • company_id is the numeric LinkedIn company id (the digits in a company URL like linkedin.com/company/1035), not the vanity handle.
  • detail carries impressions and demographics only where LinkedIn publishes them - for most non-political ads these are null, and about.run_dates may be null too.
  • The thumbnail, advertiser_logo and media[].url are LinkedIn CDN links - fetch them promptly.

Examples

python
import requests

BASE = "https://api.scavio.dev"
# Your key from https://scavio.dev. Load it from your environment or secret
# store in real code - keep it out of source control.
API_KEY = "sk_your_key_here"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1. Search ads by keyword, restricted to the US
search = requests.post(f"{BASE}/api/v1/linkedin/ads/search", headers=HEADERS,
    json={"keyword": "ai search", "countries": "US"}).json()
print(search["data"]["total_seen"], "ads seen")
for ad in search["data"]["ads"]:
    print(ad["ad_id"], ad["advertiser"], ad["format"])

# 2. Every ad from one advertiser, by numeric company id
by_company = requests.post(f"{BASE}/api/v1/linkedin/ads/search", headers=HEADERS,
    json={"company_id": "1035"}).json()

# 3. One ad in full, by an id from search
ad_id = search["data"]["ads"][0]["ad_id"]
detail = requests.post(f"{BASE}/api/v1/linkedin/ads/detail", headers=HEADERS,
    json={"ad_id": ad_id}).json()
d = detail["data"]
print(d["advertiser"], d["paid_for_by"], d["headline"])

curl:

bash
curl -s https://api.scavio.dev/api/v1/linkedin/ads/search \
  -H "Authorization: Bearer $SCAVIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"ai search","countries":"US"}'

Response shape

Every response uses the envelope { data, response_time, credits_used, credits_remaining }. On search, data carries ads[] plus a total_seen count; on detail, data is the ad object with a media[] array and an about block.

Guardrails

  • Every LinkedIn Ads call is 6 credits - more than the other social endpoints, so paginate deliberately.
  • Never fabricate advertisers, ad copy, headlines or media. Only return what the API returned.
  • impressions and demographics are usually null - do not invent spend or reach figures when they are not present.
  • CDN media links expire - fetch them promptly rather than storing the URL.

Failure handling

  • 400 means an invalid request - most often search called with neither keyword nor company_id, or detail with neither ad_id nor url. Fix and retry.
  • 401 means the API key is invalid or missing. Check SCAVIO_API_KEY.
  • 404 means the ad id or URL was not found.
  • 429 means rate or usage limit exceeded. Wait before retrying. See rate limits.
  • 502 / 503 mean the source is temporarily unavailable - wait a few seconds and retry.
  • If SCAVIO_API_KEY is not set, prompt the user to export it before continuing.

よくある質問

AIスキル「Linkedin Ad Library Api」では何ができますか?

Search ads running across LinkedIn by keyword and/or advertiser company id, returning each ad's advertiser, ad copy, format, promoted label, thumbnail and a detail link, then open one ad in full with its media, headline, who paid for it and the advertiser's company URL. 2 endpoints, 6 credits each, structured JSON.

TypingMindでLinkedin Ad Library Apiを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Linkedin Ad Library Apiはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにLinkedin Ad Library Apiをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/scavio-ai/skills/tree/main/skills/linkedin-ad-library-apiを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Linkedin Ad Library Apiを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Linkedin Ad Library Apiで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもLinkedin Ad Library Apiを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Linkedin Ad Library Api」は無料ですか?

はい。scavio-aiがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇