data-analyst-mcp 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -4
- package/dist/adapters/bjs.d.ts +13 -0
- package/dist/adapters/bjs.js +28 -0
- package/dist/adapters/bjs.js.map +1 -0
- package/dist/adapters/cbp.d.ts +5 -0
- package/dist/adapters/cbp.js +64 -0
- package/dist/adapters/cbp.js.map +1 -0
- package/dist/adapters/cdc-wonder.d.ts +5 -0
- package/dist/adapters/cdc-wonder.js +68 -0
- package/dist/adapters/cdc-wonder.js.map +1 -0
- package/dist/adapters/cpsc.d.ts +4 -0
- package/dist/adapters/cpsc.js +125 -0
- package/dist/adapters/cpsc.js.map +1 -0
- package/dist/adapters/fhwa.d.ts +9 -0
- package/dist/adapters/fhwa.js +16 -0
- package/dist/adapters/fhwa.js.map +1 -0
- package/dist/adapters/foreign-assistance.d.ts +9 -0
- package/dist/adapters/foreign-assistance.js +42 -0
- package/dist/adapters/foreign-assistance.js.map +1 -0
- package/dist/adapters/hud-ahar.d.ts +3 -0
- package/dist/adapters/hud-ahar.js +80 -0
- package/dist/adapters/hud-ahar.js.map +1 -0
- package/dist/adapters/nces.d.ts +10 -0
- package/dist/adapters/nces.js +32 -0
- package/dist/adapters/nces.js.map +1 -0
- package/dist/adapters/nsf.d.ts +11 -0
- package/dist/adapters/nsf.js +25 -0
- package/dist/adapters/nsf.js.map +1 -0
- package/dist/adapters/onrr.d.ts +9 -0
- package/dist/adapters/onrr.js +35 -0
- package/dist/adapters/onrr.js.map +1 -0
- package/dist/adapters/sba.d.ts +10 -0
- package/dist/adapters/sba.js +134 -0
- package/dist/adapters/sba.js.map +1 -0
- package/dist/adapters/treasury-tic.d.ts +30 -0
- package/dist/adapters/treasury-tic.js +149 -0
- package/dist/adapters/treasury-tic.js.map +1 -0
- package/dist/adapters/uscourts.d.ts +8 -0
- package/dist/adapters/uscourts.js +8 -0
- package/dist/adapters/uscourts.js.map +1 -0
- package/dist/analysis/cite.d.ts +9 -1
- package/dist/analysis/cite.js +9 -2
- package/dist/analysis/cite.js.map +1 -1
- package/dist/bin/cli.d.ts +2 -0
- package/dist/bin/cli.js +17 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/core/generic-rest.js +42 -17
- package/dist/core/generic-rest.js.map +1 -1
- package/dist/core/guard.d.ts +32 -0
- package/dist/core/guard.js +176 -0
- package/dist/core/guard.js.map +1 -0
- package/dist/core/http.d.ts +10 -0
- package/dist/core/http.js +36 -7
- package/dist/core/http.js.map +1 -1
- package/dist/core/keys.d.ts +13 -3
- package/dist/core/keys.js +67 -7
- package/dist/core/keys.js.map +1 -1
- package/dist/core/package.d.ts +12 -3
- package/dist/core/package.js +56 -12
- package/dist/core/package.js.map +1 -1
- package/dist/core/secret_patterns.d.ts +6 -0
- package/dist/core/secret_patterns.js +20 -0
- package/dist/core/secret_patterns.js.map +1 -0
- package/dist/core/tabular.d.ts +43 -1
- package/dist/core/tabular.js +149 -6
- package/dist/core/tabular.js.map +1 -1
- package/dist/envelope.js +3 -1
- package/dist/envelope.js.map +1 -1
- package/dist/index.d.ts +29 -22
- package/dist/index.js +45 -46
- package/dist/index.js.map +1 -1
- package/dist/remote/app.js +87 -31
- package/dist/remote/app.js.map +1 -1
- package/dist/remote/oauth.js +8 -1
- package/dist/remote/oauth.js.map +1 -1
- package/dist/remote/pages.d.ts +3 -7
- package/dist/remote/pages.js +49 -19
- package/dist/remote/pages.js.map +1 -1
- package/dist/remote/sign.d.ts +7 -1
- package/dist/remote/sign.js +33 -7
- package/dist/remote/sign.js.map +1 -1
- package/dist/remote/store.js +14 -5
- package/dist/remote/store.js.map +1 -1
- package/dist/report/audit_report.js +29 -7
- package/dist/report/audit_report.js.map +1 -1
- package/dist/report/build_report.js +34 -4
- package/dist/report/build_report.js.map +1 -1
- package/dist/report/method_audit.js +3 -0
- package/dist/report/method_audit.js.map +1 -1
- package/dist/report/scan_secrets.js +2 -13
- package/dist/report/scan_secrets.js.map +1 -1
- package/dist/server.d.ts +3 -1
- package/dist/server.js +44 -12
- package/dist/server.js.map +1 -1
- package/dist/tools.js +27 -6
- package/dist/tools.js.map +1 -1
- package/guide/assets/download_data.ps1 +2 -0
- package/guide/assets/download_data.sh +8 -2
- package/guide/references/routing.md +30 -3
- package/package.json +1 -1
- package/packs/bjs/endpoints.json +150 -0
- package/packs/bjs/policy.json +114 -0
- package/packs/bjs/source.md +98 -0
- package/packs/cbp/endpoints.json +31 -0
- package/packs/cbp/policy.json +85 -0
- package/packs/cbp/source.md +57 -0
- package/packs/cdc/source.md +1 -1
- package/packs/cdc-wonder/endpoints.json +26 -0
- package/packs/cdc-wonder/policy.json +84 -0
- package/packs/cdc-wonder/source.md +53 -0
- package/packs/college-scorecard/source.md +1 -1
- package/packs/cpsc/endpoints.json +91 -0
- package/packs/cpsc/policy.json +91 -0
- package/packs/cpsc/source.md +76 -0
- package/packs/dhs-ohss/source.md +1 -1
- package/packs/doj-news/source.md +1 -1
- package/packs/fbi/source.md +3 -3
- package/packs/fhwa/endpoints.json +48 -0
- package/packs/fhwa/policy.json +91 -0
- package/packs/fhwa/source.md +59 -0
- package/packs/foreign-assistance/endpoints.json +166 -0
- package/packs/foreign-assistance/policy.json +80 -0
- package/packs/foreign-assistance/source.md +76 -0
- package/packs/fsa/source.md +1 -1
- package/packs/hud/source.md +1 -1
- package/packs/hud-ahar/endpoints.json +92 -0
- package/packs/hud-ahar/policy.json +88 -0
- package/packs/hud-ahar/source.md +72 -0
- package/packs/naep/source.md +1 -1
- package/packs/nces/endpoints.json +101 -0
- package/packs/nces/policy.json +99 -0
- package/packs/nces/source.md +75 -0
- package/packs/nhtsa/source.md +1 -1
- package/packs/nsf/endpoints.json +33 -0
- package/packs/nsf/policy.json +83 -0
- package/packs/nsf/source.md +59 -0
- package/packs/onrr/endpoints.json +198 -0
- package/packs/onrr/policy.json +91 -0
- package/packs/onrr/source.md +55 -0
- package/packs/port.json +65 -0
- package/packs/sba/endpoints.json +34 -0
- package/packs/sba/policy.json +86 -0
- package/packs/sba/source.md +60 -0
- package/packs/treasury/source.md +1 -1
- package/packs/treasury-tic/endpoints.json +77 -0
- package/packs/treasury-tic/policy.json +89 -0
- package/packs/treasury-tic/source.md +80 -0
- package/packs/uscourts/endpoints.json +22 -0
- package/packs/uscourts/policy.json +87 -0
- package/packs/uscourts/source.md +56 -0
- package/packs/uspto/source.md +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "sba",
|
|
3
|
+
"title": "SBA loan data: 7(a) and 504 loans (FOIA loan-level files), activity reports, disaster loans",
|
|
4
|
+
"agency": "U.S. Small Business Administration",
|
|
5
|
+
"depth": "standard",
|
|
6
|
+
"domains": [
|
|
7
|
+
"small business",
|
|
8
|
+
"federal lending",
|
|
9
|
+
"federal spending"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"sba",
|
|
13
|
+
"small business administration",
|
|
14
|
+
"sba loans",
|
|
15
|
+
"7(a) loans",
|
|
16
|
+
"7a loans",
|
|
17
|
+
"504 loans",
|
|
18
|
+
"sba lenders",
|
|
19
|
+
"certified development company",
|
|
20
|
+
"small business lending",
|
|
21
|
+
"loan charge-offs",
|
|
22
|
+
"sba loans by state",
|
|
23
|
+
"sba loans by industry",
|
|
24
|
+
"disaster loans"
|
|
25
|
+
],
|
|
26
|
+
"questions": [
|
|
27
|
+
"SBA 7(a) loans approved in a state by fiscal year",
|
|
28
|
+
"504 loans by industry (NAICS)",
|
|
29
|
+
"largest SBA lenders",
|
|
30
|
+
"charge-off rate of SBA loans",
|
|
31
|
+
"SBA loans to restaurants in a state"
|
|
32
|
+
],
|
|
33
|
+
"homepage": "https://data.sba.gov/",
|
|
34
|
+
"terms_url": "https://data.sba.gov/",
|
|
35
|
+
"auth": {
|
|
36
|
+
"env": null,
|
|
37
|
+
"required": "none",
|
|
38
|
+
"placement": "none",
|
|
39
|
+
"signup_url": null,
|
|
40
|
+
"echoes_key": false
|
|
41
|
+
},
|
|
42
|
+
"limits": {
|
|
43
|
+
"rps": 1,
|
|
44
|
+
"burst": 2,
|
|
45
|
+
"max_rows": 1000000
|
|
46
|
+
},
|
|
47
|
+
"routes": {
|
|
48
|
+
"api": {
|
|
49
|
+
"base": "https://data.sba.gov",
|
|
50
|
+
"probe": "https://data.sba.gov/data.json",
|
|
51
|
+
"hosts": [
|
|
52
|
+
"data.sba.gov"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"manual": {
|
|
56
|
+
"how": "Open https://data.sba.gov/, find '7(a) & 504 FOIA', download the CSV (FOIA - 7(a) or 504, by period) and upload it with ingest; the filters apply to the uploaded file."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"cache": {
|
|
60
|
+
"mode": "run_only",
|
|
61
|
+
"ttl_hours": null,
|
|
62
|
+
"why": "Files are replaced quarterly (the as-of date is in the file name)."
|
|
63
|
+
},
|
|
64
|
+
"redistribution": {
|
|
65
|
+
"mode": "allowed",
|
|
66
|
+
"why": "SBA publishes these loan records under FOIA as public data; U.S. government works (17 U.S.C. 105)."
|
|
67
|
+
},
|
|
68
|
+
"notices": [],
|
|
69
|
+
"retention": null,
|
|
70
|
+
"citation": "U.S. Small Business Administration, {dataset}, data.sba.gov, retrieved {retrieved_long}.",
|
|
71
|
+
"audit_hooks": [],
|
|
72
|
+
"clarify": [
|
|
73
|
+
"Which program? 7(a) (lender loans with an SBA guaranty) or 504 (CDC loans for real estate and equipment, with a third-party lender part): they are different files and different dollars. Default: 7(a), said as such.",
|
|
74
|
+
"Approvals or outcomes? GrossApproval is the approved amount (504: the CDC's part; ThirdPartyDollars is the lender's); LoanStatus and GrossChargeOffAmount describe outcomes as of the file's date. Default: count and dollars approved by ApprovalFY."
|
|
75
|
+
],
|
|
76
|
+
"formats": [
|
|
77
|
+
"csv",
|
|
78
|
+
"json"
|
|
79
|
+
],
|
|
80
|
+
"aliases": [
|
|
81
|
+
"SBA",
|
|
82
|
+
"Small Business Administration",
|
|
83
|
+
"7(a)",
|
|
84
|
+
"504"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# SBA loan data: 7(a) and 504 loans (FOIA loan-level files), activity reports, disaster loans
|
|
2
|
+
Depth: standard. Key: none. The U.S. Small Business Administration's loan data on data.sba.gov:
|
|
3
|
+
- the 7(a) and 504 FOIA files: one row per approved loan since FY1991, with borrower, lender or Certified
|
|
4
|
+
Development Company, amount, dates, industry, location and status;
|
|
5
|
+
- through the catalog, the activity reports and disaster loan workbooks.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
- SBA 7(a) or 504 loans by state, county, congressional district, industry (NAICS), lender, fiscal year; loan
|
|
9
|
+
sizes; charge-offs and paid-in-full status; franchise loans.
|
|
10
|
+
- Not here: all federal loans and grants by recipient (usaspending); PPP loans (not in these files); bank
|
|
11
|
+
lending in general (fdic, fed-board); business counts (census CBP).
|
|
12
|
+
|
|
13
|
+
## Endpoints
|
|
14
|
+
| Endpoint | Returns | Parameters |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `list_files` | every file in data.sba.gov's catalog: `dataset`, `title`, `format`, `file` (the path for `foia`, CSVs only), `url`, `modified` | `search` (e.g. `7(a) & 504 FOIA`) |
|
|
17
|
+
| `foia` | the loans of one FOIA file that pass the filters, columns as published | `file` (from `list_files`), and at least one of `state` (ProjectState), `fiscal_year`, `from`/`to` (ApprovalFY), `naics` (prefix) |
|
|
18
|
+
|
|
19
|
+
Files of 2026-11-07 (as of September 30, 2026): `uploaded_resources/FOIA_7a_FY1991_FY1999_asof_260930`,
|
|
20
|
+
`..._FY2000_FY2009_...`, `..._FY2010_FY2019_...`, `..._FY2020_Present_...`, `uploaded_resources/FOIA_504_FY1991_FY2009_asof_260930`,
|
|
21
|
+
`..._504_FY2010_Present_...`. The as-of part changes each quarter: run `list_files` first.
|
|
22
|
+
|
|
23
|
+
## Spec example
|
|
24
|
+
```json
|
|
25
|
+
{"description": "504 loans in Vermont approved FY2024-2025",
|
|
26
|
+
"requests": [{"name": "files", "endpoint": "list_files", "params": {"search": "7(a) & 504 FOIA"}},
|
|
27
|
+
{"name": "vt_504", "endpoint": "foia", "params": {"file": "uploaded_resources/FOIA_504_FY2010_Present_asof_260930",
|
|
28
|
+
"state": "VT", "from": "2024", "to": "2025"}}]}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Data format and traps
|
|
32
|
+
- 504 columns (FOIA_504): AsOfDate, Program, LocationID, BorrName, BorrStreet, BorrCity, BorrState, BorrZip, CDC_Name ...,
|
|
33
|
+
ThirdPartyLender_Name, ThirdPartyLender_City, ThirdPartyLender_State, ThirdPartyDollars, GrossApproval,
|
|
34
|
+
ApprovalDate, ApprovalFY, FirstDisbursementDate, ProcessingMethod, TermInMonths, NaicsCode, NaicsDescription,
|
|
35
|
+
FranchiseCode, FranchiseName, ProjectCounty, ProjectState, SBADistrictOffice, CongressionalDistrict,
|
|
36
|
+
BusinessType, BusinessAge, LoanStatus, PaidInFullDate, ChargeOffDate, GrossChargeOffAmount, JobsSupported,
|
|
37
|
+
CollateralInd. 7(a) files have the lender instead of CDC and third-party columns (BankName, BankFDICNumber,
|
|
38
|
+
BankNCUANumber, BankStreet, BankCity, BankState, BankZip), plus SBAGuaranteedApproval, InitialInterestRate,
|
|
39
|
+
FixedorVariableInterestInd, RevolverStatus and SoldSecMrktInd. Read the data dictionary in `list_files`
|
|
40
|
+
(7a_504_foia_data_dictionary.xlsx) before use.
|
|
41
|
+
- `state` filters `ProjectState` (where the project is), not `BorrState`. ApprovalFY is the federal fiscal
|
|
42
|
+
year (October-September).
|
|
43
|
+
- Dollars are text with a decimal (`263000.0`). In 504 loans, `GrossApproval` is the CDC/SBA debenture and
|
|
44
|
+
`ThirdPartyDollars` the private lender's first lien: the project is larger than either. In 7(a),
|
|
45
|
+
`SBAGuaranteedApproval` is SBA's guaranteed part of `GrossApproval`: say which you sum.
|
|
46
|
+
- `LoanStatus` and charge-off fields are as of the file's `AsOfDate`: recent loans have had little time to
|
|
47
|
+
default. Compare charge-off rates by approval cohort, not across all years.
|
|
48
|
+
- Borrowers are named businesses (sometimes sole proprietors with a home address). Analyse in aggregate; do not
|
|
49
|
+
single out individuals.
|
|
50
|
+
- Size: the files are 60 to 255 MB. `fetch` streams them and keeps only the rows that pass the filters
|
|
51
|
+
(Vermont 504 FY2024-2025: 35 loans, about 7 s, on 2026-11-07).
|
|
52
|
+
|
|
53
|
+
## Access
|
|
54
|
+
No key. `fetch` uses data.sba.gov (`/data.json` for the catalog, `/sites/default/files/...` for files; the CKAN API
|
|
55
|
+
answers 404; verified 2026-11-07). Manual: download the CSV from data.sba.gov ("7(a) & 504 FOIA"), then `ingest`
|
|
56
|
+
with the same filters.
|
|
57
|
+
|
|
58
|
+
## Citation and terms
|
|
59
|
+
"U.S. Small Business Administration, 7(a) & 504 FOIA, <file> (as of <date>), data.sba.gov, retrieved <date>."
|
|
60
|
+
Public data released by SBA under FOIA.
|
package/packs/treasury/source.md
CHANGED
|
@@ -11,7 +11,7 @@ interest expense and average rates on the debt, the debt limit, auctions, exchan
|
|
|
11
11
|
rates for federal reporting; gifts to reduce the debt; savings bonds; buybacks.
|
|
12
12
|
- Not here: market yields and the daily par yield curve (treasury-yields); GDP and CPI (bea, bls, fred; or
|
|
13
13
|
the spec's `context` field here, for real dollars and "% of GDP"); budget projections (CBO); historical tables in
|
|
14
|
-
% of GDP and the President's budget (OMB); who holds the debt by country (
|
|
14
|
+
% of GDP and the President's budget (OMB); who holds the debt by country (treasury-tic, not Fiscal Data);
|
|
15
15
|
state and local finances (Census).
|
|
16
16
|
- Deliver data plus a short answer by default; a report only when asked (see `guide`).
|
|
17
17
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"base_url": "https://ticdata.treasury.gov/resource-center/data-chart-center/tic/Documents",
|
|
3
|
+
"timeout": 60,
|
|
4
|
+
"endpoints": {
|
|
5
|
+
"major_foreign_holders": {
|
|
6
|
+
"path": "/slt_table5.txt",
|
|
7
|
+
"method": "GET",
|
|
8
|
+
"description": "Major Foreign Holders of Treasury Securities (SLT Table 5): holdings by country, the latest 13 months, billions of dollars, plus All Other, Grand Total and the foreign-official split (bills, bonds and notes). One row per country and month.",
|
|
9
|
+
"params": {
|
|
10
|
+
"country": {
|
|
11
|
+
"in": "spec",
|
|
12
|
+
"desc": "keep only these rows: a country name as published (Japan; China, Mainland; Korea, South), or a list; case-insensitive. Omit for every row."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"records": "$tsv",
|
|
16
|
+
"header_row": 6,
|
|
17
|
+
"paging": {
|
|
18
|
+
"type": "none"
|
|
19
|
+
},
|
|
20
|
+
"max_rows": 10000
|
|
21
|
+
},
|
|
22
|
+
"major_foreign_holders_history": {
|
|
23
|
+
"path": "/mfhhis01.txt",
|
|
24
|
+
"method": "GET",
|
|
25
|
+
"description": "Major Foreign Holders history (mfhhis01.txt): the same table for every month from March 2000 through the last completed year, billions of dollars, one row per country and month. Series breaks are marked by footnotes in the file.",
|
|
26
|
+
"params": {
|
|
27
|
+
"country": {
|
|
28
|
+
"in": "spec",
|
|
29
|
+
"desc": "keep only these rows (a name as published, or a list; case-insensitive)"
|
|
30
|
+
},
|
|
31
|
+
"from": {
|
|
32
|
+
"in": "spec",
|
|
33
|
+
"desc": "first month to keep, YYYY-MM"
|
|
34
|
+
},
|
|
35
|
+
"to": {
|
|
36
|
+
"in": "spec",
|
|
37
|
+
"desc": "last month to keep, YYYY-MM"
|
|
38
|
+
},
|
|
39
|
+
"include_comparison": {
|
|
40
|
+
"in": "spec",
|
|
41
|
+
"desc": "true keeps the previous-series value of a series-break month (June 2002-2011, March 2000), marked comparison_only; default false"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"records": "$tsv",
|
|
45
|
+
"header_row": 0,
|
|
46
|
+
"paging": {
|
|
47
|
+
"type": "none"
|
|
48
|
+
},
|
|
49
|
+
"max_rows": 100000
|
|
50
|
+
},
|
|
51
|
+
"holdings_by_country": {
|
|
52
|
+
"path": "/slt_table1.txt",
|
|
53
|
+
"method": "GET",
|
|
54
|
+
"description": "SLT Table 1: U.S. long-term securities held by foreign residents, by country and month (from September 2011), millions of dollars: holdings, net U.S. sales and valuation change for Treasuries, agency bonds, corporate and other bonds, and equities.",
|
|
55
|
+
"params": {
|
|
56
|
+
"country": {
|
|
57
|
+
"in": "spec",
|
|
58
|
+
"desc": "keep only these countries (name as published, or the 5-digit TIC country code; a list works); case-insensitive"
|
|
59
|
+
},
|
|
60
|
+
"from": {
|
|
61
|
+
"in": "spec",
|
|
62
|
+
"desc": "first month to keep, YYYY-MM"
|
|
63
|
+
},
|
|
64
|
+
"to": {
|
|
65
|
+
"in": "spec",
|
|
66
|
+
"desc": "last month to keep, YYYY-MM"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"records": "$tsv",
|
|
70
|
+
"header_row": 9,
|
|
71
|
+
"paging": {
|
|
72
|
+
"type": "none"
|
|
73
|
+
},
|
|
74
|
+
"max_rows": 200000
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "treasury-tic",
|
|
3
|
+
"title": "Treasury International Capital (TIC): foreign holdings of U.S. Treasury and other securities",
|
|
4
|
+
"agency": "U.S. Department of the Treasury and Federal Reserve Board",
|
|
5
|
+
"depth": "standard",
|
|
6
|
+
"domains": [
|
|
7
|
+
"federal debt",
|
|
8
|
+
"international finance",
|
|
9
|
+
"capital flows"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"tic",
|
|
13
|
+
"treasury international capital",
|
|
14
|
+
"foreign holders",
|
|
15
|
+
"major foreign holders",
|
|
16
|
+
"foreign holdings of treasuries",
|
|
17
|
+
"who owns the debt",
|
|
18
|
+
"who holds the debt",
|
|
19
|
+
"china holdings",
|
|
20
|
+
"japan holdings",
|
|
21
|
+
"foreign official",
|
|
22
|
+
"foreign central banks",
|
|
23
|
+
"slt",
|
|
24
|
+
"cross-border securities",
|
|
25
|
+
"foreign purchases of u.s. securities",
|
|
26
|
+
"net foreign sales",
|
|
27
|
+
"capital flows",
|
|
28
|
+
"foreign-held debt"
|
|
29
|
+
],
|
|
30
|
+
"questions": [
|
|
31
|
+
"how much U.S. Treasury debt does China hold",
|
|
32
|
+
"largest foreign holders of Treasury securities",
|
|
33
|
+
"Japan's Treasury holdings over time",
|
|
34
|
+
"foreign official holdings of Treasury bills and bonds",
|
|
35
|
+
"foreign holdings of U.S. corporate bonds and stocks by country",
|
|
36
|
+
"net foreign purchases of Treasuries by country"
|
|
37
|
+
],
|
|
38
|
+
"homepage": "https://home.treasury.gov/data/treasury-international-capital-tic-system",
|
|
39
|
+
"terms_url": "https://home.treasury.gov/subfooter/site-policies-and-notices",
|
|
40
|
+
"auth": {
|
|
41
|
+
"env": null,
|
|
42
|
+
"required": "none",
|
|
43
|
+
"placement": "none",
|
|
44
|
+
"signup_url": null,
|
|
45
|
+
"echoes_key": false
|
|
46
|
+
},
|
|
47
|
+
"limits": {
|
|
48
|
+
"rps": 2,
|
|
49
|
+
"burst": 4,
|
|
50
|
+
"max_rows": 200000
|
|
51
|
+
},
|
|
52
|
+
"routes": {
|
|
53
|
+
"api": {
|
|
54
|
+
"base": "https://ticdata.treasury.gov/resource-center/data-chart-center/tic/Documents",
|
|
55
|
+
"probe": "https://ticdata.treasury.gov/resource-center/data-chart-center/tic/Documents/slt_table5.txt",
|
|
56
|
+
"hosts": [
|
|
57
|
+
"ticdata.treasury.gov"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"manual": {
|
|
61
|
+
"how": "Open the text files in a browser and save them: https://ticdata.treasury.gov/resource-center/data-chart-center/tic/Documents/slt_table5.txt (latest 13 months), .../mfhhis01.txt (history from 2000) or .../slt_table1.txt (long-term securities by country). Upload the saved .txt file with ingest."
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"cache": {
|
|
65
|
+
"mode": "run_only",
|
|
66
|
+
"ttl_hours": null,
|
|
67
|
+
"why": "Monthly releases revise the last months; data/ is reused within a run."
|
|
68
|
+
},
|
|
69
|
+
"redistribution": {
|
|
70
|
+
"mode": "allowed",
|
|
71
|
+
"why": "U.S. government work in the public domain (17 U.S.C. 105)."
|
|
72
|
+
},
|
|
73
|
+
"notices": [],
|
|
74
|
+
"retention": null,
|
|
75
|
+
"citation": "U.S. Department of the Treasury, Treasury International Capital (TIC) System, {dataset}, ticdata.treasury.gov, retrieved {retrieved_long}.",
|
|
76
|
+
"audit_hooks": [],
|
|
77
|
+
"clarify": [
|
|
78
|
+
"Which measure? Major Foreign Holders counts all Treasury securities (bills, bonds and notes) in billions; SLT Table 1 counts long-term securities only (no bills), in millions, and also covers agency, corporate bonds and stocks. Default: Major Foreign Holders for 'how much debt does X hold'.",
|
|
79
|
+
"Which months? slt_table5 has the latest 13 months; mfhhis01 has March 2000 through the last full year. Default: the latest month, with the year-earlier month for comparison."
|
|
80
|
+
],
|
|
81
|
+
"formats": [
|
|
82
|
+
"txt"
|
|
83
|
+
],
|
|
84
|
+
"aliases": [
|
|
85
|
+
"TIC",
|
|
86
|
+
"Treasury International Capital",
|
|
87
|
+
"Major Foreign Holders"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Treasury International Capital (TIC): foreign holdings of U.S. Treasury and other securities
|
|
2
|
+
Depth: standard. Key: none. The TIC system's published text tables on ticdata.treasury.gov. Major Foreign
|
|
3
|
+
Holders of Treasury Securities by country, monthly: the latest 13 months (SLT Table 5) and the history from
|
|
4
|
+
March 2000 (mfhhis01.txt), in billions. SLT Table 1: foreign holdings, net purchases and valuation changes of
|
|
5
|
+
U.S. long-term securities (Treasuries, agency bonds, corporate bonds, equities) by country, monthly from
|
|
6
|
+
September 2011, in millions.
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
- Who holds the U.S. debt abroad: holdings of Treasury securities by Japan, China, the UK and others;
|
|
10
|
+
rankings; trends; the foreign-official part (central banks and governments) and its split into bills and
|
|
11
|
+
bonds/notes.
|
|
12
|
+
- Foreign holdings of U.S. corporate bonds, agency bonds and stocks by country; net foreign purchases or
|
|
13
|
+
sales by month (long-term securities, Table 1).
|
|
14
|
+
- Not here: total debt held by the public and intragovernmental holdings (treasury: Debt to the Penny, MSPD);
|
|
15
|
+
the Fed's holdings and the full who-holds-what balance sheet (fed-board Z.1, table L.210); the balance of
|
|
16
|
+
payments and international investment position (bea); exchange rates (treasury, fred).
|
|
17
|
+
|
|
18
|
+
## Endpoints
|
|
19
|
+
| Endpoint | Returns | Parameters (all filter the published file; none is sent) |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `major_foreign_holders` | slt_table5.txt, long: `country`, `kind`, `period` (YYYY-MM), `holdings_billions`; the latest 13 months | `country` (a name or a list) |
|
|
22
|
+
| `major_foreign_holders_history` | mfhhis01.txt, the same columns plus `comparison_only`; March 2000 to the last full year | `country`, `from`, `to` (YYYY-MM), `include_comparison` |
|
|
23
|
+
| `holdings_by_country` | slt_table1.txt as published: `country`, `country_code`, `date`, then `for_lt_<type>_<pos|net|valchg>` for total, treas, agcy, corp, eqty | `country` (name or 5-digit code), `from`, `to` |
|
|
24
|
+
|
|
25
|
+
`kind` is `country`, `all_other`, `grand_total` or `foreign_official` (the rows "Of Which: Foreign
|
|
26
|
+
Official", "... Treasury Bills", "... T-Bonds & Notes").
|
|
27
|
+
|
|
28
|
+
## Spec examples
|
|
29
|
+
```json
|
|
30
|
+
{"description": "China's and Japan's holdings of Treasury securities, the latest 13 months",
|
|
31
|
+
"requests": [{"name": "mfh", "endpoint": "major_foreign_holders",
|
|
32
|
+
"params": {"country": ["Japan", "China, Mainland", "Grand Total"]}}]}
|
|
33
|
+
```
|
|
34
|
+
```json
|
|
35
|
+
{"description": "China's Treasury holdings since 2010, monthly",
|
|
36
|
+
"requests": [{"name": "china", "endpoint": "major_foreign_holders_history",
|
|
37
|
+
"params": {"country": "China, Mainland", "from": "2010-01"}},
|
|
38
|
+
{"name": "china_recent", "endpoint": "major_foreign_holders", "params": {"country": "China, Mainland"}}]}
|
|
39
|
+
```
|
|
40
|
+
```json
|
|
41
|
+
{"description": "Japan's holdings of U.S. long-term securities by type, 2026",
|
|
42
|
+
"requests": [{"name": "japan_lt", "endpoint": "holdings_by_country", "params": {"country": "Japan", "from": "2026-01"}}]}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Data format and traps
|
|
46
|
+
- Units differ: Major Foreign Holders is in billions of dollars, SLT Table 1 in millions. Values are kept as
|
|
47
|
+
published text (one decimal in billions); convert with `Number()` before arithmetic.
|
|
48
|
+
- The measures differ. Major Foreign Holders counts all Treasury securities, bills included, at market value.
|
|
49
|
+
Table 1's `for_lt_treas_pos` counts long-term Treasuries only (no bills). The two are not interchangeable.
|
|
50
|
+
- Custody bias, as the files note: holdings are attributed to the country where the securities are held in
|
|
51
|
+
custody, not the owner. Belgium, Luxembourg, the Cayman Islands, Ireland and the UK hold securities for
|
|
52
|
+
others; China's holdings held through Belgian custody show up under Belgium. Say "held in custody in" or
|
|
53
|
+
quote Treasury's caveat when ranking countries.
|
|
54
|
+
- Names change between files: `Korea, South` (table 5 and most years) vs `Korea` (some years of the history); history rows before about
|
|
55
|
+
2011 include groups such as "Oil Exporters" and "Carib Bnkng Ctrs" (footnote marks like "2/" are removed from
|
|
56
|
+
labels). Check the names in the rows before filtering a long series.
|
|
57
|
+
- Revisions: the latest 13 months (table 5) are revised each month and after each annual survey, so the same
|
|
58
|
+
month can differ by a few tenths from the history file (UK, December 2025: 863.2 vs 863.1, files of
|
|
59
|
+
2026-11-07). Use table 5 for the last 13 months and the history for older months, and say so.
|
|
60
|
+
- Series breaks: the history repeats June in 2002-2011 (March in 2000). The first value is the new series (based
|
|
61
|
+
on the June benchmark survey), the second the previous series "for comparison only". By default only the first
|
|
62
|
+
is kept; `include_comparison: true` adds the second with `comparison_only` True. Do not compare across a break
|
|
63
|
+
without saying so.
|
|
64
|
+
- In those break years the published file puts January in a 14th column, one line above its row label; the
|
|
65
|
+
pack reads it from there (Japan, January 2005: 679.5).
|
|
66
|
+
- "n.a." marks a country not shown separately in that month (Luxembourg before June 2002): keep it, and never
|
|
67
|
+
treat it as zero.
|
|
68
|
+
- `All Other` and `Grand Total` are rows: drop them (filter `kind = country`) before ranking or summing
|
|
69
|
+
countries. The foreign-official rows are part of the grand total, not more countries.
|
|
70
|
+
- Table 1's file ends with a definitions footer; rows without a YYYY-MM `date` are dropped.
|
|
71
|
+
|
|
72
|
+
## Access
|
|
73
|
+
No key. `fetch` reads the three files whole (largest about 1 MB) and filters them locally. Manual: open
|
|
74
|
+
https://ticdata.treasury.gov/resource-center/data-chart-center/tic/Documents/slt_table5.txt (or mfhhis01.txt,
|
|
75
|
+
slt_table1.txt) in a browser, save it, and `ingest` the .txt file. The older `mfh.txt` at the same address stopped
|
|
76
|
+
at January 2023: do not use it. Release calendar and notes: https://home.treasury.gov/data/treasury-international-capital-tic-system.
|
|
77
|
+
|
|
78
|
+
## Citation and terms
|
|
79
|
+
"U.S. Department of the Treasury, Treasury International Capital (TIC) System, Major Foreign Holders of Treasury
|
|
80
|
+
Securities (or SLT Table 1), ticdata.treasury.gov, retrieved <date>." Public domain (17 U.S.C. 105).
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"base_url": "https://www.uscourts.gov",
|
|
3
|
+
"timeout": 90,
|
|
4
|
+
"endpoints": {
|
|
5
|
+
"table": {
|
|
6
|
+
"path": "/sites/default/files/document/{file}.xlsx",
|
|
7
|
+
"method": "GET",
|
|
8
|
+
"description": "One caseload statistics table of the federal courts as its Excel file (bankruptcy filings F-2, F-5A; Statistical Tables for the Federal Judiciary; Federal Judicial Caseload Statistics; Judicial Business), by circuit and district. Default: every line numbered (row, col1...) to find the header lines; then header_lines names the columns.",
|
|
9
|
+
"params": {
|
|
10
|
+
"file": {"in": "path", "required": true, "desc": "the file name without .xlsx as on the table's page, e.g. bf_f2_0930.2026 (bankruptcy filings, table F-2, 12 months to Sept 30, 2026) or stfj_b_630.2026"},
|
|
11
|
+
"sheet": {"in": "records", "desc": "sheet name or number (default 1)"},
|
|
12
|
+
"header_lines": {"in": "records", "desc": "the header line numbers, e.g. '3-5'"},
|
|
13
|
+
"header_row": {"in": "records", "desc": "one header line instead; 0 (default) returns every line numbered"},
|
|
14
|
+
"carry": {"in": "records", "desc": "which header lines span to the right over blank cells: top (default), all, none"}
|
|
15
|
+
},
|
|
16
|
+
"defaults": {"header_row": 0},
|
|
17
|
+
"records": "$xlsx",
|
|
18
|
+
"paging": {"type": "none"},
|
|
19
|
+
"max_rows": 20000
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "uscourts",
|
|
3
|
+
"title": "U.S. Courts caseload statistics: federal court and bankruptcy filings, terminations and pending cases",
|
|
4
|
+
"agency": "Administrative Office of the U.S. Courts",
|
|
5
|
+
"depth": "standard",
|
|
6
|
+
"domains": [
|
|
7
|
+
"courts",
|
|
8
|
+
"criminal justice",
|
|
9
|
+
"bankruptcy"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"federal courts",
|
|
13
|
+
"u.s. courts",
|
|
14
|
+
"caseload statistics",
|
|
15
|
+
"bankruptcy filings",
|
|
16
|
+
"chapter 7",
|
|
17
|
+
"chapter 11",
|
|
18
|
+
"chapter 13",
|
|
19
|
+
"business bankruptcies",
|
|
20
|
+
"district courts",
|
|
21
|
+
"courts of appeals",
|
|
22
|
+
"civil cases filed",
|
|
23
|
+
"criminal cases filed",
|
|
24
|
+
"federal defendants",
|
|
25
|
+
"judicial business",
|
|
26
|
+
"pending cases",
|
|
27
|
+
"jurors"
|
|
28
|
+
],
|
|
29
|
+
"questions": [
|
|
30
|
+
"bankruptcy filings by chapter and district",
|
|
31
|
+
"business vs consumer bankruptcy filings",
|
|
32
|
+
"civil and criminal cases filed in federal district courts",
|
|
33
|
+
"appeals filed, terminated and pending by circuit",
|
|
34
|
+
"federal court caseload trends"
|
|
35
|
+
],
|
|
36
|
+
"homepage": "https://www.uscourts.gov/statistics-reports/caseload-statistics-data-tables",
|
|
37
|
+
"terms_url": "https://www.uscourts.gov/statistics-reports/caseload-statistics-data-tables",
|
|
38
|
+
"auth": {
|
|
39
|
+
"env": null,
|
|
40
|
+
"required": "none",
|
|
41
|
+
"placement": "none",
|
|
42
|
+
"signup_url": null,
|
|
43
|
+
"echoes_key": false
|
|
44
|
+
},
|
|
45
|
+
"limits": {
|
|
46
|
+
"rps": 1,
|
|
47
|
+
"burst": 3,
|
|
48
|
+
"max_rows": 20000
|
|
49
|
+
},
|
|
50
|
+
"routes": {
|
|
51
|
+
"api": {
|
|
52
|
+
"base": "https://www.uscourts.gov",
|
|
53
|
+
"probe": "https://www.uscourts.gov/sites/default/files/document/bf_f2_0930.2026.xlsx",
|
|
54
|
+
"hosts": [
|
|
55
|
+
"www.uscourts.gov"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"manual": {
|
|
59
|
+
"how": "Open https://www.uscourts.gov/statistics-reports/caseload-statistics-data-tables, filter to the table, click 'Download xlsx', and upload the workbook with ingest."
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"cache": {
|
|
63
|
+
"mode": "run_only",
|
|
64
|
+
"ttl_hours": null,
|
|
65
|
+
"why": "Tables are published quarterly; data/ is reused within a run."
|
|
66
|
+
},
|
|
67
|
+
"redistribution": {
|
|
68
|
+
"mode": "allowed",
|
|
69
|
+
"why": "Judiciary statistics are U.S. government works in the public domain (17 U.S.C. 105)."
|
|
70
|
+
},
|
|
71
|
+
"notices": [],
|
|
72
|
+
"retention": null,
|
|
73
|
+
"citation": "Administrative Office of the U.S. Courts, {dataset}, uscourts.gov, retrieved {retrieved_long}.",
|
|
74
|
+
"audit_hooks": [],
|
|
75
|
+
"clarify": [
|
|
76
|
+
"Which period? Most tables cover a 12-month period ending March 31, June 30, September 30 or December 31 (the file name carries the end date); some cover 1 or 3 months. Default: the latest 12-month table, with the same period a year earlier.",
|
|
77
|
+
"Which series? Bankruptcy filings (bf_), Statistical Tables for the Federal Judiciary (stfj_), Federal Judicial Caseload Statistics and Judicial Business: they repeat some tables for different periods. Default: the series whose period matches the question."
|
|
78
|
+
],
|
|
79
|
+
"formats": [
|
|
80
|
+
"xlsx"
|
|
81
|
+
],
|
|
82
|
+
"aliases": [
|
|
83
|
+
"U.S. Courts",
|
|
84
|
+
"Administrative Office of the U.S. Courts",
|
|
85
|
+
"federal judiciary statistics"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# U.S. Courts caseload statistics: federal court and bankruptcy filings, terminations and pending cases
|
|
2
|
+
Depth: standard. Key: none. The Administrative Office of the U.S. Courts' caseload statistics tables, as the
|
|
3
|
+
Excel files on uscourts.gov, read line by line or with a named stacked header. They cover bankruptcy filings by
|
|
4
|
+
chapter, business vs nonbusiness, and district; district court civil and criminal cases and defendants; courts
|
|
5
|
+
of appeals; magistrate judges; jurors; all by circuit and district for 1-, 3- or 12-month periods.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
- Bankruptcy filings by chapter and district; trends in business or consumer bankruptcies.
|
|
9
|
+
- Federal civil cases and criminal defendants filed, terminated and pending; appeals by circuit; how long cases
|
|
10
|
+
take (median times in some tables).
|
|
11
|
+
- Not here: crimes and arrests (fbi), victimization and prisoners (bjs), DOJ press releases (doj-news), case
|
|
12
|
+
documents or dockets (not covered), state courts.
|
|
13
|
+
|
|
14
|
+
## Endpoints
|
|
15
|
+
| Endpoint | Returns | Parameters |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `table` | one caseload table: without `header_lines`, every line numbered (`row`, `col1`...); with it, named columns | `file` (the file name without .xlsx), `sheet`, `header_lines`, `header_row`, `carry` |
|
|
18
|
+
|
|
19
|
+
The file name is on the table's entry in https://www.uscourts.gov/statistics-reports/caseload-statistics-data-tables
|
|
20
|
+
("Download xlsx"):
|
|
21
|
+
- `bf_` is the Bankruptcy Filings series: `bf_f2_0930.2026` is table F-2 for the 12 months to September 30, 2026;
|
|
22
|
+
`bf_f2.1_` is the one-month table and `bf_f2.3_` the three-month table.
|
|
23
|
+
- `stfj_` is the Statistical Tables for the Federal Judiciary: `stfj_b_630.2026` is table B (courts of appeals),
|
|
24
|
+
June 30, 2026.
|
|
25
|
+
- The date part is not zero-padded the same way in every series: copy it.
|
|
26
|
+
|
|
27
|
+
## Spec example
|
|
28
|
+
```json
|
|
29
|
+
{"description": "Bankruptcy filings by chapter and district, 12 months to September 30, 2026 (table F-2)",
|
|
30
|
+
"requests": [{"name": "f2", "endpoint": "table",
|
|
31
|
+
"params": {"file": "bf_f2_0930.2026", "header_lines": "3-5", "carry": "all"}}]}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Data format and traps
|
|
35
|
+
- Read the raw lines first. In F-2, line 2 is the title (with line breaks), lines 3-5 are the header, and the
|
|
36
|
+
rows begin with the national Total.
|
|
37
|
+
- Stacked headers: `carry: "all"` gives F-2's names (`Predominant Nature of Debt | Business | Chapter 7`). Check
|
|
38
|
+
the names against the numbered lines for any other table.
|
|
39
|
+
- Rows mix levels: `Total`, then each circuit (` 1st`, indented, a subtotal) and its districts (`ME`,
|
|
40
|
+
`MA`, ...; DC stands alone). Keep districts or circuits, never both, when summing. A circuit row's label keeps
|
|
41
|
+
its leading spaces: trim it.
|
|
42
|
+
- Some workbooks have a second sheet with more columns (F-2's second sheet: chapters 9, 12 and 15).
|
|
43
|
+
- Header cells carry footnote marks (`Total Other Chapters ¹`); the notes are below the table.
|
|
44
|
+
- Periods: the file name and title give the period end date and length. Compare like periods (12 months to
|
|
45
|
+
September 30 with the same a year earlier), and say whether the table is 1, 3 or 12 months.
|
|
46
|
+
- Counts are cases (bankruptcy petitions, civil cases) or defendants (criminal tables), as the title says.
|
|
47
|
+
|
|
48
|
+
## Access
|
|
49
|
+
No key. `fetch` reads www.uscourts.gov/sites/default/files/document/<file>.xlsx (verified 2026-11-07). The FJC
|
|
50
|
+
Integrated Database (case-level records, www.fjc.gov/research/idb) is not covered. Manual: Download xlsx from the
|
|
51
|
+
Data Tables page, then `ingest`.
|
|
52
|
+
|
|
53
|
+
## Citation and terms
|
|
54
|
+
"Administrative Office of the U.S. Courts, Table F-2, U.S. Bankruptcy Courts, Business and Nonbusiness Cases
|
|
55
|
+
Commenced, by Chapter of the Bankruptcy Code, During the 12-Month Period Ending September 30, 2026, uscourts.gov,
|
|
56
|
+
retrieved <date>." Public domain (17 U.S.C. 105).
|
package/packs/uspto/source.md
CHANGED
|
@@ -8,7 +8,7 @@ trials, final petition decisions, and the bulk-dataset directory, via api.uspto.
|
|
|
8
8
|
of one application; ownership (assignments); continuation families; PTAB IPR/PGR trials; petitions.
|
|
9
9
|
- Not here: trademarks (not in this pack), full patent text search (USPTO Patent Public Search at
|
|
10
10
|
https://ppubs.uspto.gov, a web tool), patent counts by state or country as official statistics (USPTO
|
|
11
|
-
PTMT reports, not covered), R&D spending (nsf
|
|
11
|
+
PTMT reports, not covered), R&D spending (nsf for NSF awards; bea).
|
|
12
12
|
- Counts built from search results are your own tabulations, not official USPTO statistics: say so.
|
|
13
13
|
|
|
14
14
|
## Endpoints and datasets
|