{"uid":"cap_xv79SXAEZhR5Kt-RP17-f","slug":"international-address-formats-postal-code-country-classifier-4b66282d","name":"International Address Formats – Postal Code Country Classifier","description":"Guess which country a postal code belongs to from its shape among candidates, flagging ambiguity honestly.","url":"https://address-formats.x402tookit.com/address-parse-hints?utm_source=zero.xyz","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":["postal_code"],"properties":{"candidates":{"type":"string","description":"Comma-separated ISO country codes to test (default: all)"},"postal_code":{"type":"string","description":"The postal code to classify"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"shape":{"type":["null","string"]},"source":{"type":["null","string"]},"matches":{"type":["array","null"],"items":{"type":"object","properties":{"name":{"type":["null","string"]},"country":{"type":["null","string"]}}}},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"ambiguous":{"type":["boolean","null"]},"dataSource":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"matchCount":{"type":["null","number"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"postalCode":{"type":["null","string"]},"attribution":{"type":["null","string"]},"snapshotDate":{"type":["null","string"]},"testedCountries":{"type":["null","number"]},"matchesTruncated":{"type":["boolean","null"]},"testedWithoutPattern":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dJnUO25ahDBFLGbTf7WHn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Guesses which country or countries a postal code belongs to based on its format/shape, flagging ambiguity when multiple countries match.","exampleAgentPrompt":"Can you figure out which country the postal code '1010' belongs to? Check it against Austria, Belgium, and Switzerland and tell me if it's ambiguous.","exampleUseCases":[{"title":"Disambiguating an unknown postal code","prompt":"I have the postal code 'EC1A 1BB' and I'm not sure if it's from the UK or Ireland — can you check which country it actually belongs to and tell me if there's any ambiguity?"},{"title":"Validating international checkout address","prompt":"A customer entered '75008' as their postal code but didn't select a country — can you figure out which country that postal code most likely belongs to, checking France, Belgium, and Luxembourg?"},{"title":"Data cleaning for address database","prompt":"I've got a list of postal codes with missing country fields. Start with '10115' — can you identify which country that format matches and flag it if it could belong to more than one country?"}],"resultDescription":"Returns a structured response including the postal code tested, its detected format shape, a list of matching countries with names and codes, a verdict string, an ambiguity flag, reasons for each match, a summary sentence, match count, the number of countries tested, any countries without pattern data, and data source/attribution metadata.","failureModes":["Missing postal_code parameter returns an error","Postal code that matches no country pattern returns empty matches with ambiguous:false and matchCount:0","Degraded flag set true when some countries lack pattern data (testedWithoutPattern > 0)","Ambiguous flag set true when multiple countries match, requiring human review","Very short or numeric-only codes may match many countries simultaneously","Invalid ISO country codes in candidates list may be silently skipped or cause errors"],"whenToPreferThis":"Use this endpoint when you have a postal code string but no associated country, and need to infer or validate which country (or countries) it could belong to — particularly useful for e-commerce checkout validation, data cleaning, address parsing pipelines, and fraud detection. Prefer this over a full address validation service when country is unknown. Use the candidates parameter to narrow the search when you have a short list of likely countries, improving precision and reducing ambiguity.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T12:31:09.352Z","isFirstParty":false,"canonicalSlug":"international-address-formats-postal-code-country-classifier-4b66282d"}