Foreplay integration
Foreplay is a competitive advertising intelligence platform with a searchable library of ads and brands. An agent can search ads by text and filters, find brands by name, website domain or ad style, read the ads of any brand or Facebook page (copy, media URLs, transcription, niches, emotional drivers), find creatives reused across ads, read daily brand analytics, list your boards, swipe file and Spyder watchlist with each tracked page's ranked top ads and related pages, read Lens reports, and check the credit balance. Reads spend credits: 1 per ad returned on ad lists and 1 per call on brand, board and analytics reads; get_usage is free, and features your plan does not include answer 403. The nested folder view of boards is not exposed. Authentication is a Foreplay API key from the API dashboard (app.foreplay.co, API overview), sent as the raw value of the Authorization header.
Say what should happen.
The workflow builds itself.
What you can do with Foreplay
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Ad, 9 operations
get_adGet adGETReturns one ad: copy, media URLs, transcription, brand id, platforms, niches and foreplay_url. Costs 1 credit. The reference says it takes the Foreplay id (the id field); on a 404, retry with the ad's ad_id value or use get_ad_by_ad_id.get_ad_by_ad_idGet ad by ad idGETReturns one ad by its public ad id (the ad_id field): copy, media URLs, transcription, brand id, platforms, niches and foreplay_url. Costs 1 credit. On a 404, retry with the ad's id value or use get_ad.list_ad_duplicatesList ad duplicatesGETLists every ad in the Foreplay library that uses the same image or video as the given ad (the same creative reused across placements or brands). Costs 1 credit per ad returned; there is no limit parameter.list_ads_by_brand_idsList ads by brand idsGETLists the ads of one or more brands by Foreplay brand id (from search_brands or find_brands_by_domain), with optional filters. Costs 1 credit per ad returned (limit up to 250); page with metadata.cursor.list_ads_by_page_idList ads by page idGETLists the ads of a Facebook page by its numeric page id, with optional filters. Costs 1 credit per ad returned (limit up to 250); page with metadata.cursor. If empty, retry once with collect=true.list_board_adsList board adsGETLists the ads saved on one of your boards (board_id from list_boards), with optional filters. Costs 1 credit per ad returned (limit up to 250); pass metadata.cursor back as cursor for the next page.list_spyder_brand_adsList spyder brand adsGETLists the ads of one brand on your Spyder watchlist (brand_id from list_spyder_brands), with optional filters. Costs 1 credit per ad returned (limit up to 250); pass metadata.cursor back as cursor for the next page.list_swipefile_adsList swipefile adsGETLists the ads saved in your Foreplay swipe file (most recently saved first by default), with optional filters. Costs 1 credit per ad returned; page with offset and limit (up to 250).search_adsSearch adsGETSearches the whole Foreplay ad library by text and filters (no need to track the brand). Costs 1 credit per ad returned (limit up to 250); pass metadata.cursor back as cursor for the next page.
Brand, 4 operations
discover_brands_by_adsDiscover brands by adsGETFinds brands by what their ads look like (format, platform, niche, language, market, video length, dates). Returns brand objects; costs 1 credit per call whatever the count.find_brands_by_domainFind brands by domainGETFinds brands that advertise from a website domain, tracked or not. Matches are candidates, not guaranteed to belong to the domain. Up to 10 brands; costs 1 credit per call.list_board_brandsList board brandsGETLists the brands saved on one of your boards (board_id from list_boards): name, website, niches, avatar and ad counts. Up to 10 per call, page with offset. Costs 1 credit per call.search_brandsSearch brandsGETSearches Foreplay's brand index by name and returns brands with their ids, Facebook page id and ad counts, to feed list_ads_by_brand_ids. Up to 100 per call; costs 1 credit per call.
Spyder brand, 2 operations
get_spyder_brandGet spyder brandGETReturns one brand from your Spyder watchlist by its Foreplay brand id (from list_spyder_brands): name, description, category, niches, websites, avatar and ad library id. Costs 1 credit.list_spyder_brandsList spyder brandsGETLists the brands you track in Foreplay Spyder (your watchlist), up to 10 per call with offset paging. Costs 1 credit per call. Use a brand id with list_spyder_brand_ads or get_spyder_brand.
Spyder ranking, 2 operations
get_spyder_page_top_overviewGet spyder page top overviewGETReturns the top-ranked ads of a Facebook page on your Spyder watchlist on a date, each with its rank and previous_rank compareDaysAgo days earlier. Costs 1 credit. Answers 403 if the page is not tracked.list_spyder_page_rankingsList spyder page rankingsGETLists ranked ads of a Facebook page on your Spyder watchlist: all, breakout (fast risers) or evergreen, with bucket counts, offset paging and up to 100 per page. Costs 1 credit per call. 403 if the page is not tracked.
Board, 1 operation
list_boardsList boardsGETLists your Foreplay boards (or your team's) with id, name, description and created_at. Returns every board unless limit is set. Costs 1 credit per call. Use a board id with list_board_ads.
Brand analytics, 1 operation
get_brand_analyticsGet brand analyticsGETReturns daily analytics rows for a brand or Facebook page: active and inactive ad counts and active ads per format (video, image, carousel and more). Costs 1 credit per call.
Lens report, 1 operation
get_lens_reportGet lens reportGETReturns reporting rows of one of your Foreplay Lens reports (lens_id) for a date range, broken down by breakdown_type, up to 10 rows per page. Costs 1 credit per call.
Spyder partner, 1 operation
list_spyder_page_partnersList spyder page partnersGETLists pages and brands often seen alongside a Facebook page on your Spyder watchlist (lookalikes, competitors), with like, ad and live ad counts. Costs 1 credit. Answers 403 if the page is not tracked.
Usage, 1 operation
get_usageGet usageGETReturns your Foreplay API credit balance: remaining and total credits, the billing cycle start and end, and the account's user id and email. Free: costs no credits.
Use Foreplay from Claude Code, Cursor or Codex
Connect Foreplay in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Foreplay operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect Foreplay
- Create your workspace
Sign up free. Nothing to install.
- Connect Foreplay once
Add your Foreplay connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
Foreplay integration FAQ
What can you do with the Foreplay integration?
LiveContext exposes 22 operations on Foreplay, covering ad, brand, spyder brand and spyder ranking.
