Foreplay API icon

Foreplay API

Interact with the Foreplay API

Overview

This node integrates with the Foreplay API to retrieve advertising data, specifically allowing users to get ads associated with a particular board ID. It is useful for marketers, analysts, or developers who want to programmatically access ad information filtered by various criteria such as date range, live status, display format, publisher platform, niches, market target, and languages.

A practical example would be fetching all active ads from a specific board within a certain date range to analyze campaign performance or gather competitive intelligence.

Properties

Name Meaning
Board ID The unique identifier of the board to search ads for (required).
Start Date Filter ads starting from this date (inclusive). Format: YYYY-MM-DD or with time (e.g., YYYY-MM-DD HH:MM:SS).
End Date Filter ads up to this date (inclusive). Same format as Start Date.
Live Status Filter ads by their live status: All, Live (Active), or Not Live.
Display Format Filter ads by one or more display formats: Carousel, DCO, DPA, Event, Image, Multi Images, Multi Medias, Multi Videos, Page Like, Text, Video.
Publisher Platform Filter ads by one or more platforms where they were published: Audience Network, Facebook, Instagram, LinkedIn, Messenger, Threads, TikTok, YouTube.
Niches Filter ads by one or more niches/categories such as Accessories, App/Software, Beauty, Business/Professional, Education, Entertainment, Fashion, Food/Drink, Health/Wellness, Home/Garden, Jewelry/Watches, Other, Parenting, Pets, Real Estate, Service Business.
Market Target Filter ads targeting B2B or B2C markets.
Languages Filter ads by language(s) including Dutch/Flemish, English, French, German, Italian, Japanese, Latvian, Lithuanian, Polish, Portuguese, Romanian/Moldavian/Moldovan, Serbian, Slovene, Spanish/Castilian, Swedish.
Cursor Cursor string used for pagination to fetch subsequent pages of results.
Limit Maximum number of results to return (minimum 1, default 5).
Order Order in which results are returned: Newest, Oldest, Longest Running, Most Relevant.

Output

The node outputs an array of JSON objects under the json field. Each object contains the response from the Foreplay API corresponding to the requested operation. For the "Get Ads by Board ID" operation, the output includes detailed ad data matching the specified filters.

If the API supports binary data (not explicitly shown here), it would typically represent media assets related to ads, but this node primarily returns JSON-formatted ad metadata.

Dependencies

  • Requires an API key credential for authenticating with the Foreplay API.
  • The base URL for the API must be configured in the credentials.
  • Uses HTTP requests with authentication handled internally by n8n's helper methods.

Troubleshooting

  • Invalid operation error: Occurs if the specified operation does not exist in the predefined endpoints. Ensure the operation name is correct and supported.
  • Authentication errors: If the API key or base URL is incorrect or missing, requests will fail. Verify credentials configuration.
  • Empty or no results: Check that the Board ID is valid and that filters like date range and live status are set correctly.
  • Pagination issues: When using the cursor property, ensure the cursor value is valid and corresponds to the previous page's response.
  • Rate limiting or API errors: Handle API limits by adjusting request frequency or limit parameter.

Links and References

Discussion