Developers
REST API reference
Direct HTTP access to every Baseline Labs feature. Authenticate with your API key and call it from any language.
Create an API key See the packageRate limits scale with your plan. Reads of cached results are free.
https://baselinelabs.ai/api/
Authenticate with X-API-Key: bl_your_key header on every request.
List all your studies.
{
"saves": [
{ "id": 42, "name": "My Brand", "url": "https://mybrand.com" }
]
}
Create a new study.
{ "name": "My Brand", "url": "https://mybrand.com" }
Run one or more searches across Google, GPT, Perplexity, Gemini, Google AI Mode, Claude, and DeepSeek. Costs credits. Runs synchronously and returns results directly - there's nothing to poll.
{
"searches": [
{ "query": "best project management tools", "save_id": 42, "search_type": "google" }
]
}
Response:
{
"results": [ { "query_id": 501, "position": 3, "results": [] } ],
"errors": []
}
Each result carries a query_id you can fetch again later.
Fetch a single stored search result by query_id.
List your report templates.
Run a visibility report from a template. Costs credits.
{ "template_id": 12, "save_id": 42 }
Get report results including per-query rankings.
Create a brand mention scan. Costs credits.
{
"save_id": 42,
"profile": {
"business_name": "My Brand",
"business_description": "SaaS project management tool",
"products": "all",
"industry": "Software"
}
}
Get scan details, profile, and results.
Six audits share one shape, each under its own prefix: /api/geo/site_pulse, /api/geo/schema_audit, /api/geo/reputation_audit, /api/geo/ai_vision, /api/geo/fanout and /api/geo/active_competitors. Substitute the prefix for {audit} below. All six need a paid plan.
Create a reusable template - the study, the URL and the settings every scan runs with.
{ "save_id": 42, "name": "Weekly crawl", "url": "https://mybrand.com" }
Run a scan from a template. Costs credits.
{ "template_id": 7, "save_id": 42 }
Fan-out and Active Competitors also take their queries inline - send queries with save_id, plus platforms (Fan-out) or engines (Active Competitors), and leave template_id out.
List a study's scans. GET /api/geo/{audit}/{scan_id} returns one in full. Site Pulse, Schema Audit and AI Vision also expose /{scan_id}/findings for the finding rows on their own.
Every scan a template has ever run, as a time series - the same data the trend charts read.
Score one page against the queries you want it to win, and get back anchored before/after patches with sources. Costs credits. Send either a url or pasted content - exactly one, since pasting is how you reach drafts and pages behind bot protection.
{
"save_id": 42,
"url": "https://mybrand.com/pricing",
"queries": ["best project management tools"]
}
Fetch a run: its score, factors and patches. GET /api/geo/content_tool?save_id={id} lists runs, and /factors returns the factor definitions the score is built from.
The whole competitive picture for a study in one call: the brand card, tracked rivals with share of voice and sentiment, and the candidates audits have proposed but you have not yet accepted.
Add a competitor by hand - tracked immediately, unlike a discovered candidate. PATCH /api/geo/competitors/{competitor_id} moves one between tracked, candidate and rejected; PATCH /bulk does it in one call.
{ "save_id": 42, "name": "Rival Co", "domain": "rival.com" }
Product Strategy: your dossier and your featured rivals' side by side - USP, positioning, pricing, tone of voice, target customer - with every claim carrying the page it was read from. POST /api/geo/competitors/brand-dossier/refresh rebuilds your own; POST /api/geo/competitors/{competitor_id}/dossier/refresh rebuilds a rival's.
Put a dated marker on a study's timeline when something changed on your site, so it sits next to your traffic and visibility on the day it happened. Call it from your deploy pipeline or CMS. Send a save_id, or a domain to mark every study on that site. type is deploy or change, ts defaults to now, and links must start with http:// or https://. Free, and limited to 30 a minute.
{
"save_id": 42,
"type": "deploy",
"label": "New pricing page went live",
"href": "https://github.com/acme/site/pull/118",
"items": [{ "label": "Pricing", "href": "https://mybrand.com/pricing" }]
}
A study's markers, oldest first: what you logged and what Baseline did for you. from and to take YYYY-MM-DD and default to the last 90 days.
Generate schema.org JSON-LD for any URL. Synchronous - the JSON-LD is returned directly in the response.
{ "url": "https://example.com/page" }
Response:
{
"url": "https://example.com/page",
"schema_data": { "@context": "https://schema.org", "@type": "..." },
"cached": true,
"inference_ms": 0,
"total_ms": 210
}
Every audit and data view has a CSV export alongside its JSON and PDF options - use it to pull data into a spreadsheet, or wire it straight into a Looker Studio report so agencies can build client decks off live data.
Keyword ranking trend for a visibility template - every tracked keyword, every run, with its average position that run.
Mention-volume and sentiment trend for a brand template - one row per scan.
Every inbound backlink for a study's primary site.
Single-run CSV export, available on every audit (Visibility Reports, Brand Mentions, Site Pulse, Schema Audit, AI Vision, Fan-out, Reputation) - e.g. /api/geo/reports/501/export. /export/json is the JSON equivalent.
Looker Studio recipe: these are authenticated endpoints (X-API-Key), and Looker Studio's built-in CSV connector only fetches public URLs, so the direct-URL route doesn't work for it. Two options:
1. Community connector: use Looker Studio's "Generic URL" or a
custom Apps Script connector that adds the X-API-Key header,
then points at any export.csv URL above.
2. Publish-then-connect: run the export locally (curl with your
key), drop the CSV into Google Sheets, and connect Looker
Studio to the Sheet instead. Re-run + re-upload on a schedule
for a "live enough" client report without exposing your API
key in a public URL.
Example authenticated fetch:
curl -H "X-API-Key: bl_your_key" \
"https://baselinelabs.ai/api/geo/reports/templates/12/export.csv" \
-o keywords.csv
All errors return JSON with a detail field.