API
Ingest unstructured data and query it with the public RawTree API.
Quickstart with the API
Use the public RawTree API when you want direct HTTP access from an application, script, or agent.
Base URL:
https://api.rawtree.com1) Set an API key
Create an API key from the UI or CLI, then pass it as a bearer token.
export API_KEY=rw_...Authorization: Bearer rw_...2) Ingest data
curl -X POST "https://api.rawtree.com/v1/tables/events" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '[
{"action":"click","user":"alice","value":42},
{"action":"view","user":"bob","value":10}
]'Response:
{"inserted":2}3) Query data
curl -X POST "https://api.rawtree.com/v1/query" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"sql":"SELECT action, count() AS total FROM events GROUP BY action ORDER BY total DESC LIMIT 10"}'4) Check recent logs
START_TIME="2026-04-24T10:00:00Z"
END_TIME="2026-04-24T11:00:00Z"
curl "https://api.rawtree.com/v1/logs?start_time=$START_TIME&end_time=$END_TIME&limit=50" \
-H "Authorization: Bearer $API_KEY"