url2md Authorize API
The Authorize API from url2md — 1 operation(s) for authorize.
The Authorize API from url2md — 1 operation(s) for authorize.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/url2md-io:url2md-io-authorize-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: url2md Authorize API
version: 1.4.0
description: 'PDFs, JavaScript-rendered pages and ordinary HTML, returned as clean Markdown. Follows robots.txt (RFC 9309) for the user-agent token `url2md`. Paid routes use the x402 protocol (v2), USDC on Base. When a page charges an x402 toll, url2md pays it and passes the cost through. GET / reports the current price, network and payTo address.
What is kept: The Markdown is never stored: it is converted, returned, and no copy is written anywhere. What is kept is the request itself. The URL you asked for, your IP and your User-Agent stay in Cloudflare''s request logs for 7 days. Every paid call also writes a ledger row — the URL, your payer address, the payment''s nonce and transaction, the client name and User-Agent your request sent, and what the call returned — and that row is kept indefinitely, because it is the record of what you were charged and the thing the ledger is reconciled against on-chain. Payments are on a public blockchain, so payer, amount and transaction are public and permanent regardless. A signed-in call through the hosted MCP connector writes a row too — the URL, your account id and the outcome, at $0 — kept for 90 days. If a URL is itself a secret, that is worth knowing before you send it.'
contact:
email: hello@url2md.io
x-guidance: 'Reach for url2md when you need a web page or PDF as Markdown and have no reader service you can call unattended: no key, or a free allowance that has run out and would need a human to sign up for more. url2md needs no account and no key. It takes a per-call payment over x402 instead, so an agent can use it on its own. Good for: an article, documentation, a JavaScript-rendered single-page app, or a PDF you want as context. Send the URL, get Markdown plus title, final URL after redirects, word and token counts. Use render=auto, the default, and let the service decide whether a headless browser is needed. Use render=static when you know the page is server-rendered and want it cheaper and faster, and render=browser only when you know it is not. Not for: JSON or other API responses (it converts documents and refuses content types it cannot render), crawling a site (one URL per call, and robots.txt is followed, so a disallowed URL is refused), or pages behind a login. If the page charges an x402 toll, url2md answers 402 again with a quote covering that toll and pays the origin for you once your payment settles.'
servers:
- url: https://url2md.io
tags:
- name: Authorize
paths:
/authorize:
get:
security: []
operationId: oauthAuthorize
summary: 'OAuth 2.1 authorization endpoint: the consent page'
description: 'For a browser in the middle of connecting, not for an agent. The client (registered at /register or carrying a Client ID Metadata Document) sends the user here with response_type=code, client_id, a registered redirect_uri, state, code_challenge and code_challenge_method=S256 — PKCE is required of every client, public or confidential — and optionally scope and resource (which must be /mcp). The page names the client, the relying party and where the user will be sent back, and offers GitHub sign-in. The consent state travels in a signed, HttpOnly cookie valid for ten minutes. A request the provider refuses is answered per RFC 6749 §4.1.2.1: redirected to the registered redirect_uri with error, error_description, state and iss when the redirect URI itself was valid, else 400.'
parameters:
- name: response_type
in: query
required: true
schema:
type: string
enum:
- code
- name: client_id
in: query
required: true
schema:
type: string
- name: redirect_uri
in: query
required: true
schema:
type: string
format: uri
description: One of the client's registered redirect URIs
- name: state
in: query
required: false
schema:
type: string
- name: code_challenge
in: query
required: true
schema:
type: string
- name: code_challenge_method
in: query
required: true
schema:
type: string
enum:
- S256
- name: scope
in: query
required: false
schema:
type: string
description: url2md:fetch, the one scope
- name: resource
in: query
required: false
schema:
type: string
format: uri
description: RFC 8707; must be exactly <origin>/mcp when present
responses:
'200':
description: The consent page
content:
text/html:
schema:
type: string
'302':
description: 'The request was refused: redirected to the client''s registered redirect_uri with error, error_description, state and iss'
'400':
description: The client or its redirect URI is unknown, so no redirect is safe (error, error_description)
content:
application/json:
schema:
type: object
'404':
description: The connector is not enabled on this deployment (NOT_FOUND)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
description: Sign-in is not configured on this deployment (server_error)
content:
application/json:
schema:
type: object
tags:
- Authorize
post:
security: []
operationId: oauthConsent
summary: The consent form's submission
description: The page's own form, posted back with the same query string it was served for. The hidden token must equal the state cookie (double submit), the state must verify and not be expired, and the live request must match the consent it was started with; PKCE is checked again. decision=deny returns the user to the client with error=access_denied. Otherwise the browser is sent to GitHub to sign in, or — on the Base Sepolia deployment only, when a test login is configured — a posted test_login and test_user complete the grant on the spot for the gauntlet.
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- token
properties:
token:
type: string
decision:
type: string
enum:
- allow
- deny
test_login:
type: string
test_user:
type: string
responses:
'302':
description: To GitHub's authorization page, or to the client's redirect_uri with a code (test login) or an error
'400':
description: The form did not carry its state, the state did not verify, or the request does not match it (error, error_description)
content:
application/json:
schema:
type: object
'404':
description: The connector is not enabled on this deployment (NOT_FOUND)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
description: Sign-in is not configured on this deployment (server_error)
content:
application/json:
schema:
type: object
tags:
- Authorize
components:
schemas:
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
- retryable
properties:
code:
type: string
enum:
- INVALID_REQUEST
- METHOD_NOT_ALLOWED
- NOT_FOUND
- INVALID_URL
- UNSUPPORTED_SCHEME
- BLOCKED_HOST
- ROBOTS_DISALLOWED
- ROBOTS_UNREACHABLE
- UPSTREAM_TIMEOUT
- UPSTREAM_ERROR
- UPSTREAM_STATUS
- UPSTREAM_PAYMENT_REQUIRED
- UPSTREAM_TOLL_TOO_HIGH
- UPSTREAM_PAYMENT_FAILED
- TOLL_FUNDING_UNAVAILABLE
- TOO_MANY_REDIRECTS
- UNSUPPORTED_CONTENT_TYPE
- CONTENT_TOO_LARGE
- EMPTY_CONTENT
- RENDER_FAILED
- RENDER_UNAVAILABLE
- PDF_CONVERSION_FAILED
- RATE_LIMITED
- PAYMENT_UNAVAILABLE
- PAYMENT_REJECTED
- UNAUTHORIZED
- STATS_DISABLED
- ALLOWANCE_EXHAUSTED
- ALLOWANCE_UNAVAILABLE
- INTERNAL
message:
type: string
retryable:
type: boolean
details:
type: object
additionalProperties: true
securitySchemes:
statsToken:
type: http
scheme: bearer
description: The STATS_TOKEN secret. Operator only; no paid route uses it.
statsBasic:
type: http
scheme: basic
description: The STATS_TOKEN secret as the password (any username), so a browser prompts for it instead of it travelling in a URL.
mcpOAuth:
type: oauth2
description: 'OAuth 2.1 for the hosted MCP connector only. Discovery: /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource/mcp. Clients register at /register or carry a Client ID Metadata Document; PKCE S256 is required of every client; the user signs in with GitHub on the consent page. No paid route uses it: x402 is the only paid-access mechanism.'
flows:
authorizationCode:
authorizationUrl: https://url2md.io/authorize
tokenUrl: https://url2md.io/token
refreshUrl: https://url2md.io/token
scopes:
url2md:fetch: Call the connector's one tool, fetch_markdown, within the signed-in user's allowance