{
  "openapi": "3.1.0",
  "info": {
    "title": "Smarter Data API",
    "version": "1",
    "summary": "U.S. local business data: companies, named contacts, live web search, email verification and crawling.",
    "description": "Find local businesses by industry and place, with the address, the phone and the people who run them. Pay per record in credits: counts and estimates are free, no match costs nothing, and the same record is never sold to you twice inside a year. Every operation states its price in x-credit-cost. Full reference with examples: https://smarterdata.ai/docs/. The machine-readable contract of the running build is GET /v1/schema.",
    "contact": {
      "name": "Smarter Data support",
      "email": "support@smarterdata.ai",
      "url": "https://smarterdata.ai/contact/"
    },
    "termsOfService": "https://smarterdata.ai/legal/terms.html"
  },
  "externalDocs": {
    "description": "API reference",
    "url": "https://smarterdata.ai/docs/"
  },
  "servers": [
    {
      "url": "https://api.smarterdata.ai"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Size",
      "description": "Free counts and the schema."
    },
    {
      "name": "Companies",
      "description": "Search and read company records."
    },
    {
      "name": "Contacts",
      "description": "Named contacts, and any reachable contact on request."
    },
    {
      "name": "Live",
      "description": "Real-time map listings and web search."
    },
    {
      "name": "Verify and crawl",
      "description": "Email verification and fresh website crawls (jobs)."
    },
    {
      "name": "Account",
      "description": "Balance, usage, your list and credit packs."
    }
  ],
  "paths": {
    "/v1/count": {
      "get": {
        "operationId": "count",
        "summary": "Count businesses or contacts (free)",
        "description": "Size any segment before spending. Always 0 credits.",
        "tags": [
          "Size"
        ],
        "x-credit-cost": {
          "credits": 0,
          "per": "call"
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Two-letter U.S. state code, e.g. TX. Comma-separated for several values."
            },
            "example": "TX"
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "City name. Comma-separated for several values."
            }
          },
          {
            "name": "zip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Five-digit ZIP code. Comma-separated for several values."
            }
          },
          {
            "name": "niche",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Industry word from GET /v1/schema → values.niche (103 words, e.g. agriculture, apartment, appliance_repair, asbestos_hazmat). A company is found by either industry word its record carries. Comma-separated for several values."
            },
            "example": "janitorial"
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sector, case-insensitive: Accommodation/Food · Admin/Support/Waste · Agriculture · Arts/Recreation · Construction · Education · Finance/Insurance · Health Care · Information · Management · Manufacturing · Mining/Oil&Gas · Other Services · Other/Unclassified · Professional Services · Public Admin · RealEstate/Rental · Retail · Transportation · Transportation/Warehousing · Utilities · Wholesale. Comma-separated for several values."
            }
          },
          {
            "name": "naics",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "NAICS code; a prefix matches every code under it. Comma-separated for several values."
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Company name contains this text. At most 20 calls a minute carry name=."
            }
          },
          {
            "name": "service_line",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "What the company does (465 words in GET /v1/schema → values.service_line). Multi-service aware: a general contractor that also roofs matches roofing. Comma-separated for several values."
            }
          },
          {
            "name": "employees_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Minimum head-count. Head-count is known for a minority of companies; filtering drops the rest."
            }
          },
          {
            "name": "employees_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Maximum head-count."
            }
          },
          {
            "name": "employees_band",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Head-count band: 1-4 · 5-9 · 10-49 · 50-249 · 250+ · unknown. Comma-separated for several values."
            }
          },
          {
            "name": "revenue_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Minimum modeled annual revenue in USD (an estimate, never reported financials)."
            }
          },
          {
            "name": "revenue_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Maximum modeled annual revenue in USD."
            }
          },
          {
            "name": "revenue_band",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Modeled revenue band: <1M · 1-10M · 10-50M · 50M+ · unknown. Comma-separated for several values."
            }
          },
          {
            "name": "has_company_phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = companies with a phone on file."
            }
          },
          {
            "name": "has_website",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = companies with a website on file."
            }
          },
          {
            "name": "is_public",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = flagged publicly traded; false = everything else (unknown for most companies)."
            }
          },
          {
            "name": "quality_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Minimum completeness score, 0 to 100 (quality_score on every record).",
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per call, 1 to 1000.",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "estimate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = return the exact credit cost without running the call. Free."
            }
          },
          {
            "name": "exclude_delivered",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Default true: a record your account bought in the last 12 months is skipped, so repeating a call returns the next batch. false re-sends it, and charges it again."
            }
          },
          {
            "name": "redeliver_after_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records bought more than this many days ago become deliverable again (list recycling), 1 to 3650.",
              "minimum": 1,
              "maximum": 3650
            }
          },
          {
            "name": "entity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "companies",
                "contacts",
                "companies_with_named_dm"
              ],
              "description": "What to count. Default companies."
            }
          },
          {
            "name": "dm_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Default true: named contacts only (a named contact seniority, a person's name, and an email or a cell). false = any reachable contact."
            }
          },
          {
            "name": "channels",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Contact channels: email, cell, office (the default three) and linkedin. A contact counts and is charged only when it carries at least one of them. On GET /v1/count it applies with entity=contacts. Comma-separated for several values."
            }
          },
          {
            "name": "exclude_dissolved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true drops companies recorded as dissolved."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "examples": {
                  "companies": {
                    "summary": "state=TX, niche=janitorial",
                    "value": {
                      "ok": true,
                      "entity": "companies",
                      "count": 18185,
                      "credits_used": 0,
                      "credits_remaining": 100
                    }
                  },
                  "contacts": {
                    "summary": "state=TX, niche=general_contractor, entity=contacts",
                    "value": {
                      "ok": true,
                      "entity": "contacts",
                      "definition": "named_dm_strict",
                      "count": 29734,
                      "credits_used": 0,
                      "credits_remaining": 1900
                    }
                  },
                  "segment_too_small": {
                    "summary": "A segment of fewer than 25 companies: the contact coverage is withheld",
                    "value": {
                      "ok": true,
                      "entity": "companies_with_named_dm",
                      "count": null,
                      "note": "segment_too_small: coverage is reported for segments of 25+ companies",
                      "credits_used": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/schema": {
      "get": {
        "operationId": "getSchema",
        "summary": "Filters, values, prices and routes (free)",
        "description": "The contract of the running build: accepted parameters per route, the value lists, the credit table for your plan.",
        "tags": [
          "Size"
        ],
        "x-credit-cost": {
          "credits": 0,
          "per": "call"
        },
        "responses": {
          "200": {
            "description": "The contract.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/companies": {
      "get": {
        "operationId": "searchCompanies",
        "summary": "Search companies (1 credit per record)",
        "description": "Stable order (data quality, name, id). Records you bought in the last 12 months are skipped, so the same call returns the next batch; has_more says whether any are left. estimate=true is free and also states the whole segment: total_matching, credit_cost_all and balance_covers.",
        "tags": [
          "Companies"
        ],
        "x-credit-cost": {
          "credits": 1,
          "per": "company record delivered",
          "price_key": "company_search"
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Two-letter U.S. state code, e.g. TX. Comma-separated for several values."
            },
            "example": "TX"
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "City name. Comma-separated for several values."
            }
          },
          {
            "name": "zip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Five-digit ZIP code. Comma-separated for several values."
            }
          },
          {
            "name": "niche",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Industry word from GET /v1/schema → values.niche (103 words, e.g. agriculture, apartment, appliance_repair, asbestos_hazmat). A company is found by either industry word its record carries. Comma-separated for several values."
            },
            "example": "janitorial"
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sector, case-insensitive: Accommodation/Food · Admin/Support/Waste · Agriculture · Arts/Recreation · Construction · Education · Finance/Insurance · Health Care · Information · Management · Manufacturing · Mining/Oil&Gas · Other Services · Other/Unclassified · Professional Services · Public Admin · RealEstate/Rental · Retail · Transportation · Transportation/Warehousing · Utilities · Wholesale. Comma-separated for several values."
            }
          },
          {
            "name": "naics",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "NAICS code; a prefix matches every code under it. Comma-separated for several values."
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Company name contains this text. At most 20 calls a minute carry name=."
            }
          },
          {
            "name": "service_line",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "What the company does (465 words in GET /v1/schema → values.service_line). Multi-service aware: a general contractor that also roofs matches roofing. Comma-separated for several values."
            }
          },
          {
            "name": "employees_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Minimum head-count. Head-count is known for a minority of companies; filtering drops the rest."
            }
          },
          {
            "name": "employees_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Maximum head-count."
            }
          },
          {
            "name": "employees_band",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Head-count band: 1-4 · 5-9 · 10-49 · 50-249 · 250+ · unknown. Comma-separated for several values."
            }
          },
          {
            "name": "revenue_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Minimum modeled annual revenue in USD (an estimate, never reported financials)."
            }
          },
          {
            "name": "revenue_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Maximum modeled annual revenue in USD."
            }
          },
          {
            "name": "revenue_band",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Modeled revenue band: <1M · 1-10M · 10-50M · 50M+ · unknown. Comma-separated for several values."
            }
          },
          {
            "name": "has_company_phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = companies with a phone on file."
            }
          },
          {
            "name": "has_website",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = companies with a website on file."
            }
          },
          {
            "name": "is_public",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = flagged publicly traded; false = everything else (unknown for most companies)."
            }
          },
          {
            "name": "quality_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Minimum completeness score, 0 to 100 (quality_score on every record).",
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per call, 1 to 1000.",
              "minimum": 1,
              "maximum": 1000
            },
            "example": 5
          },
          {
            "name": "estimate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = return the exact credit cost without running the call. Free."
            }
          },
          {
            "name": "exclude_delivered",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Default true: a record your account bought in the last 12 months is skipped, so repeating a call returns the next batch. false re-sends it, and charges it again."
            }
          },
          {
            "name": "redeliver_after_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records bought more than this many days ago become deliverable again (list recycling), 1 to 3650.",
              "minimum": 1,
              "maximum": 3650
            }
          },
          {
            "name": "exclude_dissolved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true drops companies recorded as dissolved."
            }
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional. A retry with the same key replays the original answer for 24 hours and charges nothing: replayed is true and credits_used is 0. The same key with a different request is 409 idempotency_conflict."
          }
        ],
        "responses": {
          "200": {
            "description": "Companies.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyList"
                },
                "examples": {
                  "estimate": {
                    "summary": "With estimate=true: the cost, free",
                    "value": {
                      "ok": true,
                      "estimate": true,
                      "entity": "companies",
                      "count": 5,
                      "credit_cost": 5,
                      "credits_used": 0
                    }
                  },
                  "pull": {
                    "summary": "The pull of 5 (one record shown, shortened)",
                    "value": {
                      "ok": true,
                      "entity": "companies",
                      "count": 5,
                      "total_matching": 18185,
                      "has_more": true,
                      "pagination_mode": "auto_advance",
                      "credits_used": 5,
                      "credits_remaining": 95,
                      "records": [
                        {
                          "business_id": "co:d:examplejanitorial.com",
                          "name": "Example Janitorial"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/companies/{business_id}": {
      "get": {
        "operationId": "getCompany",
        "summary": "Read one company (1 credit; free if you bought it in the last 12 months)",
        "description": "One company, the same record a search returns; it counts as a delivery, and for a company your account bought in the last 12 months it costs 0 and the answer says already_delivered: true.",
        "tags": [
          "Companies"
        ],
        "x-credit-cost": {
          "credits": 1,
          "per": "company record",
          "price_key": "company_detail",
          "note": "0 for a company your account bought in the last 12 months."
        },
        "parameters": [
          {
            "name": "business_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Opaque company id as received (URL-encode it)."
          },
          {
            "name": "estimate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = return the exact credit cost without running the call. Free."
            }
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional. A retry with the same key replays the original answer for 24 hours and charges nothing: replayed is true and credits_used is 0. The same key with a different request is 409 idempotency_conflict."
          }
        ],
        "responses": {
          "200": {
            "description": "One company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/companies/{business_id}/contacts": {
      "get": {
        "operationId": "revealContacts",
        "summary": "Reveal a company's contacts (3 credits per contact)",
        "description": "Only for a company your account already holds (else 409 company_required). Named contacts by default. Each record carries its channels as objects, and only the channels you asked for.",
        "tags": [
          "Contacts"
        ],
        "x-credit-cost": {
          "credits": 3,
          "per": "contact delivered",
          "price_key": "contact_reveal"
        },
        "parameters": [
          {
            "name": "business_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Opaque company id as received (URL-encode it).",
            "example": "co:d:examplepaving.com"
          },
          {
            "name": "channels",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Contact channels: email, cell, office (the default three) and linkedin. A contact counts and is charged only when it carries at least one of them. On GET /v1/count it applies with entity=contacts. Comma-separated for several values."
            },
            "example": "email,cell"
          },
          {
            "name": "dm_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Default true: named contacts only (a named contact seniority, a person's name, and an email or a cell). false = any reachable contact."
            }
          },
          {
            "name": "include_chain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Accepted for older calls and changes nothing: contacts of a franchise or chain are always shown at every location they belong to."
            }
          },
          {
            "name": "estimate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = return the exact credit cost without running the call. Free."
            }
          },
          {
            "name": "exclude_delivered",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Default true: a record your account bought in the last 12 months is skipped, so repeating a call returns the next batch. false re-sends it, and charges it again."
            }
          },
          {
            "name": "redeliver_after_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records bought more than this many days ago become deliverable again (list recycling), 1 to 3650.",
              "minimum": 1,
              "maximum": 3650
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Level: Board · Executive · Owner · Vice President · Director · Manager · Staff. Comma-separated for several values."
            }
          },
          {
            "name": "function",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Department, one of 22 words, e.g. General Business & Management · Operations · Sales & Business Development. Comma-separated for several values."
            }
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional. A retry with the same key replays the original answer for 24 hours and charges nothing: replayed is true and credits_used is 0. The same key with a different request is 409 idempotency_conflict."
          }
        ],
        "responses": {
          "200": {
            "description": "Contacts of one company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevealedContactList"
                },
                "examples": {
                  "estimate": {
                    "summary": "With estimate=true: the cost, free",
                    "value": {
                      "ok": true,
                      "estimate": true,
                      "entity": "contacts",
                      "count": 2,
                      "credit_cost": 6,
                      "credits_per_record": 3,
                      "definition": "named_dm_strict",
                      "credits_used": 0,
                      "credits_remaining": 1900
                    }
                  },
                  "reveal": {
                    "summary": "Two contacts revealed (one record shown, shortened)",
                    "value": {
                      "ok": true,
                      "entity": "contacts",
                      "count": 2,
                      "credits_used": 6,
                      "credits_remaining": 1894,
                      "definition": "named_dm_strict",
                      "records": [
                        {
                          "name": "Jordan Doe",
                          "title": "Owner",
                          "seniority": "owner_operator",
                          "is_decision_maker": true,
                          "contact_class": "person",
                          "channels": {
                            "email": {
                              "value": "jordan@example.com",
                              "type": "personal",
                              "status": "unverified"
                            },
                            "cell": {
                              "value": "2145550177",
                              "type": "personal",
                              "line_type": "unknown"
                            }
                          },
                          "email_capable": true,
                          "sms_capable": true,
                          "call_capable": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/contacts": {
      "get": {
        "operationId": "searchContacts",
        "summary": "Search contacts across a segment (3 credits per contact)",
        "description": "One flat record per contact at each company of the segment. Needs a segment of at least coverage_min_segment companies (25), else 400 segment_too_small.",
        "tags": [
          "Contacts"
        ],
        "x-credit-cost": {
          "credits": 3,
          "per": "contact delivered",
          "price_key": "contact_search"
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Two-letter U.S. state code, e.g. TX. Comma-separated for several values."
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "City name. Comma-separated for several values."
            }
          },
          {
            "name": "zip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Five-digit ZIP code. Comma-separated for several values."
            }
          },
          {
            "name": "niche",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Industry word from GET /v1/schema → values.niche (103 words, e.g. agriculture, apartment, appliance_repair, asbestos_hazmat). A company is found by either industry word its record carries. Comma-separated for several values."
            }
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sector, case-insensitive: Accommodation/Food · Admin/Support/Waste · Agriculture · Arts/Recreation · Construction · Education · Finance/Insurance · Health Care · Information · Management · Manufacturing · Mining/Oil&Gas · Other Services · Other/Unclassified · Professional Services · Public Admin · RealEstate/Rental · Retail · Transportation · Transportation/Warehousing · Utilities · Wholesale. Comma-separated for several values."
            }
          },
          {
            "name": "naics",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "NAICS code; a prefix matches every code under it. Comma-separated for several values."
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Company name contains this text. At most 20 calls a minute carry name=."
            }
          },
          {
            "name": "service_line",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "What the company does (465 words in GET /v1/schema → values.service_line). Multi-service aware: a general contractor that also roofs matches roofing. Comma-separated for several values."
            }
          },
          {
            "name": "employees_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Minimum head-count. Head-count is known for a minority of companies; filtering drops the rest."
            }
          },
          {
            "name": "employees_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Maximum head-count."
            }
          },
          {
            "name": "employees_band",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Head-count band: 1-4 · 5-9 · 10-49 · 50-249 · 250+ · unknown. Comma-separated for several values."
            }
          },
          {
            "name": "revenue_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Minimum modeled annual revenue in USD (an estimate, never reported financials)."
            }
          },
          {
            "name": "revenue_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Maximum modeled annual revenue in USD."
            }
          },
          {
            "name": "revenue_band",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Modeled revenue band: <1M · 1-10M · 10-50M · 50M+ · unknown. Comma-separated for several values."
            }
          },
          {
            "name": "has_company_phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = companies with a phone on file."
            }
          },
          {
            "name": "has_website",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = companies with a website on file."
            }
          },
          {
            "name": "is_public",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = flagged publicly traded; false = everything else (unknown for most companies)."
            }
          },
          {
            "name": "quality_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Minimum completeness score, 0 to 100 (quality_score on every record).",
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "title",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Job title contains this text."
            }
          },
          {
            "name": "seniority",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Seniority: executive · operational · financial · owner_operator · staff · unknown (staff and unknown only with dm_only=false). Comma-separated for several values."
            }
          },
          {
            "name": "contact_class",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "What the record is: person · person_business_inbox · business_inbox · owner_name_only · linkedin_only · person_office_only · other. Comma-separated for several values."
            }
          },
          {
            "name": "dm_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Default true: named contacts only (a named contact seniority, a person's name, and an email or a cell). false = any reachable contact."
            }
          },
          {
            "name": "channels",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Contact channels: email, cell, office (the default three) and linkedin. A contact counts and is charged only when it carries at least one of them. On GET /v1/count it applies with entity=contacts. Comma-separated for several values."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per call, 1 to 1000.",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "estimate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = return the exact credit cost without running the call. Free."
            }
          },
          {
            "name": "exclude_delivered",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Default true: a record your account bought in the last 12 months is skipped, so repeating a call returns the next batch. false re-sends it, and charges it again."
            }
          },
          {
            "name": "redeliver_after_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records bought more than this many days ago become deliverable again (list recycling), 1 to 3650.",
              "minimum": 1,
              "maximum": 3650
            }
          },
          {
            "name": "exclude_dissolved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true drops companies recorded as dissolved."
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Level: Board · Executive · Owner · Vice President · Director · Manager · Staff. Comma-separated for several values."
            }
          },
          {
            "name": "function",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Department, one of 22 words, e.g. General Business & Management · Operations · Sales & Business Development. Comma-separated for several values."
            }
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional. A retry with the same key replays the original answer for 24 hours and charges nothing: replayed is true and credits_used is 0. The same key with a different request is 409 idempotency_conflict."
          }
        ],
        "responses": {
          "200": {
            "description": "Contacts, flat records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/live/places": {
      "get": {
        "operationId": "livePlaces",
        "summary": "Live map-listing search (2 credits per page of 10)",
        "description": "Billed per page fetched, also when a page is empty; pages not fetched are refunded. Answers within 24 h come from our store at the same price.",
        "tags": [
          "Live"
        ],
        "x-credit-cost": {
          "credits": 2,
          "per": "page of 10 fetched",
          "price_key": "live_places"
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Search text, e.g. \"hvac companies\"."
            },
            "example": "roofing companies"
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Place for the live map search, e.g. \"Austin, TX\"."
            },
            "example": "Austin, TX"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page to start from (places 1-20, search 1-10).",
              "minimum": 1,
              "maximum": 20
            }
          },
          {
            "name": "pages",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Pages of 10 to walk in one call, 1 to 10.",
              "minimum": 1,
              "maximum": 10
            },
            "example": 2
          },
          {
            "name": "estimate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = return the exact credit cost without running the call. Free."
            }
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional. A retry with the same key replays the original answer for 24 hours and charges nothing: replayed is true and credits_used is 0. The same key with a different request is 409 idempotency_conflict."
          }
        ],
        "responses": {
          "200": {
            "description": "Live map listings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveList"
                },
                "examples": {
                  "two_pages": {
                    "summary": "Two pages of 10 (one record shown, shortened)",
                    "value": {
                      "ok": true,
                      "entity": "live_places",
                      "count": 20,
                      "credits_used": 4,
                      "credits_remaining": 1889,
                      "live": true,
                      "fetched_at": "2026-10-24T09:16:01Z",
                      "page": 1,
                      "pages_fetched": 2,
                      "page_size": 10,
                      "next_page": 3,
                      "records": [
                        {
                          "category": "Roofing contractor",
                          "latitude": 30.26,
                          "longitude": -97.74,
                          "phone": "5125550123",
                          "rating": 4.8,
                          "rating_count": 213,
                          "page": 1,
                          "position": 1
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/live/search": {
      "get": {
        "operationId": "liveSearch",
        "summary": "Live web search (1 credit per query)",
        "description": "Organic results (position, title, link, snippet, date) and a knowledge panel when present.",
        "tags": [
          "Live"
        ],
        "x-credit-cost": {
          "credits": 1,
          "per": "query",
          "price_key": "live_search"
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Search text, e.g. \"hvac companies\"."
            }
          },
          {
            "name": "num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Results per query, 1 to 10.",
              "minimum": 1,
              "maximum": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page to start from (places 1-20, search 1-10).",
              "minimum": 1,
              "maximum": 20
            }
          },
          {
            "name": "estimate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "true = return the exact credit cost without running the call. Free."
            }
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional. A retry with the same key replays the original answer for 24 hours and charges nothing: replayed is true and credits_used is 0. The same key with a different request is 409 idempotency_conflict."
          }
        ],
        "responses": {
          "200": {
            "description": "Live web results.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/verify/email": {
      "post": {
        "operationId": "verifyEmail",
        "summary": "Verify one email (1 credit; deep check 1)",
        "description": "Mail-host check at once. smtp:true on a domain with a mail host queues the deep, mailbox-level check as a job (GET /v1/jobs/{id}). No charge for a string that is not an email or an answer that could not be given.",
        "tags": [
          "Verify and crawl"
        ],
        "x-credit-cost": {
          "credits": 1,
          "per": "mail-host check",
          "price_key": "verify_mx",
          "deep": {
            "credits": 1,
            "per": "deep verdict",
            "price_key": "verify_smtp"
          }
        },
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional. A retry with the same key replays the original answer for 24 hours and charges nothing: replayed is true and credits_used is 0. The same key with a different request is 409 idempotency_conflict."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "smtp": {
                    "type": "boolean",
                    "description": "true = also run the deep check."
                  }
                }
              },
              "example": {
                "email": "jordan@example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The mail-host answer, and the job when a deep check was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailVerification"
                },
                "examples": {
                  "mail_host": {
                    "summary": "The mail-host check",
                    "value": {
                      "ok": true,
                      "entity": "email_verification",
                      "email": "jordan@example.com",
                      "domain": "example.com",
                      "status": "mx_ok",
                      "mx": true,
                      "cached": false,
                      "verified_at": "2026-10-24T09:14:02Z",
                      "origin": "live",
                      "credits_used": 1,
                      "credits_remaining": 1893
                    }
                  },
                  "deep": {
                    "summary": "With smtp: true: the deep check is queued as a job",
                    "value": {
                      "ok": true,
                      "email": "jordan@example.com",
                      "status": "mx_ok",
                      "mx": true,
                      "smtp": "queued",
                      "job_id": "574e7696-a81e-4cd8-94c9-557df9140af1",
                      "credits_held": 1,
                      "note": "poll /v1/jobs/{id}; settled on completion: 1 credit with a deep verdict (the mail-host answer comes with it), 1 credit for the mail-host answer alone when the deep check gives none (unknown / error / unavailable); the rest of the hold is refunded"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/verify/bulk": {
      "post": {
        "operationId": "verifyBulk",
        "summary": "Verify up to 10,000 emails (1 credit per verdict)",
        "description": "Async job: the maximum cost is held, settled on completion, the rest refunded. valid, invalid and catch_all are billed; unknown, error, unavailable and invalid_syntax are free. The answer carries job_id: read the job with GET /v1/jobs/{id}.",
        "tags": [
          "Verify and crawl"
        ],
        "x-credit-cost": {
          "credits": 1,
          "per": "verdict (valid, invalid or catch_all)",
          "price_key": "verify_smtp"
        },
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional. A retry with the same key replays the original answer for 24 hours and charges nothing: replayed is true and credits_used is 0. The same key with a different request is 409 idempotency_conflict."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "emails"
                ],
                "properties": {
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 10000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The job that was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobSubmitted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/scrape": {
      "post": {
        "operationId": "crawlWebsites",
        "summary": "Crawl up to 500 websites (2 credits per site with contact details)",
        "description": "Async job. Per site: title, same-domain emails, phones, social profiles. A site that cannot be reached or shows no contact details costs nothing. The answer carries job_id: read the job with GET /v1/jobs/{id}.",
        "tags": [
          "Verify and crawl"
        ],
        "x-credit-cost": {
          "credits": 2,
          "per": "site crawled with contact details",
          "price_key": "scrape_domain"
        },
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional. A retry with the same key replays the original answer for 24 hours and charges nothing: replayed is true and credits_used is 0. The same key with a different request is 409 idempotency_conflict."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domains"
                ],
                "properties": {
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 500
                  }
                }
              },
              "example": {
                "domains": [
                  "example.com",
                  "examplepaving.com"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The job that was queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobSubmitted"
                },
                "examples": {
                  "queued": {
                    "summary": "The job, queued",
                    "value": {
                      "ok": true,
                      "job_id": "9b1d7e40-2c6f-4f0a-8d3e-61a5c2b7f9e4",
                      "total": 2,
                      "status": "queued",
                      "credits_held": 4,
                      "note": "2 credits per successfully scraped domain; unused hold refunded at completion"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/jobs/{id}": {
      "get": {
        "operationId": "getJob",
        "summary": "Read a job (free)",
        "description": "Progress of a bulk verification, a deep check or a crawl: poll it until status is complete, when the answer also carries records, credits_used and credits_remaining (a failed job carries error and its hold is refunded in full).",
        "tags": [
          "Verify and crawl"
        ],
        "x-credit-cost": {
          "credits": 0,
          "per": "call"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Job id."
          }
        ],
        "responses": {
          "200": {
            "description": "The job.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "me",
        "summary": "Your account and balance (free)",
        "description": "Your email, name, credit balance, scopes and keys (prefixes only: a full key is never shown again after it is minted).",
        "tags": [
          "Account"
        ],
        "x-credit-cost": {
          "credits": 0,
          "per": "call"
        },
        "responses": {
          "200": {
            "description": "Your account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/me/usage": {
      "get": {
        "operationId": "usage",
        "summary": "Your credit usage (free)",
        "description": "Net credits and calls per action over the last 30 days (usage), and the last 25 ledger entries: charges, holds, refunds and purchases (ledger).",
        "tags": [
          "Account"
        ],
        "x-credit-cost": {
          "credits": 0,
          "per": "call"
        },
        "responses": {
          "200": {
            "description": "Usage and the ledger.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/me/list": {
      "get": {
        "operationId": "myList",
        "summary": "Your list: everything you bought in the last 12 months (free)",
        "description": "Every company (kind=companies) or contact (kind=contacts) your account bought in the last 365 days, with its current values and bought_at. 0 credits; downloading it records nothing and moves no window. A contact is the same flat record GET /v1/contacts returns. Cell numbers and personal emails only for a key with the personal_data scope. One CSV download runs at a time per account: a second answers 429 list_download_running.",
        "tags": [
          "Account"
        ],
        "x-credit-cost": {
          "credits": 0,
          "per": "call"
        },
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "companies",
                "contacts"
              ],
              "description": "Which records of your list. Default companies."
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ],
              "description": "json (default): pages of limit records, continued with next_cursor. csv: the whole list as one file (limit is not accepted with csv)."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Records per call, 1 to 1000.",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "next_cursor from the previous page, as received. Valid only for your account and the same kind."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your list (JSON), or the whole list (CSV).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CompanyList"
                    },
                    {
                      "$ref": "#/components/schemas/ContactList"
                    }
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/billing/packs": {
      "get": {
        "operationId": "creditPacks",
        "summary": "Credit packs for sale (free)",
        "description": "The credit packs on sale, each with its id, name, credits and amount_cents, and billing, which is \"live\" when purchases are open.",
        "tags": [
          "Account"
        ],
        "x-credit-cost": {
          "credits": 0,
          "per": "call"
        },
        "responses": {
          "200": {
            "description": "The packs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Packs"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "431": {
            "$ref": "#/components/responses/HeaderTooLarge"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "sk_live_… key from the console (https://smarterdata.ai/app/)."
      }
    },
    "schemas": {
      "Envelope": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "entity": {
            "type": "string"
          },
          "count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Records in this answer. null on a contact count or estimate of a segment under 25 companies."
          },
          "credits_used": {
            "type": "integer"
          },
          "credits_remaining": {
            "type": "integer"
          },
          "estimate": {
            "type": "boolean",
            "description": "true on an answer to estimate=true."
          },
          "credit_cost": {
            "type": [
              "integer",
              "null"
            ],
            "description": "On estimate=true."
          },
          "credits_per_record": {
            "type": "integer",
            "description": "On a contact estimate."
          },
          "has_more": {
            "type": "boolean"
          },
          "total_matching": {
            "type": "integer"
          },
          "pagination_mode": {
            "type": "string"
          },
          "definition": {
            "type": "string",
            "description": "On contact answers: named_dm_strict or any_reachable_person."
          },
          "already_delivered": {
            "type": [
              "boolean",
              "integer"
            ],
            "description": "true on a record you bought in the last 12 months; on a reveal, how many contacts were withheld for that reason."
          },
          "replayed": {
            "type": "boolean",
            "description": "true on a retry with the same idempotency-key."
          },
          "original_credits_used": {
            "type": "integer",
            "description": "On a replay: what the first call paid."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "On GET /v1/me/list."
          },
          "window_days": {
            "type": "integer",
            "description": "On GET /v1/me/list."
          },
          "note": {
            "type": "string"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "records": {
            "type": "array",
            "items": {}
          }
        }
      },
      "CompanyList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          },
          {
            "type": "object",
            "properties": {
              "records": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          }
        ]
      },
      "ContactList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          },
          {
            "type": "object",
            "properties": {
              "records": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          }
        ]
      },
      "RevealedContactList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          },
          {
            "type": "object",
            "properties": {
              "records": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RevealedContact"
                }
              }
            }
          }
        ]
      },
      "LiveList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Envelope"
          },
          {
            "type": "object",
            "properties": {
              "live": {
                "type": "boolean"
              },
              "fetched_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the page was really fetched; the oldest page of a walk."
              },
              "origin": {
                "type": "string",
                "enum": [
                  "live",
                  "store",
                  "mixed"
                ]
              },
              "page": {
                "type": "integer"
              },
              "pages_fetched": {
                "type": "integer",
                "description": "Map listings only."
              },
              "page_size": {
                "type": "integer",
                "description": "Map listings only."
              },
              "next_page": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "null at the end."
              },
              "upstream_error": {
                "type": "string",
                "description": "Set when a walk stopped early; pages not fetched were refunded."
              },
              "knowledge": {
                "type": "object",
                "description": "Web search only: the knowledge panel, when there is one."
              }
            }
          }
        ]
      },
      "Company": {
        "type": "object",
        "description": "Every column is always present; unknown = null.",
        "examples": [
          {
            "business_id": "co:d:examplepaving.com",
            "name": "Example Paving Co.",
            "niche": "concrete_paving",
            "niche_refined": "concrete_paving",
            "sector": "Construction",
            "naics": "238110",
            "street": "1402 Oak St",
            "city": "Dallas",
            "state": "TX",
            "zip": "75204",
            "lat": 32.8007,
            "lon": -96.7899,
            "phone": "2145550142",
            "domain": "examplepaving.com",
            "domain_status": null,
            "employees": 12,
            "employees_band": "10-49",
            "revenue_est": 3200000,
            "revenue_band": "1-10M",
            "is_public": null,
            "quality_score": 85,
            "service_lines": [
              "concrete_paving",
              "general_contractor"
            ],
            "is_multi_location": false,
            "origins": [
              "map_listing",
              "web_presence"
            ],
            "size_source": "measured",
            "is_dissolved": false,
            "is_listing_name": false
          }
        ],
        "properties": {
          "business_id": {
            "type": "string",
            "description": "Opaque; store as received."
          },
          "name": {
            "type": "string"
          },
          "niche": {
            "type": [
              "string",
              "null"
            ]
          },
          "niche_refined": {
            "type": [
              "string",
              "null"
            ]
          },
          "sector": {
            "type": [
              "string",
              "null"
            ]
          },
          "naics": {
            "type": [
              "string",
              "null"
            ]
          },
          "street": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "lat": {
            "type": [
              "number",
              "null"
            ]
          },
          "lon": {
            "type": [
              "number",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "10 digits."
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "domain_status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              null,
              "mismatch",
              "social_link",
              "directory_listing",
              "unverified"
            ]
          },
          "employees": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employees_band": {
            "type": "string"
          },
          "revenue_est": {
            "type": [
              "number",
              "null"
            ],
            "description": "Modeled estimate, never reported financials."
          },
          "revenue_band": {
            "type": "string"
          },
          "is_public": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "quality_score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "service_lines": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "is_multi_location": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "origins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "size_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_dissolved": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_listing_name": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "bought_at": {
            "type": "string",
            "format": "date-time",
            "description": "Only on GET /v1/me/list."
          }
        }
      },
      "Contact": {
        "type": "object",
        "description": "One contact at one company, as flat fields: the record of GET /v1/contacts and of the contacts in GET /v1/me/list. It carries every channel it holds.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Opaque, ct:h: + 24 hex."
          },
          "business_id": {
            "type": "string"
          },
          "company_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_class": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "person",
              "person_business_inbox",
              "business_inbox",
              "owner_name_only",
              "linkedin_only",
              "person_office_only",
              "other",
              null
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "seniority": {
            "type": "string",
            "enum": [
              "executive",
              "operational",
              "financial",
              "owner_operator",
              "staff",
              "unknown"
            ]
          },
          "is_decision_maker": {
            "type": "boolean"
          },
          "level": {
            "type": [
              "string",
              "null"
            ]
          },
          "function": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "personal",
              "business",
              null
            ]
          },
          "cell": {
            "type": [
              "string",
              "null"
            ]
          },
          "office": {
            "type": [
              "string",
              "null"
            ]
          },
          "linkedin": {
            "type": [
              "string",
              "null"
            ]
          },
          "origin": {
            "type": "string"
          },
          "bought_at": {
            "type": "string",
            "format": "date-time",
            "description": "Only on GET /v1/me/list."
          }
        }
      },
      "RevealedContact": {
        "type": "object",
        "description": "One contact of the company a reveal names (GET /v1/companies/{business_id}/contacts). channels holds only the channels you asked for.",
        "examples": [
          {
            "id": "ct:h:3f9a51c07be2d48e6a1c0d27",
            "business_id": "co:d:examplepaving.com",
            "company_name": "Example Paving Co.",
            "contact_class": "person",
            "name": "Jordan Doe",
            "first_name": "Jordan",
            "last_name": "Doe",
            "title": "Owner",
            "seniority": "owner_operator",
            "is_decision_maker": true,
            "is_chain_contact": false,
            "city": "Dallas",
            "state": "TX",
            "channels": {
              "email": {
                "value": "jordan@examplepaving.com",
                "type": "personal",
                "status": "unverified"
              },
              "cell": {
                "value": "2145550177",
                "type": "personal",
                "line_type": "unknown"
              },
              "office": {
                "value": "2145550142",
                "type": "business"
              }
            },
            "email_capable": true,
            "sms_capable": true,
            "call_capable": true,
            "linkedin": null,
            "origin": "web_presence"
          }
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Opaque, ct:h: + 24 hex."
          },
          "business_id": {
            "type": "string"
          },
          "company_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_class": {
            "type": "string",
            "enum": [
              "person",
              "person_business_inbox",
              "business_inbox",
              "owner_name_only",
              "linkedin_only",
              "person_office_only",
              "other"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "seniority": {
            "type": "string",
            "enum": [
              "executive",
              "operational",
              "financial",
              "owner_operator",
              "staff",
              "unknown"
            ]
          },
          "is_decision_maker": {
            "type": "boolean"
          },
          "level": {
            "type": [
              "string",
              "null"
            ]
          },
          "function": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_chain_contact": {
            "type": "boolean"
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "channels": {
            "type": "object",
            "properties": {
              "email": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "business"
                    ]
                  },
                  "status": {
                    "type": "string"
                  }
                }
              },
              "cell": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "line_type": {
                    "type": "string"
                  }
                }
              },
              "office": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  }
                }
              },
              "linkedin": {
                "type": "object",
                "description": "Only when channels asks for linkedin.",
                "properties": {
                  "value": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "email_capable": {
            "type": "boolean"
          },
          "sms_capable": {
            "type": "boolean"
          },
          "call_capable": {
            "type": "boolean"
          },
          "linkedin": {
            "type": [
              "string",
              "null"
            ]
          },
          "origin": {
            "type": "string"
          }
        }
      },
      "EmailVerification": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "entity": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "mx_ok",
              "no_mail_host",
              "invalid_syntax",
              "unknown"
            ]
          },
          "mx": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "cached": {
            "type": "boolean"
          },
          "verified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "origin": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "live",
              "store",
              null
            ]
          },
          "smtp": {
            "type": "string",
            "description": "With smtp: true and a mail host: the status of the deep-check job."
          },
          "job_id": {
            "type": "string",
            "description": "The deep-check job, for GET /v1/jobs/{id}."
          },
          "credits_held": {
            "type": "integer"
          },
          "credits_used": {
            "type": "integer"
          },
          "credits_remaining": {
            "type": "integer"
          },
          "replayed": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "JobSubmitted": {
        "type": "object",
        "required": [
          "ok",
          "job_id"
        ],
        "description": "The answer of POST /v1/verify/bulk and POST /v1/scrape.",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "job_id": {
            "type": "string",
            "description": "For GET /v1/jobs/{id}."
          },
          "total": {
            "type": "integer",
            "description": "Items in the job, duplicates removed."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "complete",
              "failed",
              "cancelled"
            ]
          },
          "credits_held": {
            "type": "integer",
            "description": "While the job is open."
          },
          "credits_used": {
            "type": "integer",
            "description": "On a replay of a job that is no longer open."
          },
          "credits_remaining": {
            "type": "integer"
          },
          "duplicates_removed": {
            "type": "integer"
          },
          "replayed": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "Job": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "the same as kind"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "complete",
              "failed",
              "cancelled"
            ]
          },
          "done": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "credits_held": {
            "type": "integer",
            "description": "While the job is queued or running."
          },
          "credits_used": {
            "type": "integer"
          },
          "credits_remaining": {
            "type": "integer"
          },
          "error": {
            "description": "On a failed or cancelled job."
          },
          "records": {
            "type": "array",
            "items": {}
          }
        }
      },
      "Account": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "credits": {
            "type": "integer",
            "description": "Your balance."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "prefix": {
                  "type": "string"
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "status": {
                  "type": "string"
                },
                "last_used_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              }
            }
          },
          "plan": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "monthly_allowance": {
                "type": "integer"
              }
            }
          },
          "status": {
            "type": "string",
            "description": "active, or suspended."
          }
        }
      },
      "Usage": {
        "type": "object",
        "required": [
          "ok",
          "usage",
          "ledger"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "usage": {
            "type": "array",
            "description": "The last 30 days, one entry per action that was charged.",
            "items": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "description": "A key of the price table, e.g. company_search."
                },
                "units": {
                  "type": "integer",
                  "description": "Net credits: refunds taken off."
                },
                "calls": {
                  "type": "integer"
                }
              }
            }
          },
          "ledger": {
            "type": "array",
            "description": "The last 25 ledger entries, newest first.",
            "items": {
              "type": "object",
              "properties": {
                "delta": {
                  "type": [
                    "integer",
                    "string"
                  ],
                  "description": "Credits added (above 0) or taken (below 0). A whole number, which may arrive as a string."
                },
                "reason": {
                  "type": "string"
                },
                "balance_after": {
                  "type": [
                    "integer",
                    "string",
                    "null"
                  ],
                  "description": "The balance after this entry. A whole number, which may arrive as a string."
                },
                "shortfall": {
                  "type": [
                    "integer",
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "Packs": {
        "type": "object",
        "required": [
          "ok",
          "packs"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "packs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "credits": {
                  "type": "integer"
                },
                "amount_cents": {
                  "type": "integer"
                }
              }
            }
          },
          "plan": {
            "type": "string"
          },
          "billing": {
            "type": "string",
            "description": "\"live\" when purchases are open."
          },
          "note": {
            "type": "string"
          }
        }
      },
      "Schema": {
        "type": "object",
        "required": [
          "ok"
        ],
        "description": "The contract of the running build. See https://smarterdata.ai/docs/#v1-schema.",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "company_filters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contact_filters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "values": {
            "type": "object",
            "description": "The words each value filter accepts."
          },
          "routes": {
            "type": "object",
            "description": "The query parameters each route accepts.",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "count_entities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "credits": {
            "type": "object",
            "description": "The price table your account pays, in credits."
          },
          "coverage_min_segment": {
            "type": "integer"
          },
          "list_window_days": {
            "type": "integer"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "const": false
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Machine-stable; see https://smarterdata.ai/docs/#errors."
              },
              "message": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              }
            }
          },
          "credits_used": {
            "type": "integer"
          },
          "credits_remaining": {
            "type": "integer",
            "description": "On a 402: your balance."
          },
          "credits_needed": {
            "type": "integer",
            "description": "On a 402: what the call needs."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "A malformed request. Codes: unknown_filter (a parameter name the route does not take), empty_filter, bad_boolean, bad_limit, bad_number, bad_channels, bad_entity, bad_redeliver_after_days, offset_not_supported, segment_too_small, page_range, q_required, email_required, bad_request. Nothing charged.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "invalid_api_key: the key is missing, unknown or revoked.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InsufficientCredits": {
        "description": "insufficient_credits: the balance cannot cover the call (for a job: the most it can cost). The answer adds credits_remaining and credits_needed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "example": {
                "value": {
                  "ok": false,
                  "error": {
                    "code": "insufficient_credits",
                    "message": "this call needs 5 credits; your balance is 2 — top up in the console; nothing was charged",
                    "request_id": "7d2f9c1e-5b0a-4c8e-9f31-2a6b4e8d0c57"
                  },
                  "credits_used": 0,
                  "credits_remaining": 2,
                  "credits_needed": 5
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Codes: scope_required (the result holds a cell number or a personal email and the key has no personal_data scope), api_key_required (a paid call from a console session: records leave only through an API key), account_suspended, login_not_accepted (a console sign-in that cannot open an account). Nothing charged.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "not_found: no company with that business_id, or no such job on your account. A path the API does not have answers the same code.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "Codes: company_required (a reveal for a company your account does not hold yet: get the company first), idempotency_conflict (the same idempotency-key with a different request), idempotency_in_progress (the first call with this key was interrupted on our side: retry in a few minutes). Nothing charged.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "payload_too_large: the body is over 1 MB.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "UnsupportedMediaType": {
        "description": "unsupported_media_type: the body has a content type the API does not parse. Send application/json.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Codes: rate_limited (requests per key; calls that carry name=; estimates running at once), live_rate_limited (live pages per account per minute), daily_cap_reached (the daily credit cap of the key), auth_rate_limited (unknown keys from one address), list_download_running (a second CSV download of your list). Retry after the Retry-After header when present. Nothing charged.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "HeaderTooLarge": {
        "description": "request_header_too_large: the request line and headers are over 16 KB, usually a very long query string. This answer carries no request_id. Nothing charged.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServerError": {
        "description": "internal_error: a fault on our side. A charge of that request is refunded. Retry with the same idempotency-key and quote the request_id if it happens again.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "BadGateway": {
        "description": "upstream_unavailable: the live source failed. The hold is refunded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unavailable": {
        "description": "Codes: busy (the data service is at capacity: retry in a few seconds), upstream_unavailable, upstream_paused or upstream_busy (a live, verification or crawl source cannot answer now), job_interrupted (a job was closed before its hold was taken: submit it again), auth_unavailable (a console sign-in could not be checked). Nothing charged.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
