Skip to content
clusters: prooflayer · edgemarket · edgefinance · synthforge · mediakit · wordmint · webprobe · locale · comppoint
$ man ipfs-fetch

/ipfs-fetch(1)

agentutility / edge-market / ipfs-fetch
PRICE / CALL
$0.005
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
edgemarket
CATEGORY
uncategorized
STATUS
live
NAME
ipfs-fetch ipfs fetch / ipfs gateway / web3 storage retrieval / nft metadata fetcher / filecoin gateway / decentralized content / pinned-content reader
SYNOPSIS
POST https://x402.org/v1/ipfs-fetch
     Content-Type: application/json
     X-PAYMENT:    <signed-transferWithAuthorization>

     { ... }
↳ first call → 402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.
DESCRIPTION

IPFS fetch / IPFS gateway / Web3 storage retrieval / NFT metadata fetcher / Filecoin gateway / decentralized content / pinned-content reader. Resolves a CID (CIDv0 Qm... or CIDv1 bafy...) and optional sub-path through a fallback chain of public gateways (cloudflare-ipfs.com → ipfs.io → dweb.link) and returns the content as base64 / text / parsed JSON. Hard cap 5 MB. HEAD pre-flight + streaming size cap so oversized files are rejected before they're fully downloaded. No API key required.

INPUTrequest schema
propertytypedescriptionreq?
cidstringIPFS CID, CIDv0 (Qm... base58, 46 chars) or CIDv1 (bafy... base32). Required.required
pathstringOptional sub-path inside the IPFS directory, e.g. '/index.html' or 'metadata.json'. Leading slash optional.optional
max_bytesnumberMaximum response size in bytes. Default 1000000 (1 MB). Hard-capped at 5000000 (5 MB).optional
outputstringHow to return the content. 'base64' (default — safe for binary), 'text' (UTF-8 decode), or 'json' (UTF-8 decode + JSON.parse). Returns 502 if 'json' is requested and the body doesn't parse.
enum: base64 · text · json
optional
OUTPUTresponse shape
fieldtypedescription
cidstringEchoes back the requested IPFS CID (CIDv0 Qm... or CIDv1 bafy...) that was resolved.
gateway_usedstringWhich public gateway served the content (cloudflare-ipfs.com, ipfs.io, or dweb.link).
content_typestringMIME type reported by the gateway, e.g. application/json, image/png, text/plain.
size_bytesstringByte length of the fetched content; capped at 5 MB after HEAD pre-flight check.
contentstringFetched payload as base64 for binary, raw text for text, or parsed JSON when content-type is JSON.
sourcestringOrigin label for the data, typically 'ipfs' indicating the decentralized storage network.
EXAMPLEStwo ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/ipfs-fetch \
  -H 'Content-Type: application/json' \
  -d '{ }'
first response = 402 Payment Required with payment requirements; sign + retry with X-PAYMENT.
EXAMPLE 2 · mcp
# install once
claude mcp add x402 --command "npx x402-deployer-mcp"

# then ask Claude Code:
# "use the ipfs-fetch tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
tags
ipfscid-resolveripfs-gatewaynft-metadatafilecoinweb3-storagedecentralized-contentipfs-fetch
methods
POST
cluster
edgemarket
price
$0.005 USDC per call
ADJACENTother endpoints in edgemarket
endpointdescriptionprice
agent-card-resolveAgent card resolver / ERC-8004 Identity Registry lookup / Trustless Agents / agentId → owner + agentURI / A2A identity / agent.json fetch…$0.005
arbitrage-spreadCross-exchange arbitrage spread / max-min price / CEX price dispersion / spread % calculator.$0.005
basename-resolveBasename resolver / Coinbase Basenames / .base.eth lookup / Base name service / on-chain name resolution.$0.005
defi-yield-poolsDeFi yield pools / APY aggregator / yield-farming opportunities / DeFiLlama yields / cross-protocol APY ranking / stablecoin yields / LP…$0.005
price-impactPrice-impact / slippage estimator / DEX swap size impact / size-keyed quote / depth simulation.$0.005
safe-multisig-statusSafe multisig status / Gnosis Safe info / Safe owners / Safe threshold / Safe pending queue / DAO treasury wallet / Safe wallet lookup.$0.005
stablecoin-monitorStablecoin monitor.$0.005
stablecoin-pegStablecoin peg monitor / depeg detector.$0.005
SEE ALSO
agentutility(7) · edgemarket(7) · x402(7) · mcp(7) · llms.txt · registry.json · bazaar.x402.org