{"uid":"cap_uZLocxEx3xEexwEnyg9Ug","slug":"x402-deployer-x402-deployer-workers-dev-ce774ff9","name":"IPFS Content Fetcher via Fallback Gateway Chain","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 to ipfs.io to 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.","url":"https://x402-deployer.x402-deployer.workers.dev/ipfs-fetch","method":"POST","headers":{},"bodySchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"properties":{"cid":{"type":"string","description":"IPFS CID, CIDv0 (Qm... base58, 46 chars) or CIDv1 (bafy... base32). Required."},"path":{"type":"string","description":"Optional sub-path inside the IPFS directory, e.g. '/index.html' or 'metadata.json'. Leading slash optional."},"max_bytes":{"type":"number","description":"Maximum response size in bytes. Default 1000000 (1 MB). Hard-capped at 5000000 (5 MB)."},"output":{"type":"string","enum":["base64","text","json"],"description":"How to return the content. 'base64' (default — safe for binary), 'text' (UTF-8 decode), or 'json' (UTF-8 decode + JSON.parse). Returns 424 if every gateway fails or, for 'json', if the body doesn't parse."}},"required":["cid"]}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"cid":{"type":"string"},"gateway_used":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"content":{"type":"string"},"source":{"type":"string"}}}},"required":["type"]}},"required":["input"]},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_aWYLd5B3u4ycsmuefS0fR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Resolves an IPFS CID (v0 or v1) with optional sub-path through a fallback chain of public gateways and returns the content as base64, text, or parsed JSON (max 5 MB).","exampleAgentPrompt":"Can you fetch the content at IPFS CID bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi and return it as parsed JSON?","exampleUseCases":null,"resultDescription":"Returns the resolved content of the IPFS CID as base64, plain text, or parsed JSON depending on the detected content type. Also includes content size and metadata. Files exceeding 5 MB are rejected before full download via HEAD pre-flight check.","failureModes":["CID not found on any gateway in the fallback chain — 404 or timeout","Content exceeds 5 MB hard cap — rejected after HEAD pre-flight","Invalid or malformed CID format — validation error","All gateways unreachable or rate-limited — upstream error","Sub-path does not exist within the resolved content — path error"],"whenToPreferThis":"Use this endpoint when you need to resolve IPFS CIDs without running a local IPFS node, especially for NFT metadata, Web3 content, or pinned files. The fallback gateway chain (Cloudflare → ipfs.io → dweb.link) provides resilience over a single-gateway approach. Prefer over manual gateway calls when you want automatic fallback, size-safety enforcement, and structured output (base64/text/JSON) in one call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:31:29.054Z","isFirstParty":false}