Linkup /fetch integration guide
You are integrating the Linkup /fetch API: a real-time page content
extractor. Given a URL, it returns clean LLM-ready markdown. Optional
JavaScript rendering is available for client-side-rendered pages, along with
optional raw HTML and image URL extraction. "pro" delivers significantly
higher success rates on hard-to-retrieve pages. Pass schema to also get
typed JSON from that same page in data.
Limits: HTML up to 20 MB, PDF up to 100 MB. HTML and PDF only. Markdown-only
latency is typically ~1s. Structured output adds a model pass after the
scrape and is slower.
When to use it
Use/fetch when the URL is already known: typically after /search has
narrowed the candidates, or when a user has supplied the URL directly.
Use schema on /fetch when you already have the URL and want typed JSON
from this page. Do not use /extract for a single page’s JSON object.
Do not use Search structuredOutputSchema when the URL is already known.
Other endpoints in the API:
- Search (
/search): when no URL is available and web content must be located. UseoutputType"structured"andstructuredOutputSchemaonly when there is no URL yet. - Research (
/research): autonomous research agent. Async, 2–20 minutes depending on depth. - Extract (
/extract): many structured rows from a listing page, possibly following links. Closed beta, async. - Tasks (
/tasks): asynchronous batch wrapper around Search, Fetch, and Research. Fetch tasks accept the sameschemaandinstructionsasPOST /fetch.
Setup
Example (Python; adapt to the project’s language)
schema / instructions, POST the same JSON to https://api.linkup.so/v1/fetch):
Tool definition (OpenAI function-calling format)
Remove the"type": "function" envelope and rename parameters to
input_schema for the Anthropic format.
Operational guidance (inline)
mode selection
Use "standard" for mode by default and "pro" for hard-to-retrieve
pages. "pro" delivers significantly higher success rates on
hard-to-retrieve pages. It costs more.
mode and renderJs solve different problems: mode controls how the page
is accessed, while renderJs controls whether JavaScript is executed.
renderJs selection
For agentic pipelines, set renderJs to true by default to ensure the full
content of each page is extracted. A page that requires JavaScript rendering
and does not receive it returns near-empty markdown. Set renderJs to false
only when all the URLs to be accessed have been confirmed to render
server-side.
Cost depends on mode and renderJs. Adding a schema for
structured output
adds a flat $0.001 on top of any combination.
Failed calls are not billed.
When to use Fetch
Fetch is purpose-built to extract the content of a webpage that has been identified. Linkup’s Fetch can be used as a stronger alternative to typical fetch tools because it can render JavaScript. Addschema when the caller needs typed JSON from that page rather than parsing markdown itself.
The schema parameter
- Required to turn structured output on.
instructionsis optional. - Must be a JSON Schema object (
type"object"). Arrays as the root type are rejected. - Field
descriptions do the extraction work. Keep the schema shallow. datais omitted whenschemais omitted.markdownis always returned.- Missing fields are omitted from
data, not set tonulland not invented. instructionswithoutschemareturns a400.- Do not use Search’s
structuredOutputSchemaon Fetch.
The Search → Fetch pattern
schema instead of Search
structuredOutputSchema.
Constraints
- Fetch supports HTML and PDF. Other binary URLs (ZIPs, images, videos) return a
400error. - Fetch returns a
400error for HTML pages over 20 MB and PDFs over 100 MB. - Fetch does not authenticate. It returns the response a logged-out visitor would see.
- Setting
extractImagestotrueadds latency; enable it for workflows that consume image URLs. includeRawHtmlshould betrueonly when the raw HTML is required.- Fetch does not follow links. For many rows from a listing page, use
/extract. - If structured extraction fails after a successful scrape, the call returns a
400and is not billed.
TypeScript notes
- Import:
import { LinkupClient } from 'linkup-sdk'. - Method:
await client.fetch({ url, mode, renderJs, schema, instructions }). Single object argument. - Field names are camelCase:
mode,renderJs,includeRawHtml,extractImages,schema,instructions. - If the installed SDK types omit
schema/instructions, POST the JSON body to/v1/fetchdirectly.