OverviewREST APIMCP
REST API

API Reference

Direct HTTP access to all Baseline Labs features. Authenticate with your API key and call from any language.

Base URL
https://baselinelabs.ai/api/

Authenticate with X-API-Key: bl_your_key header on every request.

Projects
GET /api/geo/search/saves

List all your projects.

{
  "saves": [
    { "id": 42, "name": "My Brand", "url": "https://mybrand.com" }
  ]
}
POST /api/geo/search/saves

Create a new project.

{ "name": "My Brand", "url": "https://mybrand.com" }
Search
POST /api/geo/search/search

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.

GET /api/geo/search/query/{query_id}

Fetch a single stored search result by query_id.

Visibility Reports
GET /api/geo/reports/templates

List your report templates.

POST /api/geo/reports

Run a visibility report from a template. Costs credits.

{ "template_id": 12, "save_id": 42 }
GET /api/geo/reports/{report_id}

Get report results including per-query rankings.

Brand Mentions
POST /api/geo/mentions/scans

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 /api/geo/mentions/scans/{scan_id}

Get scan details, profile, and results.

Schema.org
POST /api/geo/schema/generate

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
}
CSV Export & Looker Studio

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.

GET /api/geo/reports/templates/{template_id}/export.csv

Keyword ranking trend for a visibility template — every tracked keyword, every run, with its average position that run.

GET /api/geo/brand_reports/templates/{template_id}/export.csv

Mention-volume and sentiment trend for a brand template — one row per scan.

GET /api/geo/backlinks/save/{save_id}/export.csv

Every inbound backlink for a project's primary site.

GET /api/geo/{audit}/{run_id}/export

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
Error Responses

All errors return JSON with a detail field.

401 Bad or missing API key
402 Insufficient credits
429 Rate limited
404 Resource not found
George
Online
0%

Hi, I'm George.

Ask me about your projects, reports, brand mentions, backlinks, or anything on the platform.