« tlly.dev

Playbooks · Integrations

Public data

JSON, CSV and JSON-stat from a public URL. No key, except sources that issue their own free key.

What you can track

A statistics office, a central bank, or any other public JSON, CSV or JSON-stat URL. The chat already names FRED and EIA as sources that publish a free key of their own. This playbook does not give a FRED or EIA URL: those query strings were not re-fetched. Find the official URL, preview it with test_job, and only then schedule it.

JSON-stat 2 (format: jsonstat2) is for a response that is already one series (SSB and Eurostat are the cases the product names). Filter the query so other dimensions have a single value.

Credential

None, unless that publisher requires its own free key. Store that key like any other secret, bound to the publisher’s host. Do not describe it as “no key” if the preview returns 401.

Where to get it

The publisher’s API docs. For a sheet the user already maintains, use the Google Sheets playbook instead.

tlly job

CSV (the shape used for a public statistics file in the tests):

{"series":"obs","cron":"0 7 * * *","request":{"url":"https://example.com/data.csv"},"extract":{"format":"csv","date":"TIME_PERIOD","value":"OBS_VALUE"}}

JSON-stat:

{"series":"cpi","cron":"0 7 * * 1","request":{"url":"https://example.com/data?format=jsonstat2"},"extract":{"format":"jsonstat2"}}

Replace the example hosts. {today} works in the URL.

Gotchas

Alert ideas

Red when a rate crosses the user’s line. Yellow when the newest period is older than the series’ usual lag (a monthly series is not stale after a week).

Verification

Formats and the secret rule are this repo (extract.go, the chat prompt’s FRED/EIA sentence). No FRED, EIA, SSB or Eurostat URL was copied in, because it was not re-checked against that publisher’s docs.