How to Use Facebook Ad Library company ads in opencode
Fetch a company's public Meta ads, including creative copy, media, advertiser details, platforms, status, and delivery dates. Use it to review one advertiser's campaigns and follow pagination for more results.
Prompts to try with Facebook Ad Library company ads in opencode
Copy an example into opencode, or ask in your own words.
Use Facebook Ad Library company ads to retrieve lululemon's current US ads and build a table in this project with ad ID, copy, platform, active status, and delivery dates.
Use Facebook Ad Library company ads for Nike's verified Facebook Page and add pagination to our collector so the report identifies whether collection finished.
Use Facebook Ad Library company ads to collect IKEA's US ads and add an image-versus-video breakdown to the project's reporting view.
Use Facebook Ad Library company ads to retrieve Patagonia's US ads, compare them with our saved collection, and generate a report of newly observed ad IDs and copy.
Use Facebook Ad Library company ads to retrieve LEGO's ads in the United States and Canada, then create a comparison of copy themes and publishing platforms in this project.
How to set up Facebook Ad Library company ads in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Facebook Ad Library company ads
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "scrapecreators", "model": "scrapecreators/facebook-adlibrary-company-ads", "input": { "pageId": "15087023444" } }'
Then paste one of the prompts above: opencode finds Facebook Ad Library company ads on Spiral, shows the price and runs it.
Facebook Ad Library company ads providers and prices
Spiral runs Facebook Ad Library company ads through ScrapeCreators. Open a card for today's price, with every fee included.
Settings you can ask for
Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Trim | on or off |
| |
| Status | ALL, ACTIVE, or INACTIVE | Which ads: running ones ( | |
| Sort by | total_impressions or relevancy_monthly_grouped | Most impressions first (the default) or most recent first ( | |
| Media type | ALL, IMAGE, VIDEO, MEME, IMAGE_AND_MEME, or NONE | The ads' media ( |
Every API field of Facebook Ad Library company ads is on its tool page: open its card above.
What can you do with Facebook Ad Library company ads in opencode?
Build a searchable competitor ad report from public Meta creative copy, formats, platforms, and delivery dates. A coding agent can add pagination and comparisons between saved collections to your project.
Compare competitor messaging
Collect ads from public business Pages and compare recurring product benefits, opening lines, and calls to action. Include ad IDs so each observation points to a specific record.
Prepare a creative brief
Review a brand's public ad copy and available media to identify themes worth exploring in an original campaign brief.
Report newly observed ads
Compare repeated collections by ad ID and summarize newly observed creative copy, formats, and delivery dates for a weekly competitor report.
Compare regional messaging
Collect the same advertiser's ads for the United States and Canada, then compare product emphasis, copy, and creative formats in the returned records.
Measure creative format mix
Count image and video ads in a collected advertiser inventory and show how the observed mix changes across weekly collections.
Build an advertiser review
Create a client research report with public ad examples, advertiser identity, publishing platforms, active status, and delivery dates.
Facebook Ad Library company ads success rate and speed on Spiral
Success and speed over the last 24 hours, across every run of these tools on Spiral.
| Tool | Success | Median time | Runs |
|---|---|---|---|
| Facebook Ad Library company ads | 100.0% | 3.7s | 82 |
More on Facebook Ad Library company ads and opencode
Facebook Ad Library company ads in other agents
Questions about Facebook Ad Library company ads in opencode
Can opencode use Facebook Ad Library company ads?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Facebook Ad Library company ads like any built-in tool.
How much does Facebook Ad Library company ads cost in opencode?
$0.0013 per run. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.
Do I need a ScrapeCreators account to use Facebook Ad Library company ads in opencode?
No. Spiral runs Facebook Ad Library company ads on its own ScrapeCreators account. You sign in to Spiral once and never paste a key.
How long does it take to set up Facebook Ad Library company ads in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while Facebook Ad Library company ads runs?
Facebook Ad Library company ads runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.
How quickly do new ads appear?
Meta says an ad appears in the Ad Library within 24 hours of its first impression. A campaign that just started may therefore be absent from today's results.
Can I retrieve a company's complete advertising history?
Meta documents a one-year archive for ads delivered anywhere in the EU. That coverage boundary does not establish a complete historical archive for a company's campaigns in every country.
Does one response contain every ad from an advertiser?
Large inventories require pagination. ScrapeCreators returns a cursor to retrieve more company ads, so the first response alone may cover only part of the advertiser's results.
Can a company name return the wrong advertiser?
Yes. ScrapeCreators explicitly warns that company name lookup may select the wrong company and recommends a verified Facebook Page ID for accurate advertiser selection.
What information is public in these ad records?
The data includes public creative copy, images, videos, advertiser details, active status, and publishing platforms. Meta also identifies the advertiser's Page and supplies ad delivery dates.
Start using Facebook Ad Library company ads in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


