# get_market_stats

**Market statistics from SBA loan data** · Live · Lookup: 1,000 free a month, then 0.5 credits. See [all MCP tools](/reference/mcp).

## Result

Captured from the docs' test data, whose clock reads October 5, 2026, calling as a buyer's AI host on `/mcp`, `/mcp/broker`, `/mcp/readonly`. The result is the same on each path. IDs are placeholders. Arguments:

```json
{
  "naics": "238220",
  "state": "TX"
}
```

Text:

````markdown
**SBA acquisition loans: 61[1]**
7(a) and 504 change-of-ownership loans, NAICS 238220, TX, FY2022–FY2026

SBA's loan file shows 61 acquisition loans approved for NAICS 238220 in TX in FY2022–FY2026 (59 7(a) and 2 504); the median loan was $756,000.

Median loan: $756,000[2] · Median rate, 7(a): 9.50%[2]

**Inputs:** NAICS 238220 (supplied by the caller) · state TX (supplied by the caller) · fiscal years FY2022–FY2026[1] (U.S. SBA, 7(a) and 504 loan data, 7(a) and 504 loans with BusinessAge "Change of Ownership", as of Jun 30, 2026)

| Fiscal year | Acquisition loans | Median loan |
| --- | --- | --- |
| FY2022 | 4[1] | no data |
| FY2023 | 2[1] | no data |
| FY2024 | 16[1] | $640,500[2] |
| FY2025 | 19[1] | $787,400[2] |
| FY2026 | 20[1] | $701,000[2] |

Total approved: $56,636,800.
Charge-offs: 0.0% of the dollars that went out.

**What moves it:** a shorter NAICS prefix, no state or more fiscal years widens the count.

Only SBA-financed purchases, not every sale: deals paid in cash or with a conventional loan aren't in SBA's file.
- FY2026 runs through Jun 30, 2026 in this file.
- 50 of the 50 loans that went out are still outstanding, their status withheld by SBA under FOIA Exemption 4, so later charge-offs aren't counted yet.

**Sources**
1. Source: U.S. SBA, 7(a) and 504 loan data, 7(a) and 504 loans with BusinessAge "Change of Ownership", as of Jun 30, 2026
2. Computed by Acquestor from the inputs above

Information, not advice. Check it with your lender, CPA or attorney before you rely on it.
Charged: 0 credits (monthly free call).

**Next steps**
- Find lenders: find_sba_lenders {"naics":"238220","state":"TX"}. Price: free for the first 1,000 API and MCP calls a month, then 0.5 credits.
- Run the SBA price ceiling: compute_sba_price_ceiling {"naics":"238220"}. Price: 5 credits.

**All fields** (a figure with no marker cites s1)
```json
{"naics":"238220","state":"TX","fiscal_years_covered":{"from":{"value":2022,"unit":"year","source":"s1","note":"NAICS 238220, project state TX, 7(a) and 504 loans with BusinessAge \"Change of Ownership\""},"to":{"value":2026,"unit":"year","source":"s1","note":"NAICS 238220, project state TX, 7(a) and 504 loans with BusinessAge \"Change of Ownership\""}},"acquisition_loans":"61 count","loans_7a":"59 count","loans_504":"2 count","total_amount":"56636800 USD","median_loan":"756000 USD [c1]","median_rate":"0.095 rate [c1]","charge_off_rate":"0 share [c1]","by_fiscal_year":[{"fiscal_year":2022,"loans":"4 count","median_loan":"no value USD [c1]"},{"fiscal_year":2023,"loans":"2 count","median_loan":"no value USD [c1]"},{"fiscal_year":2024,"loans":"16 count","median_loan":"640500 USD [c1]"},{"fiscal_year":2025,"loans":"19 count","median_loan":"787400 USD [c1]"},{"fiscal_year":2026,"loans":"20 count","median_loan":"701000 USD [c1]"}]}
```

Acquestor doesn't represent buyers or sellers.
````

`structuredContent`:

```json
{
  "data": {
    "naics": "238220",
    "state": "TX",
    "fiscal_years_covered": {
      "from": {
        "value": 2022,
        "unit": "year",
        "source": "s1",
        "note": "NAICS 238220, project state TX, 7(a) and 504 loans with BusinessAge \"Change of Ownership\""
      },
      "to": {
        "value": 2026,
        "unit": "year",
        "source": "s1",
        "note": "NAICS 238220, project state TX, 7(a) and 504 loans with BusinessAge \"Change of Ownership\""
      }
    },
    "acquisition_loans": {
      "value": 61,
      "unit": "count",
      "source": "s1"
    },
    "loans_7a": {
      "value": 59,
      "unit": "count",
      "source": "s1"
    },
    "loans_504": {
      "value": 2,
      "unit": "count",
      "source": "s1"
    },
    "total_amount": {
      "value": 56636800,
      "unit": "USD",
      "source": "s1"
    },
    "median_loan": {
      "value": 756000,
      "unit": "USD",
      "source": "c1"
    },
    "median_rate": {
      "value": 0.095,
      "unit": "rate",
      "source": "c1"
    },
    "charge_off_rate": {
      "value": 0,
      "unit": "share",
      "source": "c1"
    },
    "by_fiscal_year": [
      {
        "fiscal_year": 2022,
        "loans": {
          "value": 4,
          "unit": "count",
          "source": "s1"
        },
        "median_loan": {
          "value": null,
          "unit": "USD",
          "source": "c1"
        }
      },
      {
        "fiscal_year": 2023,
        "loans": {
          "value": 2,
          "unit": "count",
          "source": "s1"
        },
        "median_loan": {
          "value": null,
          "unit": "USD",
          "source": "c1"
        }
      },
      {
        "fiscal_year": 2024,
        "loans": {
          "value": 16,
          "unit": "count",
          "source": "s1"
        },
        "median_loan": {
          "value": 640500,
          "unit": "USD",
          "source": "c1"
        }
      },
      {
        "fiscal_year": 2025,
        "loans": {
          "value": 19,
          "unit": "count",
          "source": "s1"
        },
        "median_loan": {
          "value": 787400,
          "unit": "USD",
          "source": "c1"
        }
      },
      {
        "fiscal_year": 2026,
        "loans": {
          "value": 20,
          "unit": "count",
          "source": "s1"
        },
        "median_loan": {
          "value": 701000,
          "unit": "USD",
          "source": "c1"
        }
      }
    ]
  },
  "sources": [
    {
      "id": "s1",
      "source_id": "sba-foia-7a-504",
      "name": "SBA 7(a) and 504 loan data (FOIA)",
      "publisher": "U.S. Small Business Administration",
      "dataset": "7(a) and 504 loan data, 7(a) and 504 loans with BusinessAge \"Change of Ownership\"",
      "basis": "public_record",
      "route": "served_directly",
      "licence_status": "cleared",
      "as_of": "2026-06-30",
      "url": "https://data.sba.gov/dataset/7a-504-foia",
      "line": "Source: U.S. SBA, 7(a) and 504 loan data, 7(a) and 504 loans with BusinessAge \"Change of Ownership\", as of Jun 30, 2026",
      "retrieved_at": "2026-10-05"
    }
  ],
  "gaps": [],
  "disclaimer": "informational",
  "computation": {
    "id": "c1",
    "method": "sba_market_stats",
    "method_version": "1.0.0",
    "computed_at": "2026-10-05T15:02:11.000Z",
    "rule_sets": [],
    "inputs": {
      "fiscal_year_from": {
        "value": 2022,
        "unit": "year",
        "source": "s1",
        "note": "NAICS 238220, project state TX, 7(a) and 504 loans with BusinessAge \"Change of Ownership\""
      },
      "fiscal_year_to": {
        "value": 2026,
        "unit": "year",
        "source": "s1",
        "note": "NAICS 238220, project state TX, 7(a) and 504 loans with BusinessAge \"Change of Ownership\""
      },
      "acquisition_loans": {
        "value": 61,
        "unit": "count",
        "source": "s1"
      },
      "charged_off_amount": {
        "value": 0,
        "unit": "USD",
        "source": "s1"
      },
      "approved_amount_disbursed": {
        "value": 48227800,
        "unit": "USD",
        "source": "s1"
      }
    }
  },
  "warnings": [
    {
      "code": "partial_fiscal_year",
      "detail": "FY2026 runs through Jun 30, 2026 in this file."
    },
    {
      "code": "charge_offs_understated",
      "detail": "50 of the 50 loans that went out are still outstanding, their status withheld by SBA under FOIA Exemption 4, so later charge-offs aren't counted yet."
    }
  ],
  "charge": {
    "credits": 0,
    "price_class": "lookup",
    "balance_after": 1005,
    "free_call": true
  },
  "actions": [
    {
      "label": "Find lenders",
      "tool": "find_sba_lenders",
      "arguments": {
        "naics": "238220",
        "state": "TX"
      },
      "price_line": "Price: free for the first 1,000 API and MCP calls a month, then 0.5 credits."
    },
    {
      "label": "Run the SBA price ceiling",
      "tool": "compute_sba_price_ceiling",
      "arguments": {
        "naics": "238220"
      },
      "price_line": "Price: 5 credits."
    }
  ]
}
```

## Inputs

The input schema the server lists. Every input is a flat field. Every object is closed with `additionalProperties: false`.

| Input | Type | Required | Rules | Description |
| --- | --- | --- | --- | --- |
| `naics` | string | no | matches `^[0-9]{2,6}$` | NAICS code, 2 to 6 digits. |
| `state` | string | no | matches `^[A-Z]{2}$` | US state as a 2-letter code. |
| `fiscal_years` | integer | no | at least 1; at most 35; default `5` | Number of SBA fiscal years to include, counting back from the latest in the file. |
| `as_of` | string (date) | no |  | Date (YYYY-MM-DD) whose rules and rates apply; defaults to today. |

## For client developers

What the host’s model reads:

> Returns how many SBA 7(a) and 504 acquisition loans were approved for an industry and state, with their total, median size, median rate, charge-off rate and the count by fiscal year, from SBA's loan data. Use it to size how often businesses like this one are bought with SBA financing; to see which lenders made those loans, use find_sba_lenders. It counts no loans before fiscal 2019 and only SBA-financed purchases, not every sale.

| | |
| --- | --- |
| Runs | `GET /explore/market-stats` (getMarketStats) |
| Who | Everyone |
| Endpoint paths | `/mcp`, `/mcp/broker`, `/mcp/readonly` |
| Scope | `tools:run` |
| Price | Lookup: 1,000 free a month, then 0.5 credits |
| Risk | read: read-only yes, destructive no, idempotent yes, open-world no |
| Output | Card type `market_stats`. The text is the card in Markdown, with every field the card doesn't show stated under "All fields"; `structuredContent` is the result envelope without the card. |
| Output schema | Declared: The outputSchema lists the top-level fields of structuredContent and their types, generated from the response schema in the API definition; none is required, so a result with only gaps still validates (API 0.6.0). |
| Definition cost | 253 tokens (o200k_base) for its name, description and input schema, measured on the definition captured from the server, which the docs tests hold to this build's code (2026-11-12) |
| Eval cases | None yet |

Generated on 2026-11-12 from the API definition and this tool's card; the definition, result and errors on this page were captured from the server.

## Bounds

A result counts its text and `structuredContent` together against a default of 6,000 tokens and a hard cap of 25,000. Nulls and internal fields are left out, and `structuredContent` leaves out the card the text already is.

get_market_stats is a computed tool, so its rows are one answer and are never cut to fit the default: the result is kept whole, and fits the default with ordinary inputs. A result past the hard cap loses the end of its text and its large fields, and names a narrower call.

## Errors

A failed call returns `isError: true`. The text opens with the stable code, then says what went wrong, whether retrying the same call can succeed, and the request ID; `structuredContent` is the problem object, and `_meta` repeats the code and request ID. Each error below was captured from the server; the code links to its problem page.

| Code | Captured by | Next call |
| --- | --- | --- |
| [`invalid_input`](/problems/invalid_input) | Calling it as a buyer's AI host on `/mcp` | Call again with a NAICS code of 2 to 6 digits, such as 238220, or leave it out to count every industry. |
| [`insufficient_scope`](/problems/insufficient_scope) | Calling it as an API key with no scopes on `/mcp` | Reconnect with a key or sign-in that carries `tools:run`, then call get_market_stats again. |
| [`insufficient_credits`](/problems/insufficient_credits) | Not captured. Past the free lookups each month, the member's balance doesn't cover the call. | Add credits on acquestor.com, then call get_market_stats again. Nothing ran and nothing was charged. |

Without a credential the server answers HTTP 401 before any tool runs, with a `WWW-Authenticate` header that points the host at sign-in ([`unauthorized`](/problems/unauthorized)).

### `invalid_input`

Arguments:

```json
{
  "naics": "23A"
}
```

Text:

```text
invalid_input: Invalid arguments for tool get_market_stats: data/naics must match pattern "^[0-9]{2,6}$". Check the tool's input schema for each field's type. Retrying the same call unchanged will fail the same way. Request ID req_00000000000000000000000000000001.
```

### `insufficient_scope`

Arguments:

```json
{
  "naics": "238220",
  "state": "TX"
}
```

Text:

```text
insufficient_scope: This call needs the tools:run scope. Retrying the same call unchanged will fail the same way. Request ID req_00000000000000000000000000000001.
```

---

Source: https://docs.acquestor.com/reference/mcp/get_market_stats

Help: support@acquestor.com · [Report a security problem](https://docs.acquestor.com/security)

Information, not advice. Acquestor doesn't represent buyers or sellers and takes no fee on any deal.

Not affiliated with or endorsed by the U.S. Small Business Administration. Claude, ChatGPT and Grok are trademarks of their owners. Fonts: Source Serif 4, Public Sans and Source Code Pro, SIL Open Font License.
