adlibrary.com Logoadlibrary.com
Share
Guides & Tutorials,  Platforms & Tools

Automated Ad Swipe File in Airtable: Ads That File Themselves

Wire an ad API into Airtable and your swipe file fills, tags, and scores itself. Curation becomes a 30-minute weekly review instead of data entry.

Automated ad swipe file pipeline: laptop with spreadsheet grid receiving data streams from social platforms

Every creative strategist owns a swipe file. Almost nobody's is current. The screenshots stop in March, the "great hooks" folder hasn't been opened since the last brief, and the Notion gallery holds 40 untagged entries nobody can search. An automated ad swipe file fixes the actual failure point. Not your discipline. The data entry.

TL;DR: Manual swipe files die because saving an ad costs 4 minutes and the payoff is months away. Wire the AdLibrary API into Airtable with a nightly script and ads arrive pre-filled: creative, copy, runtime, estimated spend, platform, and an AI teardown. Your job shrinks to a 30-minute weekly review where you keep, tag, or archive. This guide gives you the four-table base schema, the ingestion script, auto-tagging via enrichment, and the export path to briefs.

This is a build guide. By the end you will have an Airtable base that fills itself from eleven ad platforms, a Python script you can run on a schedule, and a weekly ritual that replaces hours of screenshotting. If you want the manual-first version of this workflow, read building a competitor swipe file as a creative strategist first. This post is what you graduate to.

Why manual swipe files quietly die

A swipe file has one job: when you need a hook for a brief, it hands you ten proven ones in your niche. That job requires two things working at once. The file must be current, and it must be searchable.

Manual maintenance kills both. Saving one ad by hand means screenshotting the creative, copying the text, noting the brand, guessing the format, and filing it somewhere. Four minutes if you're fast. Do that for 15 ads a week across six competitors and you've spent an hour on data entry before any actual thinking happens.

So you skip a week. Then three. The file ages, trust in it drops, and you stop opening it. The asset that was supposed to compound becomes a graveyard. Tools like Foreplay and SwipeKit soften this with browser extensions (our Foreplay vs SwipeKit vs MagicBrief comparison covers that category), but an extension still requires you to find the ad first. You are still the crawler.

The fix is structural. A swipe file you have to maintain is a swipe file you'll abandon. A swipe file that maintains itself only asks you to judge, and judging is the part you're good at.

The automated ad swipe file architecture: ads in, tags on, you review

The automated ad swipe file has three moving parts, and only the last one involves you.

Ingestion. A script calls an ad library API on a schedule, pulls new ads from your tracked brands and keywords, and writes them into Airtable. Meta's free Ad Library API can seed this for one platform, with real constraints we'll get to. The AdLibrary API covers Facebook, Instagram, TikTok, YouTube, Google, LinkedIn, Twitter, Pinterest and more from a single key, which is what makes the multi-platform version of this practical.

Enrichment. For ads worth a closer look, a second call returns an AI teardown: scene-by-scene transcript, the hook mechanism, offer structure, and awareness stage. That text becomes your auto-tags, so filtering by creative angle doesn't depend on you typing anything.

Review. Once a week you open a "Needs Review" view, spend 30 minutes keeping or archiving, and adjust feeds. Curation becomes review, not data entry. That inversion is the entire point.

One framing note before the build. Meta's Ad Library API is free and the original transparency tool — for political and social-issue ads globally, and all ad types in the EU and UK. It's fine for one platform. The moment you want TikTok, YouTube, or LinkedIn ads in the same table, with engagement and spend signals attached, you need a paid layer on top. That's the gap this build fills, and it's the same gap covered in our Meta ad library scraping tools roundup if you want to survey alternatives first.

Design the Airtable base: four tables, not one

Most swipe files fail at schema before they fail at discipline. One flat table of screenshots can't answer "show me every UGC hook our competitors ran longer than 60 days." Four linked tables can. Create a base with these.

Table 1: Ads — the spine. One record per creative.

FieldTypeSource
Ad KeySingle line text (primary)ad_key from the API, e.g. meta_123456
BrandLink to Brandsadvertiser_name
PlatformSingle selectplatform
Ad TextLong textmessage
CreativeAttachmentpreview_img_url / video_url
FormatLink to Formatsads_type (1 image, 2 video, 3 carousel, 4 collection)
First Seen / Last SeenDateUnix timestamps, converted
Runtime DaysFormulaDATETIME_DIFF(LastSeen, FirstSeen, 'days')
Likes / Shares / CommentsNumberengagement counts
Impressions BandSingle line textbucketed range, never an exact count
Est. SpendCurrencyestimated, label it that way
HooksLink to Hooksfrom enrichment
AI SummaryLong textenrichment output
StatusSingle selectNew / Reviewed / Keeper / Archived

Table 2: Brands — one record per tracked advertiser. Name, domain, platform IDs (Meta page ID, Google advertiser ID, LinkedIn company ID), a "Priority" select, and a rollup counting active ads. This table doubles as your monitoring config, the same brand-tracking pattern from how to monitor competitor ads.

Table 3: Hooks — the taxonomy that makes the file useful. One record per hook mechanism: "problem callout," "pattern interrupt," "founder story," "us-vs-them," "negative hook," "demo-first." Link ads to hooks and every record becomes a worked example of a persuasion pattern instead of a random screenshot.

Table 4: Formats — UGC talking head, static product, carousel testimonial, comparison table, cinematic. Coarser than Hooks, used mainly for brief assembly when a media buyer asks for "three UGC references."

Two schema rules learned the hard way. First, make Ad Key the primary field and never the brand name, because upserts depend on a stable unique key. Second, store the impressions band as text, not a number. Meta reports impressions as ranges like 10k–15k, and forcing a range into a number field invents precision the data doesn't have.

Airtable's free plan caps bases at 1,000 records, which a healthy automated ad swipe file will hit in a couple of months. Plan for Team tier or add an auto-archive step that deletes ads marked Archived after 90 days.

Pick the feeds: brands first, keywords second

An automated pipeline with bad inputs just automates noise. Decide what feeds the file before writing any code.

Brand feeds track named competitors. Resolve each brand once — this call is free on the AdLibrary API and returns the platform IDs your Brands table needs:

bash
curl -G "https://adlibrary.com/api/advertisers/search" \
  -H "Authorization: Bearer $ADLIBRARY_API_KEY" \
  --data-urlencode "q=gymshark" \
  --data-urlencode "country=US"

The response includes a best_match with the Meta page ID, Google advertiser ID, and LinkedIn company ID when at least two platforms agree it's the same advertiser. Save those into Airtable. Then register each brand as a saved advertiser with POST /api/advertisers (also free), so one curate call later fans out across Meta, Google, and LinkedIn at once and merges the results, deduped.

Keyword feeds catch the market you don't know yet — the brands outside your tracking list running "cold plunge tub" or "B2B onboarding software" ads. Keyword searches sweep wider and pull in ad creative from advertisers you've never heard of, which is where the genuinely fresh angles tend to come from.

Start with five brands and two keywords. Each ingestion run against that set costs single-digit credits, and you can widen once the review ritual proves the file is earning its keep. For sizing context, the search response includes a total count, so you can see how deep a keyword goes before paginating into it. This step-zero discipline of resolving and scoping before you spend is the same pattern that anchors the creative strategist research workflow.

The ingestion script: API to Airtable in one cron job

Here's the core of the build: a Python script that searches for fresh ads and upserts them into Airtable. It uses only documented parameters on both sides — the AdLibrary API docs and Airtable's Web API.

python
import os, time, requests

ADL_KEY = os.environ["ADLIBRARY_API_KEY"]      # adl_... (Business plan)
AT_TOKEN = os.environ["AIRTABLE_TOKEN"]        # Airtable personal access token
BASE_ID = "appXXXXXXXXXXXXXX"
ADS_TABLE = "Ads"

KEYWORDS = ["cold plunge tub", "recovery supplement"]

def search_ads(keyword):
    """One credit per page. Long-running video ads from the last 90 days."""
    r = requests.post(
        "https://adlibrary.com/api/search",
        headers={"Authorization": f"Bearer {ADL_KEY}"},
        json={
            "keyword": keyword,
            "platform": ["facebook", "instagram", "tiktok"],
            "adsType": ["2"],            # video
            "daysBack": 90,
            "sortField": "-days",        # longest-running first
            "duplicateRemoval": 1,
        },
        timeout=60,
    )
    r.raise_for_status()
    data = r.json()
    print(f"{keyword}: {data['total']} matches, "
          f"{data['_credits']['remaining']} credits left")
    return data["results"]

def to_airtable_fields(ad):
    return {
        "Ad Key": ad["ad_key"],
        "Brand Name": ad.get("advertiser_name", ""),
        "Platform": ad.get("platform", ""),
        "Ad Text": ad.get("message", ""),
        "Likes": ad.get("like_count", 0),
        "Shares": ad.get("share_count", 0),
        "Comments": ad.get("comment_count", 0),
        "First Seen": time.strftime(
            "%Y-%m-%d", time.gmtime(ad["first_seen"])),
        "Last Seen": time.strftime(
            "%Y-%m-%d", time.gmtime(ad["last_seen"])),
        "Creative": [{"url": ad["preview_img_url"]}]
                    if ad.get("preview_img_url") else [],
        "Status": "New",
    }

def upsert(records):
    """Airtable upsert keyed on Ad Key. Max 10 records per request."""
    url = f"https://api.airtable.com/v0/{BASE_ID}/{ADS_TABLE}"
    for i in range(0, len(records), 10):
        chunk = records[i:i + 10]
        requests.patch(
            url,
            headers={"Authorization": f"Bearer {AT_TOKEN}"},
            json={
                "performUpsert": {"fieldsToMergeOn": ["Ad Key"]},
                "records": [{"fields": f} for f in chunk],
            },
            timeout=30,
        ).raise_for_status()
        time.sleep(0.25)   # respect Airtable's 5 req/s per base

for kw in KEYWORDS:
    ads = search_ads(kw)
    upsert([to_airtable_fields(a) for a in ads])
    time.sleep(7)          # adlibrary search: stay under 10 req/min

Walk through the load-bearing choices. sortField: "-days" puts the longest-running creatives first, because runtime is the most honest performance signal in any ad library — advertisers kill losers in week one and keep paying for winners. duplicateRemoval collapses near-identical variants so one concept doesn't flood the table eight times. The upsert keyed on Ad Key means re-running the script refreshes Last Seen on ads you already hold instead of duplicating them, which is exactly how the file stays current without growing garbage.

For brand feeds, swap search_ads for a curate call: POST /api/advertisers/{id}/curate pulls every tracked platform for a saved advertiser in one request. It costs 1 credit per 30-minute session, and paginating with the returned cursors inside that window is free.

Schedule it nightly with cron, GitHub Actions, or an n8n workflow if you'd rather stay visual. Zapier and Make.com recipes work for the same trigger-and-write pattern with less control over dedup logic. And if you want an agent to own the whole pipeline end to end, the Claude Code + adlibrary API workflows post shows that wiring, or you can build your own MCP server in about 60 lines.

Automated ad swipe file alert routing: database table connected to notification panel for competitor ad monitoring

Auto-tagging with enrichment data

Raw ads in a table beat screenshots in a folder, but the searchability problem is only half solved. "Show me problem-callout hooks in UGC format" needs tags, and manual tagging is the same data-entry trap wearing a different hat.

Enrichment closes the gap. One call per ad returns the full teardown:

python
def enrich(ad):
    r = requests.post(
        "https://adlibrary.com/api/enrichment",
        headers={"Authorization": f"Bearer {ADL_KEY}"},
        json={"ad": {
            "ad_key": ad["ad_key"],
            "platform": ad["platform"],
            "message": ad.get("message", ""),
            "video_url": ad.get("video_url", ""),
        }},
        timeout=120,
    )
    r.raise_for_status()
    return r.json()   # enrichment.analysis / .summary / .transcription

The response carries three blocks. transcription is a timestamped scene-by-scene transcript of everything spoken and shown. analysis is the strategic read: the hook and why it stops the scroll, offer architecture, proof stack, awareness stage, target persona. summary is the short version for an Airtable long-text field.

Auto-tagging means mapping that text onto your Hooks and Formats tables. The cheap way is a keyword pass over the analysis — if it names a "founder story" or "pattern interrupt," link the matching Hooks record. The better way is one small LLM call that reads the analysis and emits your exact taxonomy as JSON, then writes the links. Either way, no human types a tag.

Don't enrich everything. Enrichment costs 1 credit for text and short video (up to 180 seconds), more for longer video, so a 60-ad nightly pull would burn credits on duds. Gate it: enrich only ads that cross a threshold, say runtime over 30 days or shares above 100. The engagement and runtime fields are already in your table, so the gate is one Airtable view or one if statement. Ads you've already unlocked return free on repeat calls, which makes re-runs safe.

This is the same scoring logic behind the AI Ad Enrichment feature in the app — the API version just lands in your base instead of a browser tab. For brands where you want the shortlist computed for you, a winners scan (POST /api/winners/advertiser/{pageId}, flat 10 credits) scores an advertiser's whole portfolio and returns only the creatives with evidence behind them, ready to file as pre-validated keepers. That pairs well with the reverse-engineering playbook when a single competitor matters more than the field.

Views per creative angle

Tables hold the data. Views are where a swipe file becomes a working tool, because each view answers one recurring question without anyone re-filtering.

Build these six first:

  • Needs Review: Status is "New," grouped by Brand, sorted by Runtime Days descending. Your Monday morning queue.
  • Proven Hooks: Status "Keeper," grouped by linked Hook, gallery view with the Creative attachment as the card image. This is the view you open during brief writing.
  • Long Runners: Runtime Days over 45, any status. Runtime is your strongest signal, so give it a dedicated lens.
  • By Format: gallery grouped by Format, for the "find me three carousel references" requests.
  • Competitor Heat: filtered to Priority brands, sorted by Last Seen, so you notice within a day when a tracked brand ships a new concept.
  • Fatigue Watch: Keepers whose Last Seen stopped advancing. When a long-runner dies, the brand either hit creative fatigue or found something better. Both are signals worth a note.

Gallery views matter more than they sound. A swipe file you can see is a swipe file you browse for inspiration, and browsing is where unexpected angle collisions happen. Interface Designer can wrap the same data in a cleaner review screen if non-Airtable people need access.

One Airtable-native trick worth the five minutes: add a formula field that buckets Runtime Days into "Testing (under 14)," "Promising (14–45)," and "Proven (45+)." Single-select-style buckets group cleanly in every view and read faster than raw numbers during review.

The weekly review ritual

Automation gets ads into the base. The ritual is what turns the base into judgment you can reuse. Thirty minutes, same time every week, three passes.

Pass 1: triage (10 min). Open Needs Review. For each ad: Keeper, Archive, or Watch. Keepers get a one-line note on why — "negative hook on a positive category, rare," "price anchor in the first frame." The note is the asset. Future-you searches notes, not thumbnails.

Pass 2: pattern check (10 min). Open Competitor Heat and Fatigue Watch. What did tracked brands launch this week? What died? Three or more brands moving toward the same angle in the same month is a market signal, the kind of pattern recognition that manual swipe files are too stale to surface.

Pass 3: feed tuning (10 min). Is a keyword pulling junk? Tighten it or add an exclude term. Did a new competitor show up twice in keyword results? Resolve and promote them to a brand feed. The pipeline improves a notch every week because the reviewer and the pipeline owner are the same person.

Strategists who run this loop consistently report the strange part is psychological: the file stops feeling like homework and starts feeling like opening a feed someone curated for you. Which is accurate. Past-you curated it, and a script did the typing. The deeper discipline behind the ritual (keep, tag, extract the principle, never copy the execution) is covered in our swipe file guide, and it transfers to this setup unchanged.

From swipe file to creative brief

A swipe file earns its budget the day a brief cites it. Three export paths, in ascending order of automation.

Manual pull. Open Proven Hooks, filter to the relevant Hook and Format, and drop three reference records into the brief. The AI Summary field means each reference arrives with its teardown attached, so the creative brief explains why each reference works instead of pasting naked links.

Templated export. An Airtable automation watches a "Add to Brief" checkbox, then sends checked records to a Google Doc or Notion template via webhook. Strategist checks five boxes, a structured reference section appears in the working doc. Fifteen minutes to build.

Generated briefs. Pipe the enrichment analysis for two or three keepers into an LLM with your product context and brief template. Because the enrichment already contains hook mechanics and offer structure down to a scene-level transcript, the model is assembling rather than inventing, so the failure mode of AI-written briefs mostly disappears when the inputs are teardowns instead of vibes. This is the workflow the creative strategist toolstack post treats as the 2026 baseline, and it's the natural endpoint of the creative inspiration and swipe file use case.

Close the loop with results. When a brief built from swipe-file references ships, link the resulting ad back into the base with its own performance notes. Check your concepts against a CTR calculator baseline for the format, and pressure-test spend assumptions with the ad spend estimator before promising a media buyer the moon. A swipe file that records what you shipped, next to what the market shipped, compounds twice as fast.

What an automated ad swipe file costs to run

Worth being precise here, because "automated" sometimes hides a scary invoice. It doesn't here.

The Airtable side: free tier works for a pilot, Team tier once you pass 1,000 records. The script runs anywhere a cron job runs.

The data side runs on AdLibrary API credits. Searches cost 1 credit per page. A curate session for a saved brand costs 1 credit per 30-minute window, with free cursor pagination inside it. Enrichment is 1 credit for text and video up to 180 seconds. A realistic nightly setup (six tracked brands curated, two keyword searches, ten gated enrichments a week) lands around 250 to 300 credits a month.

That maps to the Business plan at €329/month with 1,000+ credits, which is the tier that includes API access in the first place. API keys are created in the dashboard, take the adl_ format, and there's no app review or business verification step between you and the first request — the trade-off Meta's free Ad Library tooling can't make. For one-platform spot checks, Google's Ads Transparency Center and LinkedIn's ad library (API access documented on Microsoft Learn) remain free and fine. The automated ad swipe file case is different: it needs every platform in one schema, on a schedule, with performance signals attached, and that's precisely the API access pitch. Compare tiers on the pricing page: if you're building this, Business is the one that fits.

Against the alternative, a strategist spending three to four hours weekly on manual collection, the math resolves fast. You're not buying ad data. You're buying back the review time, and the angles that die unfound when collection eats the calendar.

Frequently Asked Questions

Can I build an automated ad swipe file with only Meta's free Ad Library API? Partially. Meta's free API returns political and social-issue ads globally, and all ad types only for the EU and UK with limited copy fields and no commercial performance signals. If you're EU-based and only need Meta, it can seed a basic pipeline. For US commercial ads, multi-platform coverage, or spend and engagement signals, you need a paid ad intelligence API layered on top.

How many credits does a nightly swipe file pipeline actually use? A typical setup (six saved brands curated nightly, two keyword searches, enrichment gated to roughly ten high-signal ads a week) runs around 250 to 300 credits per month. Searches cost 1 credit per page, curate sessions 1 credit per 30 minutes, and enrichment 1 credit for text or video up to 180 seconds.

Why Airtable instead of Notion or Google Sheets for a swipe file? Linked records and views. Hooks and Formats as linked tables turn every tag into a browsable collection, and gallery views make creative reviewable at a glance. Sheets flattens everything to rows, and Notion's API has no native upsert, which makes dedup-on-rerun harder. Airtable's upsert keyed on a unique Ad Key makes nightly re-runs idempotent.

How do I stop the swipe file filling up with junk ads? Three gates. Use duplicateRemoval and a sortField like -days in the search so long-running creatives surface first. Gate enrichment behind a runtime or engagement threshold so credits go to proven ads. And tune feeds weekly — kill keywords that pull noise, promote recurring advertisers to tracked brands.

What's the difference between this and tools like Foreplay or SwipeKit? Extension-based tools save ads you find while browsing, so discovery still depends on you. An API-driven swipe file discovers on schedule across eleven platforms and arrives pre-tagged with runtime and engagement data plus an AI teardown. The trade is setup effort: an afternoon of building versus installing an extension. Teams briefing weekly usually find the afternoon pays for itself in the first month.

Ads that file themselves

The swipe files that actually shape briefs share one property: someone looks at them every week. Nobody sustains that when looking requires four hours of collection first. Move the collection to a script and the look becomes the whole job — 30 minutes of judgment on pre-filled, pre-tagged, pre-scored ads.

Build the base this afternoon. Four tables, six views, one script, one cron entry. Resolve five competitors, add two keywords, and let the first nightly run land. By Friday you'll have an automated ad swipe file with more current, better-tagged ads than the folder you've been guilt-maintaining all year, and your Monday review will be the easiest recurring meeting on the calendar. The strategists who win the next creative cycle aren't the ones with the biggest archives. They're the ones whose archives are awake.

Related Articles