# Fieldwork

> One TypeScript API for web and image search, page reading, extraction, crawling, answers, research, monitors, remote browsers and document parsing across Exa, Firecrawl, Tavily, Parallel, Perplexity, Brave, SerpApi, Browserbase, Kernel, LlamaParse and Reducto.

Reach for Fieldwork when a TypeScript or JavaScript project needs to search the web, read pages, extract values, crawl sites, answer or research questions, watch for changes or drive a remote browser, without tying its code to one provider. Install with `npm i @howells/fieldwork-sdk`, construct `fieldwork({ adapter: firecrawl() })` with an adapter from its own subpath, and call the methods that provider offers. `@howells/fieldwork-mcp` serves the same capabilities as MCP tools over stdio, or as an HTTP gateway with a JSON API and remote MCP behind a bearer key per agent; a running gateway describes itself at `/api/v1/openapi.json`.

## Overview

- [Introduction](https://fieldwork-sdk.dev/docs): Fieldwork is one TypeScript API for searching the web, reading pages, extracting values, crawling sites, answering and researching questions, watching for changes, driving a browser and parsing documents, across eleven providers.

### Get started

- [Installation](https://fieldwork-sdk.dev/docs/installation): Install @howells/fieldwork-sdk, pick a provider's adapter and make a first call.
- [Keys](https://fieldwork-sdk.dev/docs/keys): The environment variable each adapter reads its API key from, and how to pass a key, a project or your own fetch in code.

### Using Fieldwork

- [Capabilities](https://fieldwork-sdk.dev/docs/capabilities): Which of Fieldwork's 19 capabilities each of the eleven providers offers, and how an instance reports them at run time.
- [Options](https://fieldwork-sdk.dev/docs/options): The option names every provider shares, the settings every call accepts, and how provider-only options and refused combinations work.
- [Results and meta](https://fieldwork-sdk.dev/docs/results): The normalized shape each method returns, the provider's own response in raw, and the request id, usage and warnings in meta.
- [Structured output](https://fieldwork-sdk.dev/docs/structured-output): Pass a Zod, Valibot or ArkType schema, or plain JSON Schema, to get typed data back from extract, answer and research.
- [Best images](https://fieldwork-sdk.dev/docs/best-images): Find a page's main images, best first, each resolved to its largest known original URL through @howells/fieldwork-sdk/image.

### Jobs, routing and errors

- [Long jobs](https://fieldwork-sdk.dev/docs/long-jobs): How research, discovery, crawls and batch reads are polled, how to bound or cancel them, and how to collect a job after a timeout with resume.
- [Monitors and browsers](https://fieldwork-sdk.dev/docs/monitors-and-browsers): Watch a query or a page on a schedule with monitor, and open a remote browser for Playwright or Puppeteer with browser.
- [The router](https://fieldwork-sdk.dev/docs/router): Send each capability to exactly one provider with router, checked by the types, or with runtimeRouter for routes from flags or configuration.
- [Errors and retries](https://fieldwork-sdk.dev/docs/errors): The one error type, its eleven codes and what to do about each, and when Fieldwork repeats a failed request for you.
- [The provider's own API](https://fieldwork-sdk.dev/docs/provider-api): Call any endpoint of the provider's HTTP API with authentication applied, through web.raw.request, for anything Fieldwork does not wrap.

### Agents

- [Agent tools](https://fieldwork-sdk.dev/docs/agent-tools): Turn a Fieldwork instance into tool definitions for a model, with JSON Schema inputs that list only the options its provider supports.
- [MCP server](https://fieldwork-sdk.dev/docs/mcp-server): Run @howells/fieldwork-mcp to give Claude, Cursor, Codex or any MCP client Fieldwork's capabilities as tools, one or more providers per capability.
- [HTTP gateway](https://fieldwork-sdk.dev/docs/http-gateway): Serve Fieldwork's tools over HTTP and remote MCP from one handler, behind a bearer key per agent, with an OpenAPI description agents can read without a key.

## Reference

- [Fieldwork gateway](https://fieldwork-sdk.dev/reference): Fieldwork's tools over HTTP. Every request needs a bearer key. Each response carries x-request-id. A call that returns an error with jobId has started a…

### gateway

- [This description](https://fieldwork-sdk.dev/reference/gateway/get-open-api): This description. Reference for the GET /api/v1/openapi.json endpoint in the Fieldwork gateway API.
- [List the tools](https://fieldwork-sdk.dev/reference/gateway/list-tools): List the tools. Reference for the GET /api/v1/tools endpoint in the Fieldwork gateway API.
- [MCP](https://fieldwork-sdk.dev/reference/gateway/mcp): The same tools as an MCP server over Streamable HTTP, answering with JSON. Reference for the POST /mcp endpoint in the Fieldwork gateway API.

### search

- [search_web](https://fieldwork-sdk.dev/reference/search/search-web): Search the web and return a ranked list of pages with their titles,… Reference for the POST /api/v1/tools/search_web endpoint in the Fieldwork gateway API.

### read

- [read_page](https://fieldwork-sdk.dev/reference/read/read-page): Read one web page and return its title and its text as Markdown. Use… Reference for the POST /api/v1/tools/read_page endpoint in the Fieldwork gateway API.
- [find_images](https://fieldwork-sdk.dev/reference/read/find-images): Find a page's images, best first: the largest, most prominent content… Reference for the POST /api/v1/tools/find_images endpoint in the Fieldwork gateway API.

### readMany

- [read_pages](https://fieldwork-sdk.dev/reference/read-many/read-pages): Read several web pages in one call and return each page's title and… Reference for the POST /api/v1/tools/read_pages endpoint in the Fieldwork gateway API.

### extract

- [extract_values](https://fieldwork-sdk.dev/reference/extract/extract-values): Read one web page and return the values a JSON Schema asks for,… Reference for the POST /api/v1/tools/extract_values endpoint in the Fieldwork gateway API.

### answer

- [answer_question](https://fieldwork-sdk.dev/reference/answer/answer-question): Answer a question in one call from the provider's own search, and… Reference for the POST /api/v1/tools/answer_question endpoint in the Fieldwork gateway API.

### research

- [research_question](https://fieldwork-sdk.dev/reference/research/research-question): Research a question across the web and return an answer with… Reference for the POST /api/v1/tools/research_question endpoint in the Fieldwork gateway API.

### images

- [search_images](https://fieldwork-sdk.dev/reference/images/search-images): Search for images and return each image's URL, thumbnail, the page… Reference for the POST /api/v1/tools/search_images endpoint in the Fieldwork gateway API.

### product

- [read_product](https://fieldwork-sdk.dev/reference/product/read-product): Read a product page's structured data and return the product with… Reference for the POST /api/v1/tools/read_product endpoint in the Fieldwork gateway API.

### map

- [map_site](https://fieldwork-sdk.dev/reference/map/map-site): List the URLs of a website without reading the pages. Use to find which… Reference for the POST /api/v1/tools/map_site endpoint in the Fieldwork gateway API.

### crawl

- [crawl_site](https://fieldwork-sdk.dev/reference/crawl/crawl-site): Start at a URL, follow links within the site and return the text of… Reference for the POST /api/v1/tools/crawl_site endpoint in the Fieldwork gateway API.

### parse

- [parse_document](https://fieldwork-sdk.dev/reference/parse/parse-document): Convert a document file (PDF, DOCX, XLSX, PPTX, HTML or CSV) to… Reference for the POST /api/v1/tools/parse_document endpoint in the Fieldwork gateway API.

### usage

- [check_usage](https://fieldwork-sdk.dev/reference/usage/check-usage): Return the account's credits used and remaining in the current… Reference for the POST /api/v1/tools/check_usage endpoint in the Fieldwork gateway API.

### discover

- [find_entities](https://fieldwork-sdk.dev/reference/discover/find-entities): Find entities of one kind, such as companies, products or people,… Reference for the POST /api/v1/tools/find_entities endpoint in the Fieldwork gateway API.

### decide

- [make_decisions](https://fieldwork-sdk.dev/reference/decide/make-decisions): Answer closed questions about a context: yes or no, one choice… Reference for the POST /api/v1/tools/make_decisions endpoint in the Fieldwork gateway API.

### reverseImage

- [search_by_image](https://fieldwork-sdk.dev/reference/reverse-image/search-by-image): Find the web pages an image appears on, given the image's URL.… Reference for the POST /api/v1/tools/search_by_image endpoint in the Fieldwork gateway API.

## Agent resources

- [llms-full.txt](https://fieldwork-sdk.dev/llms-full.txt): The full Markdown of every page in one file.
- [Page Markdown](https://fieldwork-sdk.dev/index.md): Append `.md` to any page URL to fetch that page as raw Markdown.
- [JSON API](https://fieldwork-sdk.dev/api/docs/pages.json): Page index of the JSON docs API; each entry links the page's JSON and Markdown forms. Described by the OpenAPI document at https://fieldwork-sdk.dev/openapi.json.
- [Agent skills](https://fieldwork-sdk.dev/.well-known/agent-skills/index.json): Agent Skills discovery index of the skills this site publishes.
- [API catalog](https://fieldwork-sdk.dev/.well-known/api-catalog): RFC 9727 linkset of the APIs documented here.
- [AI catalog](https://fieldwork-sdk.dev/.well-known/ai-catalog.json): ARD manifest of the agent-facing resources on this site (MCP server, skills, APIs).
- [agent-readability.json](https://fieldwork-sdk.dev/agent-readability.json): Manifest of every agent-facing artifact on this site.
- [Sitemap](https://fieldwork-sdk.dev/sitemap.xml): Every indexable page URL with its last-modified date.
