# Public API

> How to use Screvi's Public API to build custom integrations

## Overview

Screvi offers a public REST API for reading your highlights and sources programmatically. Use it to build custom workflows, export data to other tools, or create your own integrations.

## Authentication

All API requests require an API key passed in the `X-API-Key` header.

### Getting Your API Key

1. Go to **Settings > API** in the Screvi web app
2. Copy your API key

### Using the Key

Include the key in every request:

```
GET https://api.screvi.com/api/v1/highlights
X-API-Key: your-api-key-here
```

## Rate Limits

- **100 requests per minute** per API key
- Rate limit headers are included in responses

## Available Endpoints

### Highlights

**GET /api/v1/highlights**

Fetch your highlights with pagination and filters.

Query parameters:
- `page`: Page number (default: 1)
- `limit`: Results per page
- `source_id`: Filter by source
- `favorite`: Filter by favorites (true/false)
- `updated_since`: Only return highlights updated after this date

### Sources

**GET /api/v1/sources**

Fetch your sources (books, articles, etc.) with pagination.

## API Documentation

Full interactive API documentation is available at:

**[https://api.screvi.com/api/docs](https://api.screvi.com/api/docs)**

This Swagger UI lets you explore all endpoints, see request/response schemas, and try requests directly.

## Example Use Cases

- Export highlights to a custom Notion database
- Build a custom Obsidian workflow, or use the official Screvi Obsidian plugin for vault sync
- Create a personal dashboard with reading statistics
- Automate highlight-to-Twitter/X posting workflows
- Feed highlights into an AI assistant's knowledge base
