{"uid":"cap_dCFcQyF3aBTJBTKudH7cB","slug":"bitcoin-address-validator-7d457e88","name":"Bitcoin Address Validator","description":"Validate and classify one Bitcoin address: valid or not (with the reason), type (P2PKH, P2SH, P2WPKH, P2WSH, P2TR), witness version and scriptPubKey.","url":"https://diamond.btc-intel.workers.dev/api/x402/address_info?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["addr"],"properties":{"addr":{"type":"string","maxLength":100,"description":"A Bitcoin address to validate"}},"additionalProperties":false}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"type":"p2wpkh","valid":true,"address":"bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4","product":"address_info","script_pub_key":"0014751e76e8199196d454941c45d1b3a323f1433bd6","witness_version":0}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6FnrMv-xkRTczheJWgQk2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a Bitcoin address and returns its type (P2PKH, P2SH, P2WPKH, P2WSH, P2TR), witness version, and scriptPubKey","exampleAgentPrompt":"Can you check if bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq is a valid Bitcoin address and tell me what type it is?","exampleUseCases":[{"title":"Pre-send address sanity check","prompt":"Before I send any Bitcoin, can you verify that 1A1zP1eP5QGefi2DMPTfTL5SLmv7Divf Na is a valid address and what kind it is?"},{"title":"Taproot address identification","prompt":"I got this address from a new wallet: bc1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqkedrcr — is it a valid taproot (P2TR) address?"},{"title":"Developer address format verification","prompt":"I'm building a Bitcoin payment flow and want to confirm this P2SH address 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy is correctly formatted and get its scriptPubKey."}],"resultDescription":"Returns a JSON object with: the original address, a boolean 'valid' flag, the address type string (p2pkh, p2sh, p2wpkh, p2wsh, p2tr), the witness_version (integer, null for legacy), the scriptPubKey hex string, and a reason if the address is invalid.","failureModes":["Missing 'addr' query parameter returns an error","Malformed or garbage string returns valid=false with a reason explaining the failure","Non-Bitcoin addresses (Ethereum, Litecoin, etc.) will return invalid","Network errors from the Cloudflare Worker may return 5xx responses","Very long strings exceeding 100 characters may be rejected"],"whenToPreferThis":"Use this endpoint when you need a quick, structured classification of a single Bitcoin address — not just a yes/no, but the full type, witness version, and scriptPubKey. Prefer this over manual regex checks or general blockchain explorers when you need machine-readable output for downstream logic (e.g., constructing transactions, enforcing address-type policies, or validating user input before sending funds).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T00:03:22.348Z","isFirstParty":false,"canonicalSlug":"bitcoin-address-validator-7d457e88"}