API & MCP
Everything a person can do on DataFresh, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://datafresh.usefulweb.site/api/v1/calculate– run DataFreshGET https://datafresh.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
DataFresh
Point DataFresh at a public JSON or CSV endpoint (or paste the content). It finds the records, infers a schema with a stable fingerprint, finds the newest timestamp, compares its age with the update cadence you expect, and reports schema changes since the last check – as one of: healthy, stale, schema_changed, unavailable, no_timestamp.
| Field | Type | Default | Description |
|---|---|---|---|
url | url | — | Dataset or API URL. Public http(s) JSON or CSV, max 2 MiB. |
content | textarea | — | Or paste JSON/CSV content |
format | select (auto, json, csv) | "auto" | Format |
timestampField | text | — | Timestamp field (optional). Leave empty to detect (updated_at, date, …). Nested: parent.child |
expectedCadenceHours | number | 24 | Expected update interval. 24 = daily, 168 = weekly, 720 ≈ monthly, 8760 = yearly. |
previousSchema | textarea | — | Previous schema (optional, JSON from an earlier result) |
remember | boolean | true | Remember this URL's schema for the next check. Stores only a hash of the URL plus the field list. |
Example request
Stale daily feed
curl -X POST https://datafresh.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"content":"{\"meta\":{\"source\":\"example\"},\"items\":[{\"id\":1,\"value\":3.2,\"updated_at\":\"2026-10-01T06:00:00Z\"},{\"id\":2,\"value\":4.1,\"updated_at\":\"2026-10-03T06:00:00Z\"}]}","expectedCadenceHours":24}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://datafresh.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
datafresh - Local stdio connector:
node src/mcp-stdio.ts --tool=datafresh
{
"mcpServers": {
"datafresh": { "type": "http", "url": "https://datafresh.usefulweb.site/mcp" }
}
}