Adwarp
v0.5.0Open-source ad agent for LinkedIn Ads and Google Ads.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
gads_list_accounts
List every Google Ads customer this login can reach. Run this first: it proves the OAuth client, your Google Cloud project's API access, and account access all work.
gads_list_client_accounts
List the client accounts under a Google Ads manager (MCC) account.
| Parameter | Type | Description |
|---|---|---|
managerId * | string | Manager customer id, digits only |
gads_keyword_ideas
Keyword research: search volume, competition, and top-of-page bid range for seed terms and/or a landing page. The sizing step before committing budget, equivalent to estimating audience reach on LinkedIn.
| Parameter | Type | Description |
|---|---|---|
seeds * | array | Seed keywords or phrases |
customerId | string | |
languages | array | |
limit | integer | |
locations | array | |
pageUrl | string |
gads_list_campaigns
Account structure: campaigns with their ad groups nested. Paused campaigns are included.
| Parameter | Type | Description |
|---|---|---|
customerId | string | |
includeRemoved | boolean |
gads_list_ads
Ads in an ad group, with their responsive-search headlines and descriptions.
| Parameter | Type | Description |
|---|---|---|
adGroupId * | string | |
customerId | string |
gads_list_conversion_actions
Conversion actions on the account, so a launch can name one instead of guessing an id.
| Parameter | Type | Description |
|---|---|---|
customerId | string |
gads_launch_search_campaign
Create a PAUSED Search campaign from a brief: budget, campaign, geo/language targeting, ad groups, keywords, and responsive search ads, all in one atomic mutate. Defaults to validateOnly=true, which asks Google to validate the whole batch and persist nothing. Show the returned plan to the user and only re-call with validateOnly=false after they confirm. House rules are applied automatically and cannot be overridden: search network only (display expansion and search partners off), physical-presence-only location targeting, and Manual CPC. Nothing created here can serve. Activation is a human st…
| Parameter | Type | Description |
|---|---|---|
adGroups * | array | |
campaignName * | string | |
dailyBudget * | number | Amount in the ad account's currency, e.g. 150 for $150 |
finalUrl * | string | Landing page for ads that do not override it |
budgetName | string | Defaults to the campaign name |
conversionActionNames | array | Conversion actions to set as this campaign's goals; falls back to the config default |
cpcBid | Amount in the ad account's currency, e.g. 150 for $150 | |
customerId | string | 10-digit customer id; falls back to config default |
endDateTime | string | |
languages | array | ISO language codes |
locations | array | ISO country codes (US, GB) or raw geoTargetConstant ids |
negativeKeywordListId | string | |
negativeKeywords | array | |
startDateTime | string | |
validateOnly | boolean |
gads_performance
Performance rows at campaign, ad_group, ad, keyword, or search_term level, with totals and derived KPIs (CTR, CPC, CPM, conversion rate, cost per conversion).
| Parameter | Type | Description |
|---|---|---|
campaignId | string | |
customerId | string | |
endDate | string | YYYY-MM-DD |
level | string | |
period | string | |
startDate | string | YYYY-MM-DD |
gads_search
Run a raw GAQL query against the account. Read-only escape hatch for anything the other tools do not cover.
| Parameter | Type | Description |
|---|---|---|
query * | string | A GAQL query. Read-only: SELECT ... FROM ... |
customerId | string |
list_ad_accounts
List LinkedIn ad accounts this app can access.
list_targeting_facets
List LinkedIn targeting facets you can target on. Common short names: locations, profileLocations, seniorities, titles, functions, industries, staffCountRanges, skills, employers, employersPast, audienceMatchingSegments, dynamicSegments, interests, degrees, fieldsOfStudy, schools, groups.
search_targeting
Typeahead-search entities within a facet to get their URNs (e.g. facet='titles', query='marketing' -> Marketing Manager urn). Use 'list_facet_entities' for small fixed sets like seniorities. These URNs go into a targeting spec.
| Parameter | Type | Description |
|---|---|---|
facet * | string | short facet name, e.g. titles, industries, skills, staffCountRanges, locations |
query * | string |
list_facet_entities
List all entities of a small facet (e.g. seniorities, functions, degrees) to pick URNs from.
| Parameter | Type | Description |
|---|---|---|
facet * | string | short facet name, e.g. seniorities |
estimate_audience
Estimate audience size for a structured targeting spec (facet short name -> entity URNs). A campaign needs >=300 members to serve.
| Parameter | Type | Description |
|---|---|---|
include * | object | facet short name -> entity URNs (ANDed across facets) |
exclude | object | facet short name -> entity URNs to exclude |
upload_audience_csv
Clean a CSV at csvPath and upload it as a matched-audience DMP segment. Auto-detects contact (email, or first and last name) vs company (account) lists, normalizes column names, drops non-matcher columns, hashes emails, and converts company domains to website URLs. Contact lists keep first name, last name, company, title and country for LinkedIn's people match, which raises the match rate on work emails; a row with no valid email but a first and last name matches on name. Requires the Audiences product; matching takes up to 48h.
| Parameter | Type | Description |
|---|---|---|
csvPath * | string | Path to the CSV file on the server |
name * | string | |
accountId | string | |
type | string | Force the list type; auto-detected if omitted |
audience_from_salesforce
Build a matched audience from a Salesforce SOQL query that selects an email column. Closes the loop: flagged accounts/contacts -> DMP segment. Requires the local `sf` CLI to be authenticated.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
name * | string | Audience/segment name |
soql * | string | SOQL selecting an email column, e.g. SELECT Email FROM Contact WHERE ... |
emailField | string | Email column name if not 'Email' |
audience_from_hubspot
Build a matched audience from HubSpot contacts or companies. Pass exactly 1 source: a HubSpot listId (its members), or filters for a CRM search (all ANDed). Reads every page, cleans the records like a CSV upload, and uploads only SHA256 email hashes for contacts (name and website for companies). Pass dryRun=true first: it returns counts and a masked sample and uploads nothing. Needs a HubSpot private app token on this machine (ADWARP_HUBSPOT_TOKEN or ~/.adwarp/hubspot.json); matching takes up to 48h.
| Parameter | Type | Description |
|---|---|---|
name * | string | Audience/segment name |
accountId | string | LinkedIn ad account id; defaults to config defaultAccountId |
dryRun | boolean | Return counts and a masked sample without uploading anything |
filters | array | CRM search filters, all ANDed (HubSpot allows up to 6 per group). Pass this or listId, not both. |
listId | string | HubSpot list id (the ILS list id). Pass this or filters, not both. |
type | string | contact or company. With listId it defaults to the list's object type; with filters it defaults to contact. |
list_conversions
List the account's existing conversions (insight tags) so you can select one to track on a campaign. Pass accountId or omit to use the default.
| Parameter | Type | Description |
|---|---|---|
accountId | string |
list_campaigns
List the account structure: campaign groups (campaigns) and/or their campaigns (ad groups), DRAFTS INCLUDED, unlike performance reports, which only show entities with spend. Pass level=groups for campaign groups only, level=campaigns for ad groups (optionally scoped by groupId), or level=both (default) for the full tree.
| Parameter | Type | Description |
|---|---|---|
accountId | string | |
groupId | string | Scope campaigns to one campaign group id |
includeArchived | boolean | |
level | string |
list_ads
List the creatives (ads) in a campaign (ad group), drafts included: id, name, status, and backing post urn.
| Parameter | Type | Description |
|---|---|---|
campaignId * | string | |
accountId | string |
delete_ad
Delete an ad: removes the creative and (best-effort) the Direct Sponsored Content post behind it. A post the ad only references, such as a member's post behind a thought leader ad or an organic Page post, stays in place. Accepts a numeric creative id or a full urn:li:sponsoredCreative URN. Use for cleaning up drafts or replacing an ad whose copy must change (Campaign Manager's editor does not reflect post edits, so recreate instead).
| Parameter | Type | Description |
|---|---|---|
creativeId * | string | |
accountId | string |
update_ad
Change a single ad's (creative's) status in place: PAUSED stops it serving, ACTIVE starts it serving, ARCHIVED retires it. Use PAUSED to stop an ad without touching the rest of its ad group. Accepts a numeric creative id or a full urn:li:sponsoredCreative URN. Setting ACTIVE starts spend, so set it only when the user explicitly asks to turn the ad on, never as a side effect of another request. An ACTIVE ad still only serves while its campaign (ad group) is ACTIVE. LinkedIn refuses to pause an ad that is still in review. Pass dryRun=true to preview the patch without sending it.
| Parameter | Type | Description |
|---|---|---|
creativeId * | string | Numeric creative (ad) id or a full urn:li:sponsoredCreative URN |
status * | string | PAUSED stops the ad serving. ACTIVE starts it serving and spending: set it only when the user explicitly asks. ARCHIVED retires it. |
accountId | string | Numeric ad account id; defaults to the configured account |
dryRun | boolean | Return the patch without sending it |
get_audience_status
Check a DMP segment's matching status and resolved size.
| Parameter | Type | Description |
|---|---|---|
segmentId * | string |
create_campaign_group
Create a campaign group (the top-level 'campaign'). Defaults to DRAFT.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | Numeric ad account id (no urn prefix) |
name * | string | |
runSchedule | object | |
status | string | |
totalBudget | object |
create_campaign
Create a campaign (the 'ad group') with targeting, budget, bid or bidding strategy (optimizationTargetType MAX_CLICK = Maximum Delivery on landing page clicks), schedule, and optional ad rotation (creativeSelection: OPTIMIZED or ROUND_ROBIN = rotate ads evenly). Defaults to DRAFT.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
campaignGroupId * | string | Numeric campaign group id |
name * | string | |
runSchedule * | object | |
applyDefaultConversion | boolean | |
applyDefaultExclusions | boolean | |
audienceSegmentUrn | string | urn:li:adSegment:... to target a matched audience |
conversionIds | array | |
costType | string | |
creativeSelection | string | Ad rotation: OPTIMIZED (LinkedIn default, favors the predicted winner) or ROUND_ROBIN (rotate ads evenly) |
dailyBudget | object | |
geoUrns | array | urn:li:geo:... locations to include |
locale | object | |
objectiveType | string | Campaign objective. For thought leader ads (sponsoring a member's post), ENGAGEMENT is the objective Adwarp has tested, and LinkedIn's Help also lists BRAND_AWARENESS and VIDEO_VIEW. |
optimizationTargetType | string | Bidding strategy. MAX_CLICK = Maximum Delivery optimized for landing page clicks (automated bid, charged CPM, unitCost ignored). Omit or NONE for a manual bid. |
politicalIntent | string | |
status | string | |
targeting | object | |
targetingCriteria | object | |
totalBudget | ||
type | string | |
unitCost | Bid amount |
update_campaign
Update an existing campaign (the 'ad group') in place: change its targeting and/or name, status, budget, bid, bidding strategy (optimizationTargetType, costType), schedule, ad rotation (creativeSelection: OPTIMIZED or ROUND_ROBIN = rotate ads evenly). Only the fields you pass change. Targeting is REPLACED when you pass any targeting form: a structured `targeting` spec, the `audienceSegmentUrn` (+ optional `geoUrns`) shorthand, or a raw `targetingCriteria`, and default exclusions are re-applied unless applyDefaultExclusions=false. Audience Expansion / Audience Network stay off. Pass dryRun=true…
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
campaignId * | string | Numeric campaign (ad group) id to update |
applyDefaultExclusions | boolean | |
audienceSegmentUrn | string | urn:li:adSegment:... (or bare id) matched audience to target, which replaces existing targeting |
costType | string | Change the cost type (CPM for Maximum Delivery) |
creativeSelection | string | Ad rotation: OPTIMIZED (favors the predicted winner) or ROUND_ROBIN (rotate ads evenly) |
dailyBudget | object | |
dryRun | boolean | |
geoUrns | array | urn:li:geo:... locations to include alongside the audience |
name | string | |
optimizationTargetType | string | Bidding strategy. MAX_CLICK = Maximum Delivery optimized for landing page clicks (automated bid, charged CPM, unitCost ignored). Omit or NONE for a manual bid. |
runSchedule | object | |
status | string | |
targeting | object | |
targetingCriteria | object | |
totalBudget | ||
unitCost | Bid amount |
create_text_ad
Create a Text Ad creative (DRAFT by default).
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
campaignId * | string | |
clickUri * | string | |
text * | string | |
title * | string | |
status | string |
create_image_ad
Create a single-image Sponsored Content creative (DRAFT). Omit imagePath to leave the campaign ready for an image later.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
campaignId * | string | |
clickUri * | string | |
commentary * | string | The post body / ad intro text |
headline * | string | |
organizationUrn * | string | urn:li:organization:... that owns the post |
callToAction | string | Call-to-action button label |
imagePath | string | |
name | string | Ad name shown in Campaign Manager |
status | string |
create_post_ad
Sponsor a post that already exists as an ad, without posting anything new. Use it for thought leader ads (a member's post, e.g. a founder's) or to sponsor a post from your Page. postUrn takes the post's urn:li:ugcPost: or urn:li:share: URN, or a LinkedIn URL that contains one. urn:li:activity: URNs, and /posts/ links that carry only an activity id, are refused: LinkedIn's API has no documented way to resolve them, so copy the URN from the embed code of the post's Embed this post option instead. For a member's post, the member must approve the sponsorship in LinkedIn before you can sponsor it,…
| Parameter | Type | Description |
|---|---|---|
campaignId * | string | Numeric campaign (ad group) id the ad goes in |
postUrn * | string | The post's urn:li:ugcPost: or urn:li:share: URN, or a LinkedIn URL that contains one. urn:li:activity: URNs are refused. |
accountId | string | Numeric ad account id; defaults to the configured account |
name | string | Ad name shown in Campaign Manager |
status | string | DRAFT unless the user explicitly asks for ACTIVE, which submits the ad for review and starts spend once it serves |
performance_summary
Account performance rollup over a period: totals + KPIs, top campaigns by spend/CTR, worst by cost-per-conversion, and flagged campaigns (spend with no conversions, high CPC, low CTR). Start here for 'how are my ads doing'.
| Parameter | Type | Description |
|---|---|---|
accountId | string | |
endDate | string | YYYY-MM-DD |
period | string | |
startDate | string | YYYY-MM-DD; with endDate, overrides period |
get_performance
Per-entity performance with derived KPIs (CTR, CPC, CPM, CPL, conversion rate). level: campaign_group (campaign), campaign (ad group), or creative (ad). Pass parentId to scope campaigns to a group or creatives to a campaign.
| Parameter | Type | Description |
|---|---|---|
accountId | string | |
endDate | string | YYYY-MM-DD |
level | string | campaign_group=campaign, campaign=ad group, creative=ad |
parentId | string | Parent group id (for level=campaign) or campaign id (for level=creative) |
period | string | |
startDate | string | YYYY-MM-DD; with endDate, overrides period |
performance_trend
Weekly or monthly trend for one entity, with period-over-period deltas on impressions, clicks, spend, conversions, and CTR. Use to spot momentum or creative fatigue.
| Parameter | Type | Description |
|---|---|---|
entityId * | string | Numeric id of the account/group/campaign/creative to trend |
bucket | string | |
endDate | string | YYYY-MM-DD |
level | string | |
period | string | |
startDate | string | YYYY-MM-DD; with endDate, overrides period |
launch_from_brief
End-to-end: optional audience upload -> campaign group -> campaign -> draft creatives. Everything DRAFT. Returns Campaign Manager review links.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
campaignGroupName * | string | |
campaignName * | string | |
dailyBudget * | object | |
runSchedule * | object | |
audience | object | |
bid | ||
conversionIds | array | |
conversionName | string | e.g. 'Demo Booked - Insight Tag' |
creativeSelection | string | |
creatives | array | |
geoUrns | array | Defaults to United States |
targeting | object | |
type | string |
log_ad_change
Record a change to an ad entity in the local change journal, so a later lift report can compare performance before vs. after it. Adwarp logs its own changes automatically. Use this for changes made elsewhere (e.g. in Campaign Manager) or to attach a hypothesis/label. Provide field+after for a field change, or note for a freeform annotation.
| Parameter | Type | Description |
|---|---|---|
entityId * | string | Numeric id of the campaign group / campaign / creative |
entityType * | string | campaignGroup (the 'campaign'), campaign (the 'ad group'), or creative (the 'ad') |
after | string | New value |
at | string | ISO 8601 time the change took effect; defaults to now |
before | string | Prior value, if known |
field | string | Field that changed, e.g. dailyBudget, headline, status |
label | string | Hypothesis/label, e.g. 'outcome-led headline test' |
name | string | Human name of the entity (for nicer listings) |
note | string | Freeform note (used when there is no specific field) |
tags | array |
list_ad_changes
List recorded ad changes (newest first) from the local change journal. Filter by entity type/id or tag. Use this to see what's been changed before computing lift.
| Parameter | Type | Description |
|---|---|---|
entityId | string | |
entityType | string | campaignGroup (the 'campaign'), campaign (the 'ad group'), or creative (the 'ad') |
limit | integer | Max rows (default 50) |
tag | string |
compute_lift
For each recorded change to an entity, compare performance in the window before the change against the window after it (default 14 days each side). Returns before/after KPI windows and per-metric relative deltas (CTR, CPC, conversion rate, cost-per-conversion, etc.). This is a directional pre/post comparison, NOT a controlled experiment. It is confounded by seasonality, the LinkedIn learning phase after edits, and concurrent budget changes; present it as a signal and call out partial after-windows on recent changes.
| Parameter | Type | Description |
|---|---|---|
entityId * | string | |
entityType * | string | campaignGroup (the 'campaign'), campaign (the 'ad group'), or creative (the 'ad') |
windowDays | integer | Days on each side of a change (default 14) |
inspect_competitor_ads
Discover competitor ads through the official API. auto optionally queues up to 10 creatives on the remote worker; api returns metadata only. Always provide advertiser plus companyId to filter unrelated name matches before collection. No local browser or scraper fallback. Read pending results with get_competitor_creatives. Cached screenshots require worker authentication. Report sample coverage and collection dates; never retry a blocked worker or use another browser/client. Synthesize findings rather than dumping rows.
| Parameter | Type | Description |
|---|---|---|
advertiser | string | Competitor/advertiser display name (accountOwner) |
companyId | string | Numeric LinkedIn company id, more precise than name |
concurrency | number | Remote worker concurrency is fixed at one. |
copyMax | integer | Creative sample size, capped at 10. Worker budgets cannot be overridden. |
countries | array | ISO-3166 country codes to scope, e.g. ['US','GB'] |
deep | boolean | Enqueue up to 10 verified company ads on the remote worker; reuse cached creatives. |
engine | string | auto = official API plus remote creative worker; api = metadata only. Local scraping is disabled. |
keyword | string | Free-text keyword search across ad copy |
max | integer | Max ads to collect |
get_competitor_creatives
Read remote creative job status and cached copy by ad IDs. Read-only: does not enqueue work or visit LinkedIn. Screenshots are available through the authenticated worker endpoint.
| Parameter | Type | Description |
|---|---|---|
ids * | array |