Copy-paste recipes for the most useful Screenpipe API workflows: search, meetings, speakers, frames, memories, retention, and safe data deletion.
Screenpipe runs a local API on localhost:3030. Use these recipes when you want useful answers fast, then open the API reference for every parameter and response shape.Protected endpoints require API authentication. Retrieve the local key once per shell:
You can also reveal it in Settings → Privacy → API security. The examples below include the required bearer header. /health is the exception.For scripts that call the API directly, add X-Screenpipe-Client: api as a fixed header. This identifies the request as an external API client; do not put an agent name, customer name, or prompt in this header:
browser_url is matched against captured browser metadata; it is not a URL substring search. To find pages whose captured URL contains a domain or path, use q instead:
Time filters accept relative values such as 3h ago and now, or ISO 8601 UTC for an exact historical window. An explicit start and end is the safest way to debug “what happened during that call?”
Use frame endpoints when you already have a frame_id from search and need the captured text, surrounding accessibility context, OCR fallback data, or metadata.
Elements come from the accessibility tree. They are useful for finding buttons, links, fields, and UI labels directly, instead of relying on visual OCR.
curl -X POST http://localhost:3030/raw_sql \ -H "Authorization: Bearer $SCREENPIPE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"select app_name, count(*) as n from frames group by app_name order by n desc limit 20"}'
/raw_sql only allows read-only queries such as select, with, and explain. Writes are rejected.