# PixelRAG

> Search web pages and PDFs by rendering them as screenshots, not parsed text

- Repository: https://github.com/StarTrail-org/PixelRAG
- Category: Memory, RAG & data
- Stars: 10,342 · Forks: 914 · Language: Python · License: Apache-2.0
- Experience: Some experience
- Page: https://ir.adyog.com/repos/startrail-org/pixelrag/

Most RAG systems parse a page into text chunks. That step often drops tables, charts and layout, so the model never sees the answer. PixelRAG skips parsing: it renders each document as screenshot tiles and searches the images themselves.

It has two main parts. The pixelshot command uses headless Chromium (or poppler for PDFs) to turn pages into tiles. An embedding model, Qwen3-VL-Embedding-2B with LoRA fine-tuning on screenshot data, places the tiles in a vector space. The tiles go into a FAISS or Qdrant index, and a FastAPI server answers queries. A query can be text or an image.

A hosted index of 8.28M Wikipedia pages is available with no API key, and you can build an index from your own files. The renderer also ships as a Claude Code plugin and an opencode plugin, so an agent can look at a page instead of fetching raw HTML. This is the official code for a Berkeley research paper.

## What it does

- **Screenshot rendering**: The pixelshot CLI turns URLs, PDFs and local files into image tiles, using headless Chromium or your system Chrome.
- **Staged pipeline**: Chunk, embed, build-index and serve run as separate pixelrag commands. One command, pixelrag index build, reads a YAML config and runs the whole flow. It works on Linux with CUDA and on Apple Silicon.
- **Hosted Wikipedia index**: A live API searches 8.28M Wikipedia pages with no setup or key. You can also download pre-built FAISS indexes from Hugging Face; the base one is about 217 GB.
- **Agent plugins**: The pixelbrowse skill for Claude Code, and an npm plugin for opencode, let an agent screenshot a page and read the image.
- **FAISS or Qdrant backends**: FAISS is the default for local indexes. Qdrant adds quantization, disk-backed vectors, payload filtering and a collection shared by several servers.

## What you could build

- Index a folder of PDFs and search them by what the pages look like, including tables and diagrams.
- Query the hosted Wikipedia index over HTTP to try visual retrieval without setting anything up.
- Give Claude Code a skill that screenshots web pages and reads charts and layout.
- Build a retrieval-augmented question answering system over documents where numbers sit in tables.
- Fine-tune your own embedding model on the released screenshot training set.

## Who it's for

Developers and researchers working on RAG or agents who are comfortable with Python and the command line; a GPU helps for large indexes, though small ones run on a Mac.

## Get started

Install the package, then render a page with pixelshot or send a query to the hosted API to see it work. To search your own files, install the index extra, write a short pixelrag.yaml pointing at your documents, run the build, and serve the index.

```
pip install pixelrag
```
```
pixelshot https://en.wikipedia.org/wiki/Python --output ./tiles
```
```
pip install 'pixelrag[index]'
```

Tags: rag, multimodal, vision, search, embeddings
