Actions13
Overview
This node integrates with the Foreplay API to retrieve advertising data from a library of ads. Specifically, the "Get Library Ads" operation allows users to query and filter ads based on various criteria such as date range, live status, display format, publisher platform, niches, market target, languages, pagination cursor, result limit, and ordering.
Typical use cases include:
- Marketing analysts extracting ad creatives and metadata for competitive analysis.
- Social media managers monitoring active or historical ads across multiple platforms.
- Data scientists collecting structured ad data for trend analysis or machine learning models.
For example, a user could fetch all live video ads published on Facebook and Instagram within a specific date range to analyze recent campaign strategies.
Properties
| Name | Meaning |
|---|---|
| Start Date | The start date (inclusive) to filter ads by their creation or activity date. Accepts formats like YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS, or YYYY-MM-DD HH:MM:SS. |
| End Date | The end date (inclusive) to filter ads by their creation or activity date. Same accepted formats as Start Date. |
| Live Status | Filter ads by their live status. Options: All (no filter), Live (Active), Not Live. |
| Display Format | Filter ads by one or more display formats. Options include Carousel, DCO, DPA, Event, Image, Multi Images, Multi Medias, Multi Videos, Page Like, Text, Video. |
| Publisher Platform | Filter ads by one or more publisher platforms. Options include Audience Network, Facebook, Instagram, LinkedIn, Messenger, Threads, TikTok, YouTube. |
| Niches | Filter ads by one or more niches/categories. Options include 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 by market target. Options: B2B, B2C. |
| Languages | Filter ads by one or more languages. Options include Dutch/Flemish, English, French, German, Italian, Japanese, Latvian, Lithuanian, Polish, Portuguese, Romanian/Moldavian/Moldovan, Serbian, Slovene, Spanish/Castilian, Swedish. |
| Cursor | A string cursor used for pagination to fetch subsequent pages of results. |
| Limit | Maximum number of results to return. Minimum value is 1. Default is 5. |
| Order | Order in which results are returned. Options: Newest, Oldest, Longest Running, Most Relevant. |
Output
The node outputs an array of JSON objects under the json field. Each object contains a response property holding the raw response data from the Foreplay API for the requested ads. This typically includes detailed information about each ad matching the filters, such as creative content, metadata, targeting info, and status.
No binary data output is indicated by the source code.
Dependencies
- Requires an API key credential for authenticating with the Foreplay API.
- The base URL for the API must be configured in the node credentials.
- Uses HTTP requests with authentication handled internally by n8n's helper methods.
Troubleshooting
- Invalid operation error: If the specified operation is not recognized, the node throws an "Invalid operation" error. Ensure the operation name matches one of the supported operations.
- API request failures: Network issues, invalid credentials, or incorrect parameters may cause HTTP errors. Verify API key validity, endpoint URL, and parameter correctness.
- Empty results: If filters are too restrictive (e.g., date range, niches, languages), no ads may be returned. Try broadening filters or removing some constraints.
- Pagination issues: When using the cursor for pagination, ensure the cursor value is correctly passed from previous responses to fetch subsequent pages.
Links and References
- Foreplay API Documentation (hypothetical link, replace with actual if available)
- n8n HTTP Request Node documentation: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/
- n8n Credentials Management: https://docs.n8n.io/nodes/credentials/