# Screenpipe API

Query the user's local and synced-device Screenpipe data via the REST API at...

- Repository: https://github.com/screenpipe/screenpipe (22202 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add screenpipe/screenpipe --skill screenpipe-api -g -a claude-code -y`
Codex: `npx skills add screenpipe/screenpipe --skill screenpipe-api -g -a codex -y`
Cursor: `npx skills add screenpipe/screenpipe --skill screenpipe-api -g -a cursor -y`
Gemini CLI: `npx skills add screenpipe/screenpipe --skill screenpipe-api -g -a gemini-cli -y`

## Description

Query the user's local and synced-device Screenpipe data via the REST API at localhost:3030. Use for screen activity, meetings, apps, productivity, other-device or cross-device history, media export, retranscription, or connected services.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Screenpipe API

Local REST API at `http://localhost:3030`. Full reference (60+ endpoints): https://docs.screenpi.pe/llms-full.txt

## Authentication

**ALL requests require authentication.** Add the auth header to every curl call:

```bash
curl -H "Authorization: Bearer $SCREENPIPE_LOCAL_API_KEY" \
  -H "X-Screenpipe-Client: api" \
  -H "X-Screenpipe-Agent: unknown" \
  "http://localhost:3030/..."
```

The fixed `X-Screenpipe-Client: api` value attributes a successful, nonempty
external retrieval to the API surface. Never put an agent name, customer name,
project, prompt, or other dynamic value in this header.
Include both attribution headers above on REST retrievals. The installer sets
`X-Screenpipe-Agent` to a fixed app identifier; preserve that value. If this is
an unconfigured reference, leave it as `unknown`. Never substitute a project,
user, model, prompt, or other dynamic identifier.

The `$SCREENPIPE_LOCAL_API_KEY` env var is already set in your environment. Without it you get 403. The only exception is `/health` (no auth needed).

## Context Window Protection

API responses can be large. Always write curl output to a file first (`curl ... -o /tmp/sp_result.json`), check size (`wc -c /tmp/sp_result.json`), and if over 5KB read only the first 50-100 lines. Extract what you need with `jq`. NEVER dump full large responses into context.

The rest: https://github.com/screenpipe/screenpipe/blob/HEAD/.claude/skills/screenpipe-api/SKILL.md
