API Documentation

v1

Access DesertDetector's service desert analysis, demand aggregation, and market intelligence data programmatically through our REST API.

Quick Start

1. Get an API Key

API access requires a Professional plan or higher. Create your key from the API Keys page.

2. Authenticate Requests

Include your API key in the Authorization header:

Authorization: Bearer dd_your_api_key_here

3. Make Your First Request

curl -H "Authorization: Bearer dd_your_api_key" \
  https://desertdetec.com/api/v1/analyze/90210
Rate Limits
PlanMonthly CallsRate LimitEndpoints
Professional1,00010 req/minanalyze, demand, opportunities, leaderboard
Enterprise10,00060 req/minAll endpoints including reports
MunicipalUnlimited120 req/minAll endpoints + custom

Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response.

Endpoints

GET/api/v1/analyze/:zipCodestarter+

Run AI service desert analysis for a zip code. Returns service gaps, demographics, and opportunity scores.

Parameters

NameTypeInDescription
zipCodestringpath5-digit US zip code

Example Response

{
  "zipCode": "90210",
  "serviceGaps": [
    {
      "serviceName": "Pet Grooming",
      "category": "Pet Services",
      "demandScore": 87,
      "nearestProviderMiles": 5.2,
      "estimatedAnnualRevenue": 185000
    }
  ],
  "demographics": {
    "population": 21000,
    "medianIncome": 125000,
    "medianAge": 42
  },
  "overallScore": 82,
  "analyzedAt": "2026-03-19T02:50:00Z"
}
GET/api/v1/demand/:zipCodeprofessional+

Get aggregated demand data including pledge totals, service requests, and threshold progress.

Parameters

NameTypeInDescription
zipCodestringpath5-digit US zip code

Example Response

{
  "zipCode": "90210",
  "totalPledged": 42500,
  "pledgeCount": 187,
  "threshold": 50000,
  "progress": 85,
  "topServices": [
    { "service": "Bakery", "pledged": 18500, "pledgers": 72 },
    { "service": "Pet Grooming", "pledged": 12000, "pledgers": 55 }
  ]
}
GET/api/v1/opportunitiesprofessional+

List top business opportunities across all analyzed neighborhoods, ranked by opportunity score.

Parameters

NameTypeInDescription
limitnumberqueryMax results (default 20, max 100)
minScorenumberqueryMinimum opportunity score (0-100)
categorystringqueryFilter by service category

Example Response

{
  "opportunities": [
    {
      "zipCode": "90210",
      "service": "Pet Grooming",
      "score": 87,
      "pledged": 52000,
      "estimatedRevenue": 185000,
      "thresholdReached": true
    }
  ],
  "total": 142,
  "page": 1
}
GET/api/v1/leaderboardstarter+

Get the top neighborhoods by pledge activity and demand.

Parameters

NameTypeInDescription
limitnumberqueryMax results (default 10, max 50)

Example Response

{
  "neighborhoods": [
    {
      "zipCode": "90210",
      "totalPledged": 125000,
      "pledgeCount": 423,
      "topService": "Bakery",
      "analysisCount": 12
    }
  ]
}
GET/api/v1/reports/:reportIdenterprise+

Retrieve a purchased premium report by ID.

Parameters

NameTypeInDescription
reportIdnumberpathReport ID

Example Response

{
  "id": 42,
  "zipCode": "90210",
  "tier": "professional",
  "status": "completed",
  "content": { ... },
  "generatedAt": "2026-03-19T02:50:00Z"
}
Error Codes
CodeMeaningResolution
401Invalid or missing API keyCheck your Authorization header
403Insufficient plan for endpointUpgrade your subscription plan
404Resource not foundVerify the zip code or resource ID
429Rate limit exceededWait and retry, or upgrade plan
500Internal server errorContact support

Ready to integrate?