{"uid":"cap_DmDOnUPciJJjIdTtwXI8O","slug":"format-address-api-verify-4f03b91b","name":"Format Address API — Verify","description":"Verified postal address formatting for 252 countries based on Google's libaddressinput metadata: per-country format rules, address-block composition, verification of your own output, and subdivision lists. Address formatting per Google's libaddressinput metadata — informational, not legal or postal advice.","url":"https://formataddress.com/v1/verify","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["country"],"properties":{"city":{"type":"string"},"name":{"type":"string"},"script":{"type":"string","description":"local (default) | latin — latin uses the romanized format where the country has one (JP, CN, KR, TW …)"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, e.g. DE, US, JP, BR"},"address1":{"type":"string"},"address2":{"type":"string"},"formatted":{"type":"string","description":"the complete address block to verify (\\n-separated)"},"postalCode":{"type":"string"},"subdivision":{"type":"string","description":"subdivision as ISO 3166-2 code, native or latin name (e.g. US-CA, CA, California, 東京都, Tokyo)"},"organization":{"type":"string"},"dependentLocality":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"valid":false,"expected":"Max Muster\nMusterstr. 1\n53225 BONN","problems":["expected line '53225 BONN' not found in formatted block"]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4upALomy3BG-KMrUrlapA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates and formats a postal address block against Google's libaddressinput rules for a given country, returning whether the address is valid and what problems were found.","exampleAgentPrompt":"Can you check whether this German address is correctly formatted — 'Max Muster, Musterstr. 1, 53225 BONN' — using country code DE and tell me if there are any problems with it?","exampleUseCases":[{"title":"Validate shipping address before checkout","prompt":"Before we finalize this order, can you verify that the address 'Tanaka Ichiro, 1-1 Shinjuku, Shinjuku-ku, Tokyo 160-0022' is correctly formatted for Japan (JP) and flag any issues?"},{"title":"Check US address formatting for a CRM record","prompt":"I've got a US address in our CRM — '123 Main St, Springfield, IL 62701' — can you validate it against the correct US postal format and let me know if anything looks wrong?"},{"title":"Format Brazilian address in latin script","prompt":"I need to send a package to Brazil and want to make sure the address block 'Rua das Flores 45, São Paulo SP 01310-100' is correctly formatted — can you verify it using country code BR?"}],"resultDescription":"A JSON object with a 'valid' boolean indicating whether the address block is correct, an 'expected' string showing the properly formatted address block (newline-separated), and a 'problems' array listing specific formatting issues found (e.g. missing lines, wrong order, incorrect postal code placement).","failureModes":["Missing required 'country' query parameter — returns an error","Invalid ISO 3166-1 alpha-2 country code — returns an error or unrecognized country response","Malformed or empty formatted address block when using verification mode — may return all lines as problems","Unsupported script value — defaults to local script","Network timeout or service unavailability — HTTP 5xx error","Payment not provided or rejected — HTTP 402 response requiring x402 payment"],"whenToPreferThis":"Choose this endpoint when you need country-aware postal address validation backed by Google's libaddressinput metadata covering 252 countries, particularly when you want both formatting correction and explicit problem identification. Prefer it over generic address validators when you need per-country format rules (field order, required fields, subdivision formats) or when you need to verify an already-composed address block rather than just parse or geocode an address. Not suitable when you need geocoding, coordinate lookup, or legally certified postal verification.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:43:10.915Z","isFirstParty":false}