API docs
Guides

First API call

A detailed walkthrough of making your first Setback API call.

Overview

This guide walks you through making your first API call, understanding the response, and handling common scenarios.

Prerequisites

Step 1: Verify your API key

Start with a health check to confirm connectivity:

curl https://api.setback.io/health

You should receive a 200 OK response.

Step 2: List available documents

Fetch the first page of documents to see what's available:

curl "https://api.setback.io/v1/documents?per_page=5" \
  -H "Authorization: Bearer YOUR_API_KEY"

Step 3: Get a specific document

Pick a document ID from the list response and fetch its details:

curl "https://api.setback.io/v1/documents/doc_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Step 4: View document restrictions

Get all restrictions extracted from that document:

curl "https://api.setback.io/v1/documents/doc_abc123/restrictions" \
  -H "Authorization: Bearer YOUR_API_KEY"

Step 5: Search by parcel

If you know a specific property's APN, query its restrictions directly:

curl "https://api.setback.io/v1/parcels/118112024/restrictions?county=Franklin" \
  -H "Authorization: Bearer YOUR_API_KEY"

Understanding the response

Each restriction fact includes:

  • fact_type — What kind of restriction it is
  • fact_value — The structured data for that restriction
  • confidence — A score from 0 to 1 indicating extraction reliability
  • citation — The page and section where this was found in the source document

For production use, we recommend filtering by min_confidence=0.85 to ensure high-quality results.

On this page