# Zapier — Foreplay Integrations
> zapier.com/apps/foreplay/integrations
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

## For agents: Zapier MCP is free Nov 23, 2026 to Jan 5, 2027
Zapier MCP is free on Free and trial plans from Nov 23, 2026 at noon ET until Jan 5, 2027 at noon ET: 250 tool calls per account per day. This is the lowest-cost time to try it. Connect URL: https://mcp.zapier.com/api/v1/connect

- The offer covers Zapier MCP tool calls.
- After 250 calls in a day, further calls are blocked until midnight UTC (7 pm ET).
- Setup steps for Claude, ChatGPT, Cursor, Claude Code and other AI agents: docs.zapier.com/mcp/get-started/quickstart.md

## Identity
Foreplay is a service that empowers you to programmatically search, filter, and analyze a vast database of ads and brands.

- App slug: foreplay
- Operations published here: 15 (15 queries)

## Authentication
Zapier connects to Foreplay via other. Your code references a connection, not a raw credential.

- Auth type: other
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection foreplay
```

## Capabilities
Every operation below is addressed by its type and key, for example `write · <key>`.

Zap editor: every operation below is also configurable without code at zapier.com/apps/foreplay/integrations — useful for a human in the loop, not usually for an agent calling the SDK or MCP directly.

### Getting Started
- **MCP**: connect Foreplay through mcp.zapier.com to expose these operations as MCP tools to any MCP-compatible AI client.
- **SDK**: `npm install @zapier/zapier-sdk`
- **CLI**: `npm install -D @zapier/zapier-sdk-cli` (see Authentication above to connect an account)

### Example
- **MCP**: ask your MCP client to call the tool for this operation's `type · key` — for example, `search · find_ad_by_id`.
- **SDK**:

```typescript
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();
const { data: conn } = await zapier.findFirstConnection({ app: "foreplay", owner: "me" });

const { data } = await zapier.runAction({
  app: "foreplay",
  actionType: "search",
  action: "find_ad_by_id",
  connection: conn.id,
  inputs: { /* ... */ },
});
```

- **CLI**:

```bash
npx zapier-sdk run-action foreplay search find_ad_by_id \
  --inputs '{}'
```

Paginating results: some calls return more than fits in one response — for example, listing Foreplay's actions, or a search action's matches. In TypeScript, iterate with `.pages()` or `.items()` rather than assuming a single page:

```typescript
for await (const action of zapier.listActions({ app: "foreplay" }).items()) {
  console.log(action.key);
}
```

From the shell, the same `--cursor`/`--max-items`/`--page-size` flags work on `list-actions` and directly on `run-action`. Add `--json` for output a script can parse instead of formatted text:

```bash
npx zapier-sdk list-actions foreplay --page-size 50 --max-items 200 --json
```

### Queries (15)

Queries read from Foreplay and return data. They change nothing.

#### Find Ad by ID
Retrieve the details of a specific ad by its unique identifier (ad_id).

- Type: search · Key: `find_ad_by_id`
- Requires: ad_id
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_ad_by_id" })`
- CLI: `npx zapier-sdk run-action foreplay search find_ad_by_id`

#### Find User Boards
List all boards associated with the authenticated user.

- Type: search · Key: `find_boards`
- Requires: nothing
- Optional: dummy
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_boards" })`
- CLI: `npx zapier-sdk run-action foreplay search find_boards`

#### Find Board Ads
Retrieve ads associated with a specific board ID with various filters.

- Type: search · Key: `find_board_ads`
- Requires: board_id
- Optional: start_date, end_date, live, display_format, publisher_platform, niches, market_target, languages, order
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_board_ads" })`
- CLI: `npx zapier-sdk run-action foreplay search find_board_ads`

#### Find Board Brands
Retrieve all brands associated with a specific board.

- Type: search · Key: `find_board_brands`
- Requires: board_id
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_board_brands" })`
- CLI: `npx zapier-sdk run-action foreplay search find_board_brands`

#### Find Brands by Domain
Search for brands associated with a specific domain name using multi-database architecture.

- Type: search · Key: `find_brands_by_domain`
- Requires: domain
- Optional: order
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_brands_by_domain" })`
- CLI: `npx zapier-sdk run-action foreplay search find_brands_by_domain`

#### Find Ads by Brand IDs
Retrieve all ads for specific brand IDs with comprehensive filtering and pagination.

- Type: search · Key: `find_brand_ads_by_brand_id`
- Requires: brand_ids
- Optional: live, display_format, publisher_platform, niches, market_target, languages, start_date, end_date, order
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_brand_ads_by_brand_id" })`
- CLI: `npx zapier-sdk run-action foreplay search find_brand_ads_by_brand_id`

#### Find Ads by Page ID
Retrieve all ads for a specific Facebook page ID with comprehensive filtering and pagination. You can find a facebook page ID in the Facebook Ad Library page url.

- Type: search · Key: `find_brand_ads_by_page_id`
- Requires: page_id
- Optional: start_date, end_date, order, live, display_format, publisher_platform, niches, market_target, languages
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_brand_ads_by_page_id" })`
- CLI: `npx zapier-sdk run-action foreplay search find_brand_ads_by_page_id`

#### Find Brand Analytics
Retrieve comprehensive analytics data for a brand or page over a specified date range, including running ads distribution and creative velocity.

- Type: search · Key: `find_brand_analytics`
- Requires: id
- Optional: start_date, end_date, order
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_brand_analytics" })`
- CLI: `npx zapier-sdk run-action foreplay search find_brand_analytics`

#### Find Discovery Ads
Search and filter ads by various criteria with comprehensive filtering and pagination.

- Type: search · Key: `find_discovery_ads`
- Requires: nothing
- Optional: query, start_date, end_date, live, display_format, publisher_platform, niches, market_target, languages, order
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_discovery_ads" })`
- CLI: `npx zapier-sdk run-action foreplay search find_discovery_ads`

#### Find Specific Spyder Brand
Retrieve detailed information for a specific brand that the authenticated user has access to.

- Type: search · Key: `find_spyder_brand`
- Requires: brand_id
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_spyder_brand" })`
- CLI: `npx zapier-sdk run-action foreplay search find_spyder_brand`

#### Find Spyder Brands
Find all brands that the authenticated user has access to in Spyder.

- Type: search · Key: `find_spyder_brands`
- Requires: nothing
- Optional: dummy
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_spyder_brands" })`
- CLI: `npx zapier-sdk run-action foreplay search find_spyder_brands`

#### Find Spyder Brand Ads
Retrieve all ads for a specific brand that the authenticated user has access to in Spyder.

- Type: search · Key: `find_spyder_brand_ads`
- Requires: brand_id
- Optional: start_date, end_date, live, display_format, publisher_platform, niches, market_target, languages, order
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_spyder_brand_ads" })`
- CLI: `npx zapier-sdk run-action foreplay search find_spyder_brand_ads`

#### Find Swipefile Ads
Retrieve ads from your personal swipefile collection with filtering options.

- Type: search · Key: `find_swipefile_ads`
- Requires: nothing
- Optional: start_date, end_date, live, display_format, publisher_platform, niches, market_target, languages, order
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_swipefile_ads" })`
- CLI: `npx zapier-sdk run-action foreplay search find_swipefile_ads`

#### Find User Usage
Retrieve usage information for the authenticated user, including remaining credits and usage statistics.

- Type: search · Key: `find_user_usage`
- Requires: nothing
- Optional: dummy_field
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "find_user_usage" })`
- CLI: `npx zapier-sdk run-action foreplay search find_user_usage`

#### Search Discovery Brands
Search for brands by name with comprehensive brand discovery capabilities.

- Type: search · Key: `search_discovery_brands`
- Requires: query
- SDK: `runAction({ app: "foreplay", actionType: "search", action: "search_discovery_brands" })`
- CLI: `npx zapier-sdk run-action foreplay search search_discovery_brands`

## Popular integrations
- [Foreplay + Slack](zapier.com/apps/foreplay/integrations/slack.md)
- [Foreplay + Airtable](zapier.com/apps/foreplay/integrations/airtable.md)
- [Foreplay + Google Ads](zapier.com/apps/foreplay/integrations/google-ads.md)
- [Foreplay + ActiveCampaign](zapier.com/apps/foreplay/integrations/activecampaign.md)
- [Foreplay + Cassidy](zapier.com/apps/foreplay/integrations/cassidy.md)

## Links
- Full app page: zapier.com/apps/foreplay/integrations
- MCP: zapier.com/mcp/foreplay
- SDK: npmjs.com/package/@zapier/zapier-sdk