api reference · v1

API Reference

TierraLens is a REST + JSON API at tierralens.co/v1. Send a parcel and a state — get back every triggered regulation with citations, permit paths, and risk levels. All responses are structured JSON; no PDFs, no scraping.

AI agents can consume the same data via the Model Context Protocol server at mcp.tierralens.co — see the MCP integration section.

§ 1

Authentication

Every request must include a bearer token in the Authorization header. Tokens are issued from your dashboard once your waitlist access is approved.

Authorization header
Authorization: Bearer tl_live_abc123...

§ 2

Quickstart

A single call to POST /v1/screen returns the full regulatory picture for a parcel. Example below uses the Austin, TX sample parcel (30.2672, -97.7431).

Requestshell
curl -X POST https://api.tierralens.co/v1/screen \
  -H "Authorization: Bearer tl_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "state": "TX",
    "lat": 30.2672,
    "lng": -97.7431,
    "layers": ["edwards", "karst", "tpdes"],
    "include_regulations": true,
    "include_permit_paths": true
  }'
Response200 OK · application/json
{
  "state": "TX",
  "parcel": {
    "lat": 30.2672,
    "lng": -97.7431,
    "address": "South MoPac corridor, Austin, TX 78745",
    "acreage": 38.6,
    "zoning": "SF-2 w/ SOS overlay (Drinking Water Protection Zone)"
  },
  "layers_triggered": 5,
  "regulations_triggered": 6,
  "results": [
    {
      "code": "TX-EAPP-WPAP",
      "title": "Water Pollution Abatement Plan (Recharge Zone)",
      "authority": "Texas Commission on Environmental Quality (TCEQ)",
      "citation": "30 TAC §213.5",
      "risk": "high"
    },
    {
      "code": "TX-SOS",
      "title": "Austin Save Our Springs Ordinance",
      "authority": "City of Austin Watershed Protection",
      "citation": "Austin City Code §25-8-511",
      "risk": "high"
    },
    {
      "code": "ESA-7-KARST",
      "title": "ESA §7 — Karst Invertebrates",
      "authority": "USFWS Austin Ecological Services",
      "citation": "16 U.S.C. §1536; 50 CFR §17",
      "risk": "high"
    },
    {
      "code": "TX-TXR150000",
      "title": "TPDES Construction General Permit",
      "authority": "TCEQ (EPA-delegated NPDES)",
      "citation": "30 TAC §305 (TXR150000)",
      "risk": "medium"
    },
    {
      "code": "TX-RRC-SWR32",
      "title": "Statewide Rule 32 — Flaring & Venting",
      "authority": "Texas Railroad Commission",
      "citation": "16 TAC §3.32",
      "risk": "low"
    },
    {
      "code": "TX-CMP",
      "title": "Coastal Management Program Consistency",
      "authority": "Texas GLO + NOAA",
      "citation": "31 TAC §501; 16 U.S.C. §1456",
      "risk": "low"
    }
  ]
}

Every object in results is a Regulation. Set include_regulations: true (default) for the full schema including summary, permit_path, typical_timeline, and source_url.

§ 3

Endpoints

Base URL: https://api.tierralens.co. All endpoints return JSON and are versioned under /v1. Launch coverage is TX and NY; additional states land behind a beta flag.

POST/v1/screen200 OK · application/json

Primary screening endpoint. Given a parcel centroid and state, returns every triggered regulation with citations, permit paths, and risk levels.

Parameters
NameTypeRequiredDescription
stateStateCoderequiredOne of "TX", "NY". Additional states gated behind beta flag.
latnumberrequiredParcel centroid latitude (WGS84).
lngnumberrequiredParcel centroid longitude (WGS84).
layersstring[]optionalOptional layer filter. Omit to screen against every layer for the state. Use GET /v1/layers to list valid IDs.
include_regulationsbooleanoptionalEmbed full regulation objects (default true). Set false for a lighter layer-only response.
include_permit_pathsbooleanoptionalInclude permit_path narrative on each regulation (default true).
Response
ScreenResponse
GET/v1/layers200 OK · application/json

List every available data layer. Each layer corresponds to one or more regulations and one upstream GIS feed.

Parameters
NameTypeRequiredDescription
stateStateCodeoptionalOptional. Filter to layers registered for a specific state (e.g. ?state=TX).
Response
{ layers: DataLayer[] }
GET/v1/regulations/{code}200 OK · application/json

Look up a single regulation by its canonical TierraLens code (e.g. TX-EAPP-WPAP, NY-ECL-24). Returns the full Regulation object with authoritative source links.

Parameters
NameTypeRequiredDescription
codestringrequiredPath parameter. Canonical regulation code, case-sensitive.
Response
Regulation
POST/v1/monitor202 Accepted · application/json

Subscribe to regulation changes for a parcel. When any triggered regulation is amended, repealed, or a new layer matches, we POST a signed payload to your webhook URL.

Parameters
NameTypeRequiredDescription
stateStateCoderequiredParcel state.
latnumberrequiredParcel centroid latitude.
lngnumberrequiredParcel centroid longitude.
webhook_urlstringrequiredHTTPS URL that will receive change events. Signed with HMAC-SHA256.
eventsstring[]optionalOptional subscription filter. Default ["regulation.updated", "regulation.added", "regulation.repealed"].
Response
{ subscription_id: string }

§ 4

Data model

TypeScript types for every object the API returns. The shapes are identical across REST and MCP surfaces.

Typestypescript
type StateCode = "TX" | "NY";

interface Regulation {
  code: string;                 // e.g. "TX-EAPP-WPAP"
  title: string;
  summary: string;
  authority: string;            // agency name
  citation: string;             // statute / rule reference
  triggered_by: string;         // why this parcel matched
  permit_path?: string;
  risk?: "low" | "medium" | "high";
  source_url?: string;
  typical_cost?: string;
  typical_timeline?: string;
}

interface DataLayer {
  id: string;                   // e.g. "tx-edwards"
  name: string;
  source: string;               // upstream feed
  color: string;                // hex, for map rendering
  icon: string;
  regulations: Regulation[];
}

interface StateProfile {
  code: StateCode;
  name: string;
  tagline: string;
  sampleParcel: {
    lat: number;
    lng: number;
    address: string;
    acreage: number;
    zoning: string;
  };
  distinctives: string[];
  layers: DataLayer[];
}

§ 5

Rate limits

Limits are enforced per API key with a sliding 60-second window. When you exceed the limit, we return 429 rate_limited with a Retry-After header in seconds.

Key prefixEnvironmentLimit
tl_live_production60 req/min
tl_test_staging10 req/min

Higher throughput is available on enterprise plans — reach out for a dedicated rate-limit bucket and SLA.

§ 6

Error codes

Errors are returned as JSON with a stable error code and a human-readable message. Never parse the message for branching logic — switch on the code.

StatusCodeDescription
400invalid_inputMalformed JSON, missing required fields, or out-of-range coordinates.
401invalid_keyMissing, malformed, or revoked bearer token.
402quota_exhaustedPlan quota reached for the billing period. Upgrade or wait for reset.
429rate_limitedPer-key rate limit exceeded. See Retry-After header.
500internalUnexpected server error. Safe to retry with exponential backoff.

§ 7

MCP integration

TierraLens ships a Model Context Protocol server at mcp.tierralens.co. It exposes every REST endpoint as a tool, so Claude and other MCP-aware agents can screen parcels, look up regulations, and subscribe to changes in-conversation — no adapter code required.

Drop the snippet below into your claude_desktop_config.json to wire it up:

claude_desktop_config.jsonjson
{
  "mcpServers": {
    "tierralens": {
      "url": "https://mcp.tierralens.co",
      "transport": "sse",
      "headers": {
        "Authorization": "Bearer tl_live_..."
      }
    }
  }
}

Tools exposed: screen_parcel, list_layers, get_regulation, monitor_parcel. Auth uses the same bearer tokens as the REST API.

§ 8

Changelog

Breaking changes, new endpoints, and layer additions are tracked in the /changelog. Subscribe to the RSS feed there to get notified when regulations in your monitored parcels change upstream.

Ready to build?

TierraLens is rolling out to waitlisted teams state by state. Get early access to production keys, MCP integration, and the full regulatory layer stack.

Join the waitlist