Quickstart
Base URL
https://api.tryatria.com
All endpoints live under /open/v1/.
Get your API key
- In the Atria web app, click the avatar in the top-left corner.
- Go to Settings & members → API Keys.
- Click Create API key and copy it immediately — the full key (prefix
atria-sk_) is shown only once.
Pass it on every request in the X-API-Key header. Full auth details and error shapes are in API Basics.
Call the API
List the latest active ads on Facebook:
curl -sS \
-H "X-API-Key: $ATRIA_API_KEY" \
"https://api.tryatria.com/open/v1/ad-library/search?platform=facebook&status=active&order=newest&page_size=10"import os
import requests
resp = requests.get(
"https://api.tryatria.com/open/v1/ad-library/search",
headers={"X-API-Key": os.environ["ATRIA_API_KEY"]},
params={"platform": "facebook", "status": "active", "order": "newest", "page_size": 10},
timeout=30,
)
resp.raise_for_status()
for ad in resp.json()["data"]["items"]:
print(ad["id"], ad["brand_name"], ad["title"])const url = new URL("https://api.tryatria.com/open/v1/ad-library/search");
url.searchParams.set("platform", "facebook");
url.searchParams.set("status", "active");
url.searchParams.set("order", "newest");
url.searchParams.set("page_size", "10");
const resp = await fetch(url, { headers: { "X-API-Key": process.env.ATRIA_API_KEY } });
const { data } = await resp.json();
for (const ad of data.items) console.log(ad.id, ad.brand_name, ad.title);A truncated response:
{
"code": 0,
"message": "ok",
"data": {
"items": [
{
"id": "m1234567890123456",
"brand_name": "Example Brand",
"display_format": "video",
"title": "Discover our new collection",
"start_date": "2026-05-01"
}
],
"total": 1234,
"page_size": 10
}
}That's your first successful call. See API Basics for conventions, and Use Cases for fuller recipes.
Updated 5 days ago
