---
title: "Ingest a web page"
description: "Insert a URL as a document, then compare chunking strategies on it"
url: "https://www.pixeltable.com/notebooks/doc-ingest-website"
updated: "2026-09-21"
---

# Ingest a web page

Insert a URL as a document, then compare chunking strategies on it

- **Type:** Recipe
- **Group:** Text

## What it covers

- Insert the URL
- Chunk it, two ways
- Make it searchable

## What it uses

- **Pixeltable calls:** `document.document_splitter()`, `pxt.create_table()`, `pxt.create_view()`, `insert()`, `add_embedding_index()`, `similarity()`

## A look at the code

```python
from pixeltable.functions.huggingface import sentence_transformer

embed = sentence_transformer.using(model_id='intfloat/e5-large-v2')
by_paragraph.add_embedding_index('text', string_embed=embed)

sim = by_paragraph.text.similarity(string='how do ants communicate')
by_paragraph.order_by(sim, asc=False).limit(5).select(by_paragraph.text, sim).collect()
```

## Open it

- **Docs page:** https://docs.pixeltable.com/howto/cookbooks/text/doc-ingest-website
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/howto/cookbooks/text/doc-ingest-website.mdx
