# Foreplay API on SandBase

> Foreplay data API endpoints available through one SandBase API key.

Source: https://www.sandbase.ai/apis/foreplay

- Endpoints: 4
- Call: `POST https://api.sandbase.ai/v1/api/{vendor}/{endpoint}` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body
- Billing: pay per call from one SandBase balance; no provider account or subscription needed

## Endpoints

- [Foreplay Ad Search](https://www.sandbase.ai/apis/foreplay/ad-search.md): From $0.0525 per call
  Search the Foreplay library of live and past social ads from Facebook, Instagram, TikTok, YouTube and more by keyword, format, platform, niche, language and run time, with creative, copy and landing p...
- [Foreplay Brand Ad Analytics](https://www.sandbase.ai/apis/foreplay/brand-analytics.md): From $0.1225 per call
  Get ad analytics for a brand by Foreplay brand ID: active and total ads, formats, platforms, launch cadence and longest-running creatives over a date range.
- [Foreplay Brand Ads](https://www.sandbase.ai/apis/foreplay/brand-ads.md): From $0.0525 per call
  List the social ads a brand has run by Foreplay brand ID, with creative, copy, platforms, run dates and landing page, filtered by format, platform and run time.
- [Foreplay Brands by Domain](https://www.sandbase.ai/apis/foreplay/brands-by-domain.md): From $0.0175 per call
  Find the advertiser brands Foreplay tracks for a website domain, with brand ID, name, logo and ad counts, to use in brand ad lookups.

## Use it through SandBase

- Base URL: `https://api.sandbase.ai/v1`, with `Authorization: Bearer $SANDBASE_API_KEY`.
- Language models use the OpenAI-compatible `POST /v1/chat/completions`; media models use `POST /v1/run`; data APIs use `POST /v1/api/{vendor}/{endpoint}`.
- AI agents can connect through the SandBase MCP server or CLI: https://www.sandbase.ai/skill.md
- Every model and API page has a Markdown twin at the same URL plus `.md`. Full index: https://www.sandbase.ai/llms.txt
