---
title: Fetch
scope: 3dmk
type: documentation
subject: fetch
group: Systems
status: current
version: "2.1.3"
source: https://3dmk.com/documentation#fetch
author: Nick Olson
contact:
  email: 3dmk@3dmk.com
  site: https://3dmk.com
license: CC BY 4.0
license_url: https://creativecommons.org/licenses/by/4.0/
attribution: Nick Olson, 3dmk.com
---

# Fetch

Fetch is a browser automation service. Some pages need JavaScript, a click, a hover, or time to finish drawing before their content appears. Fetch opens such a page the way a browser does. It returns the text, HTML, screenshots, console messages, and page errors that the page produces.

## Role

Agents, services, and scripts call Fetch when a task needs a rendered page. Design research uses it to save the full text of reference pages. Device emulation lets it test a phone layout with touch input and a high-density screen. One request can run a sequence of actions, with a screenshot at each state.

Fetch builds its queue, workers, and API around the upstream Playwright project. Playwright supplies the rendering. Fetch runs on the desktop machine for now. Its planned home is core-docker-1, after a phase that sizes memory per browser context.

## Parts

The `core-fetch` service runs one headless Chromium browser inside a Python and FastAPI process. Five parts divide the work.

| Part | Job |
|---|---|
| API routers | Accept submissions and serve results, artifacts, status, and health |
| Engine | Assigns request IDs, holds the queue, and tracks each request’s lifecycle |
| Worker pool | Runs queued requests, each in its own isolated browser context |
| Chromium | Loads each page and runs the requested actions |
| Data volume | Stores completed results and artifacts |

A browser context is the unit of isolation and memory. The Consul key-value store holds the pool size, with a default of two concurrent contexts. Actions run in order after navigation: `goto`, `click`, `hover`, `fill`, `press`, `waitFor`, `waitMs`, `evaluate`, and `screenshot`.

## Data

A request names a URL plus optional actions, emulation settings, a viewport, and outputs. The service answers at once with a request ID and the status `queued`. The caller polls the result until the status reads `ok` or `error`.

Each output returns in one of two ways.

| Output | Returned as |
|---|---|
| `title` | An inline field |
| `text` | An inline field, capped at 20,000 characters |
| `html` | An artifact that holds the full page |
| `screenshot` | An image artifact of the full page by default |

The result also carries the HTTP status, duration, console messages, page errors, and the return values of `evaluate` actions. The default timeout is 30 seconds for navigation and for each action. The default viewport is 1,280 by 900 pixels.

Queued and running requests live only in memory. A restart loses them. Completed results and artifacts persist on the data volume through a restart.

## Connections

Fetch depends on four platform services and one upstream project.

| System | What passes between them |
|---|---|
| Consul | Service registration and the pool size setting |
| Vault | Service credentials, read at startup |
| Nexus | Python packages for the image build |
| `core-auth` | Access tokens for service-to-service calls |
| Playwright | The browser engine, pinned to one version with a matching Chromium build |
