Adwarp

v0.5.0
io.github.adwarp-dev/adwarp Checked 10 hours ago Published 23 days ago

Open-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.

ParameterTypeDescription
managerId *stringManager 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.

ParameterTypeDescription
seeds *arraySeed keywords or phrases
customerIdstring
languagesarray
limitinteger
locationsarray
pageUrlstring

gads_list_campaigns

Account structure: campaigns with their ad groups nested. Paused campaigns are included.

ParameterTypeDescription
customerIdstring
includeRemovedboolean

gads_list_ads

Ads in an ad group, with their responsive-search headlines and descriptions.

ParameterTypeDescription
adGroupId *string
customerIdstring

gads_list_conversion_actions

Conversion actions on the account, so a launch can name one instead of guessing an id.

ParameterTypeDescription
customerIdstring

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…

ParameterTypeDescription
adGroups *array
campaignName *string
dailyBudget *numberAmount in the ad account's currency, e.g. 150 for $150
finalUrl *stringLanding page for ads that do not override it
budgetNamestringDefaults to the campaign name
conversionActionNamesarrayConversion actions to set as this campaign's goals; falls back to the config default
cpcBidAmount in the ad account's currency, e.g. 150 for $150
customerIdstring10-digit customer id; falls back to config default
endDateTimestring
languagesarrayISO language codes
locationsarrayISO country codes (US, GB) or raw geoTargetConstant ids
negativeKeywordListIdstring
negativeKeywordsarray
startDateTimestring
validateOnlyboolean

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).

ParameterTypeDescription
campaignIdstring
customerIdstring
endDatestringYYYY-MM-DD
levelstring
periodstring
startDatestringYYYY-MM-DD

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.

ParameterTypeDescription
facet *stringshort 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.

ParameterTypeDescription
facet *stringshort 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.

ParameterTypeDescription
include *objectfacet short name -> entity URNs (ANDed across facets)
excludeobjectfacet 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.

ParameterTypeDescription
csvPath *stringPath to the CSV file on the server
name *string
accountIdstring
typestringForce 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.

ParameterTypeDescription
accountId *string
name *stringAudience/segment name
soql *stringSOQL selecting an email column, e.g. SELECT Email FROM Contact WHERE ...
emailFieldstringEmail 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.

ParameterTypeDescription
name *stringAudience/segment name
accountIdstringLinkedIn ad account id; defaults to config defaultAccountId
dryRunbooleanReturn counts and a masked sample without uploading anything
filtersarrayCRM search filters, all ANDed (HubSpot allows up to 6 per group). Pass this or listId, not both.
listIdstringHubSpot list id (the ILS list id). Pass this or filters, not both.
typestringcontact 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.

ParameterTypeDescription
accountIdstring

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.

ParameterTypeDescription
accountIdstring
groupIdstringScope campaigns to one campaign group id
includeArchivedboolean
levelstring

list_ads

List the creatives (ads) in a campaign (ad group), drafts included: id, name, status, and backing post urn.

ParameterTypeDescription
campaignId *string
accountIdstring

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).

ParameterTypeDescription
creativeId *string
accountIdstring

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.

ParameterTypeDescription
creativeId *stringNumeric creative (ad) id or a full urn:li:sponsoredCreative URN
status *stringPAUSED stops the ad serving. ACTIVE starts it serving and spending: set it only when the user explicitly asks. ARCHIVED retires it.
accountIdstringNumeric ad account id; defaults to the configured account
dryRunbooleanReturn the patch without sending it

get_audience_status

Check a DMP segment's matching status and resolved size.

ParameterTypeDescription
segmentId *string

create_campaign_group

Create a campaign group (the top-level 'campaign'). Defaults to DRAFT.

ParameterTypeDescription
accountId *stringNumeric ad account id (no urn prefix)
name *string
runScheduleobject
statusstring
totalBudgetobject

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.

ParameterTypeDescription
accountId *string
campaignGroupId *stringNumeric campaign group id
name *string
runSchedule *object
applyDefaultConversionboolean
applyDefaultExclusionsboolean
audienceSegmentUrnstringurn:li:adSegment:... to target a matched audience
conversionIdsarray
costTypestring
creativeSelectionstringAd rotation: OPTIMIZED (LinkedIn default, favors the predicted winner) or ROUND_ROBIN (rotate ads evenly)
dailyBudgetobject
geoUrnsarrayurn:li:geo:... locations to include
localeobject
objectiveTypestringCampaign 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.
optimizationTargetTypestringBidding strategy. MAX_CLICK = Maximum Delivery optimized for landing page clicks (automated bid, charged CPM, unitCost ignored). Omit or NONE for a manual bid.
politicalIntentstring
statusstring
targetingobject
targetingCriteriaobject
totalBudget
typestring
unitCostBid 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…

ParameterTypeDescription
accountId *string
campaignId *stringNumeric campaign (ad group) id to update
applyDefaultExclusionsboolean
audienceSegmentUrnstringurn:li:adSegment:... (or bare id) matched audience to target, which replaces existing targeting
costTypestringChange the cost type (CPM for Maximum Delivery)
creativeSelectionstringAd rotation: OPTIMIZED (favors the predicted winner) or ROUND_ROBIN (rotate ads evenly)
dailyBudgetobject
dryRunboolean
geoUrnsarrayurn:li:geo:... locations to include alongside the audience
namestring
optimizationTargetTypestringBidding strategy. MAX_CLICK = Maximum Delivery optimized for landing page clicks (automated bid, charged CPM, unitCost ignored). Omit or NONE for a manual bid.
runScheduleobject
statusstring
targetingobject
targetingCriteriaobject
totalBudget
unitCostBid amount

create_text_ad

Create a Text Ad creative (DRAFT by default).

ParameterTypeDescription
accountId *string
campaignId *string
clickUri *string
text *string
title *string
statusstring

create_image_ad

Create a single-image Sponsored Content creative (DRAFT). Omit imagePath to leave the campaign ready for an image later.

ParameterTypeDescription
accountId *string
campaignId *string
clickUri *string
commentary *stringThe post body / ad intro text
headline *string
organizationUrn *stringurn:li:organization:... that owns the post
callToActionstringCall-to-action button label
imagePathstring
namestringAd name shown in Campaign Manager
statusstring

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,…

ParameterTypeDescription
campaignId *stringNumeric campaign (ad group) id the ad goes in
postUrn *stringThe post's urn:li:ugcPost: or urn:li:share: URN, or a LinkedIn URL that contains one. urn:li:activity: URNs are refused.
accountIdstringNumeric ad account id; defaults to the configured account
namestringAd name shown in Campaign Manager
statusstringDRAFT 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'.

ParameterTypeDescription
accountIdstring
endDatestringYYYY-MM-DD
periodstring
startDatestringYYYY-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.

ParameterTypeDescription
accountIdstring
endDatestringYYYY-MM-DD
levelstringcampaign_group=campaign, campaign=ad group, creative=ad
parentIdstringParent group id (for level=campaign) or campaign id (for level=creative)
periodstring
startDatestringYYYY-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.

ParameterTypeDescription
entityId *stringNumeric id of the account/group/campaign/creative to trend
bucketstring
endDatestringYYYY-MM-DD
levelstring
periodstring
startDatestringYYYY-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.

ParameterTypeDescription
accountId *string
campaignGroupName *string
campaignName *string
dailyBudget *object
runSchedule *object
audienceobject
bid
conversionIdsarray
conversionNamestringe.g. 'Demo Booked - Insight Tag'
creativeSelectionstring
creativesarray
geoUrnsarrayDefaults to United States
targetingobject
typestring

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.

ParameterTypeDescription
entityId *stringNumeric id of the campaign group / campaign / creative
entityType *stringcampaignGroup (the 'campaign'), campaign (the 'ad group'), or creative (the 'ad')
afterstringNew value
atstringISO 8601 time the change took effect; defaults to now
beforestringPrior value, if known
fieldstringField that changed, e.g. dailyBudget, headline, status
labelstringHypothesis/label, e.g. 'outcome-led headline test'
namestringHuman name of the entity (for nicer listings)
notestringFreeform note (used when there is no specific field)
tagsarray

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.

ParameterTypeDescription
entityIdstring
entityTypestringcampaignGroup (the 'campaign'), campaign (the 'ad group'), or creative (the 'ad')
limitintegerMax rows (default 50)
tagstring

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.

ParameterTypeDescription
entityId *string
entityType *stringcampaignGroup (the 'campaign'), campaign (the 'ad group'), or creative (the 'ad')
windowDaysintegerDays 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.

ParameterTypeDescription
advertiserstringCompetitor/advertiser display name (accountOwner)
companyIdstringNumeric LinkedIn company id, more precise than name
concurrencynumberRemote worker concurrency is fixed at one.
copyMaxintegerCreative sample size, capped at 10. Worker budgets cannot be overridden.
countriesarrayISO-3166 country codes to scope, e.g. ['US','GB']
deepbooleanEnqueue up to 10 verified company ads on the remote worker; reuse cached creatives.
enginestringauto = official API plus remote creative worker; api = metadata only. Local scraping is disabled.
keywordstringFree-text keyword search across ad copy
maxintegerMax 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.

ParameterTypeDescription
ids *array