FlatSearch
REST API

FlatSearch API Documentation

Find dealers, check companies, search the web and extract pages over one JSON API. Flat per-request pricing; no per-token charges.

Buying a finished dealer report rather than building with the API?See the Competitor Dealer Map →

Base URL

https://flatsearchapi.com

Authentication

Every request must include your API key in the X-API-Key request header.

Key PrefixEnvironmentBehavior
sp_live_...ProductionFull live search, deep enrichment, billed against your balance or subscription.
sp_test_...Developer SandboxUnbilled development queries. Returns live search results without deducting credits.

1-Click IDE Onboarding

Integrate FlatSearch into Cursor, Claude Code, or GitHub Copilot in seconds. Copy our optimized integration prompt or launch via deep link:

System Prompt for Coding Agents
# FlatSearch API — Complete Technical Reference

You are integrating the FlatSearch Live B2B Web & Dealer Intelligence API (https://flatsearchapi.com).

## Base URL
https://flatsearchapi.com

## Authentication
Every request requires:
- Content-Type: application/json
- X-API-Key: sp_live_... (Production) or sp_test_... (Developer Sandbox)

## 8 Production Endpoints Summary
1. POST /v1/dealers/find — Regional dealer discovery with direct phone verification & cited website evidence.
2. POST /v1/dealers/export — Streamed standardized CSV export formatted for Clay and Google Sheets.
3. POST /v1/company/enrich — Company profile: firmographics, SEC Form D, DNS MX records, and tech stack.
4. POST /v1/company/enrich/batch — Concurrent enrichment for up to 50 company domains.
5. POST /v1/search/fast — Synthesized search answer with inline source citations.
6. POST /v1/search/sources — Raw link & snippet extraction with normal and fast modes.
7. POST /v1/search/extended — Deep multi-query research with agentic intent verification.
8. POST /v1/extract — Clean token-efficient Markdown extraction from any public URL.

## Billing
Each plan includes a number of requests per endpoint group (search; research and dealers; pages and companies).
After that, each successful request is charged to the prepaid balance; with no balance left, requests return 403 USAGE_LIMIT_EXCEEDED.

Use exponential backoff (1s, 2s, 4s) when handling 429 or 503 HTTP responses.

Rate Limits & Billing

Every plan includes a number of requests per endpoint group: 100 on Free, 50,000 on Developer and 300,000 on Scale. Once they are used, each successful request is charged to your prepaid balance at the rates below. With no balance left, requests return 403 USAGE_LIMIT_EXCEEDED. Included requests are a running total; they don't renew each month.

Endpoint groupEndpointsAfter included requests
Search/search/sources, /search/fast1¢ per request
Research & dealers/search/extended, /dealers/find, /dealers/export2¢ per request
Pages & companies/extract, /company/enrich, /company/enrich/batch1¢ per 40 URLs or companies

Requests per minute

EndpointsFreePrepaid balanceDeveloperScale
/search/fast, /search/sources, /extract2060150300
/company/enrich, /company/enrich/batch3060150300
/search/extended, /dealers/find, /dealers/export103060120

Limits apply per API key. Requests over the limit return 429 RATE_LIMIT_EXCEEDED; retry with exponential backoff. Test keys (sp_test_) aren't billed and follow the same limits. Plans and top-ups: API pricing.

POST/v1/dealers/find2¢ / request

Discovers regional dealers, distributors, and suppliers for a product category and location. Reads each company's own website, map listing, and DNS records, and returns the direct phone, street address with coordinates, and a cited website quote for each qualification. A request takes seconds to tens of seconds, depending on how many rows you ask for.

Request Parameters (JSON)

FieldTypeRequiredDescription
querystringYesProduct vertical or dealer type (e.g. "industrial pump distributors").
locationstringNoTarget city and state (e.g. "Houston, TX").
limitintegerNoMax dealer results to return (default: 25, max: 50).
custom_fieldsobjectNoNatural language qualification questions (e.g. {"stocks_goulds": "Does this company stock Goulds pumps?"}).

Code Example

curl -X POST https://flatsearchapi.com/v1/dealers/find \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sp_live_YOUR_KEY" \
  -d '{
    "query": "industrial pump distributors",
    "location": "Houston, TX",
    "limit": 10
  }'

Sample Response

200 OK — JSON Response
{
  "query": "industrial pump distributors",
  "location": "Houston, TX",
  "total_found": 1,
  "dealers": [
    {
      "status": "success",
      "schema_version": 3,
      "domain": "airindustrialworks.com",
      "name": "Air Industrial Works, LLC (Pumps in Stock)",
      "phone": "(832) 301-3959",
      "emails": ["[email protected]"],
      "location": {
        "verified_address": "5946 S Loop E, Houston, TX 77033, USA",
        "street": "5946 S Loop E",
        "city": "Houston",
        "state": "TX",
        "postcode": "77033",
        "coordinates": { "lat": 29.6890756, "lng": -95.3296457 }
      },
      "ai_qualification": {
        "icp_fit": "HIGH",
        "fit_reason": "Stocking master distributor of industrial centrifugal, sump, and AODD diaphragm pumps with immediate Houston field dispatch."
      },
      "evidence": {
        "phone": "https://airindustrialworks.com",
        "source_urls": ["https://airindustrialworks.com/brands"]
      },
      "technographics": {
        "email_provider": "Rackspace Hosted Email (mx2.emailsrvr.com)",
        "detected_saas_tools": { "AI / LLMs": [], "Sales & CRM": ["QuickBooks Enterprise"] }
      }
    }
  ]
}
POST/v1/dealers/exportStreamed CSVClay / Sheets

Streams an agency-standard CSV with clean column headers directly formatted for 1-click import into Clay, Google Sheets, Instantly, and Smartlead.

Request Parameters (JSON)

FieldTypeRequiredDescription
querystringYesProduct vertical or dealer type (e.g. "CNC tooling dealers").
locationstringNoTarget location (e.g. "Chicago, IL").
limitintegerNoNumber of leads to stream in CSV (default: 25).

Code Example

curl -X POST https://flatsearchapi.com/v1/dealers/export \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sp_live_YOUR_KEY" \
  -d '{
    "query": "CNC tooling dealers",
    "location": "Chicago, IL",
    "limit": 50
  }' \
  --output chicago_tooling_dealers.csv
POST/v1/company/enrich1¢ / 40 companies

Multi-source company enrichment. Pulls firmographics, SEC Form D fundraising filings, DNS mail infrastructure (Exchange / Google), detected software stack, and job board signals.

Request Parameters (JSON)

FieldTypeRequiredDescription
domainstringYes*Target domain (e.g. "fcxperformance.com").
namestringNoOptional company name fallback if domain is unknown.
location_hintstringNoOptional geographic hint (e.g. "Dallas, TX").

Code Example

curl -X POST https://flatsearchapi.com/v1/company/enrich \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sp_live_YOUR_KEY" \
  -d '{"domain": "fcxperformance.com"}'

Sample Response

200 OK — JSON Response
{
  "status": "success",
  "domain": "fcxperformance.com",
  "name": "FCX Performance",
  "phone": "(214) 320-3604",
  "location": {
    "street": "9010 John W. Carpenter Fwy",
    "city": "Dallas",
    "state": "TX",
    "country": "United States",
    "coordinates": { "lat": 32.8264, "lng": -96.8822 }
  },
  "technographics": {
    "email_provider": "Mimecast Secure Gateway",
    "detected_saas_tools": {
      "AI / LLMs": ["Anthropic (Claude Enterprise)"],
      "Engineering & Product": ["Atlassian (Jira / Confluence)"]
    }
  },
  "hiring_intent": {
    "is_actively_hiring": true,
    "active_postings_count": 14,
    "departments": ["Field Engineering", "Inside Sales"]
  }
}
POST/v1/company/enrich/batchUp to 50 domainsConcurrent

Enriches up to 50 companies concurrently. Domains enriched recently are served from cache.

Request Parameters (JSON)

FieldTypeRequiredDescription
companiesarray of objectsYesArray of target companies (max 50). Each object requires {"domain": "..."}.

Code Example

curl -X POST https://flatsearchapi.com/v1/company/enrich/batch \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sp_live_YOUR_KEY" \
  -d '{
    "companies": [
      {"domain": "elitepumps.net"},
      {"domain": "gcpumpinc.com"},
      {"domain": "airindustrialworks.com"}
    ]
  }'
POST/v1/search/fast1¢ / request

Low-latency synthesized search for AI chatbots, customer support agents, and interactive research loops. Reads live web sources, filters promotional noise, and returns a structured markdown answer with inline citations.

curl -X POST https://flatsearchapi.com/v1/search/fast \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sp_live_YOUR_KEY" \
  -d '{"query": "Next.js 15 ERR_TOO_MANY_REDIRECTS iron-session subdomains"}'
POST/v1/search/sources1¢ / request

Direct link and snippet retrieval for pipelines that want raw search results without AI answer synthesis. Supports normal (comprehensive) and fast (low-latency) modes.

curl -X POST https://flatsearchapi.com/v1/search/sources \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sp_live_YOUR_KEY" \
  -d '{
    "query": "Apple M4 chip architecture specifications",
    "num_results": 5,
    "mode": "fast",
    "categories": "general"
  }'
POST/v1/search/extended2¢ / requestAgentic Deep

Multi-query research for complex multi-part questions. Runs agentic query expansion, intent verification, and cross-references multiple perspectives into an authoritative analysis.

curl -X POST https://flatsearchapi.com/v1/search/extended \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sp_live_YOUR_KEY" \
  -d '{
    "query": "Compare Blackwell B200 vs Nvidia H200 GPU architecture, memory bandwidth, and availability timeline",
    "stream": false
  }'
POST/v1/extract1¢ / 40 URLs

Converts any public URL, such as a blog post, product page or documentation portal, into clean, token-efficient Markdown. One URL per request.

curl -X POST https://flatsearchapi.com/v1/extract \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sp_live_YOUR_KEY" \
  -d '{"url": "https://news.ycombinator.com"}'

Errors & Status Codes

All error responses return standard JSON with error, message, and request_id.

Error CodeHTTP StatusMeaningRecommended Action
INVALID_API_KEY401Missing, formatted incorrectly, or revoked key.Ensure X-API-Key starts with sp_live_ or sp_test_.
USAGE_LIMIT_EXCEEDED403Included requests for this endpoint group are used and the prepaid balance is zero.Top up prepaid balance or upgrade plan in dashboard.
RATE_LIMIT_EXCEEDED429Per-minute request limit reached.Retry with exponential backoff (1s, 2s, 4s).
SEARCH_FAILED503Search backend returned zero snippets or timed out.Retry query or broaden location criteria.
EXTRACT_ERROR422 / 502Target URL unreachable or blocked by anti-bot.Verify URL accessibility and public visibility.