Skip to main content

Confirm

Are you sure?

Client libraries

Official clients for Python, JavaScript and TypeScript, Ruby and Go. Each is a thin layer over the HTTP API with typed results and errors, and the same behaviour in every language.

You don't need one: every endpoint is a single POST, and the code recipes show it in eight languages with nothing but an HTTP client. A library saves you the parts around that POST — retries, long analyses, error types and webhook signatures.

Install

LanguageInstallPackageSourceNotes
Pythonpip install urlpipePyPIGitHubPython 3.9+, sync and async clients, one dependency (httpx)
JavaScriptnpm install @urlpipe/sdknpmGitHubTypeScript types, no dependencies; Node 18+, Bun, Deno and Cloudflare Workers
Rubygem install urlpipeRubyGemsGitHubRuby 3.1+, no dependencies
Gogo get github.com/URLpipe/urlpipe-gopkg.go.devGitHubGo 1.21+, standard library only

Your first call

Each client reads the project API key from URLPIPE_API_KEY (or takes it as an argument) and waits for the result, so a call returns the page:

import urlpipe

client = urlpipe.Client()  # reads URLPIPE_API_KEY

page = client.markdown("https://example.com")
print(page.data)

What every client does

  • Waits for the result. Calls send sync: true by default. When a page outlives the 60-second sync window, the API answers 504 with a token and the client polls GET /result/:token until the result lands, so your code sees one call. Pass sync: false for a token straight away, and wait(token) to collect it.
  • Retries without paying twice. Connection errors, 5xx answers, rate_limited and concurrency_limit are retried with backoff, and every retried request carries an Idempotency-Key, so a retry can never run or bill the work twice.
  • Types every error. Each documented error — invalid key, unconfirmed email, invalid request, failed analysis, out of credits, too many in parallel, rate limited, not found, expired — is its own type, with the API's code, message and fields.
  • Reads the metadata. The response headers — cache status and age, processing time, credits spent and left — come back parsed on every response.
  • Verifies webhooks. A helper checks a delivery's HMAC signature against the raw body, accepts either secret during a rotation, and refuses stale timestamps.
Every option the API takes can be passed, including ones newer than your client version: each client has an extra map that is merged into the request body as it is.

From an AI agent

Agents don't need a library at all: the hosted MCP server gives Claude, Cursor, VS Code and other clients the same operations as tools, with one token.