Extract Address is the “other”-category specialist service in thcode’s AI for Thai catalog. It takes a Thai free-text address string — the kind found in form submissions, chat messages, shipping labels, or scraped web content — and parses it into discrete structured components: house number, street, subdistrict, district, province, and postal code. This is especially valuable in applications that handle delivery logistics, user profile data, or any workflow that must normalize unstructured Thai addresses before storing or routing them.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Temicide/thcode/llms.txt
Use this file to discover all available pages before exploring further.
Extract Address is catalogued in this release. It is discoverable and fully inspectable via
/tools, but the endpoint mapping, live transport, and contract test are a subsequent integration phase. Invoking the service now returns a stub refusal: "Catalogued — Not available yet".Service Identity
| Field | Value |
|---|---|
| Service ID | extract-address |
| Upstream name | Extract Address |
| Thai name | แยกที่อยู่ |
| Category | other |
| Modality | text |
| Endpoint | https://api.aiforthai.in.th/textmedad |
| Support level | catalogued |
| Contract ver. | 1.0.0 |
| Adapter ver. | 1.0.0 |
Search Terms
The router matches Extract Address against the following terms. You can use any of them in the/tools search command:
Handler: Input Contract
TheExtractAddressSpecialistHandler builds a transport request from a text artifact. The handler reads the first prepared artifact, preferring the text property and falling back to extractedText when text is absent. The plain text string is then sent as a JSON body.
Request body sent to the Extract Address endpoint
POST to https://api.aiforthai.in.th/textmedad with:
Authorization: Bearer <key>— the raw API key is resolved in scope only and never appears in Evidence, logs, or the secret-freeheadersSummary(which shows[redacted]).Content-Type: application/json
Handler: Output Contract
TheExtractAddressSpecialistHandler maps the upstream JSON response into structured address component fields plus confidence and source-span metadata. The upstream response is expected to carry an address object, a top-level confidence number, and a sourceSpans array.
Address Component Fields
Each of the six address components is mapped individually as atext SpecialistFieldValue. A component is present: true only when the upstream address object contains a non-null, non-empty string for that key. Components that are absent, null, empty, or of the wrong type are present: false and listed in emptyFields.
- houseNumber
- street
- subdistrict
- district
- province
- postalCode
Confidence and Source Spans
| Field | Kind | Description |
|---|---|---|
confidence | number | Top-level confidence score. Present when a finite number is returned. Propagated to SpecialistResult.confidence. |
sourceSpans | structured | Array of span objects indicating where in the original text each component was found. Each span must have field, offset, and length. Stored as { items: [...] }. |
Fixture
The handler ships with a deterministic, built-in (non-user) fixture for health probes. The canary usestext/plain as the media type and sends the following address string:
text/plain is rejected before the probe is dispatched.
Use Cases
Delivery & Logistics
Parse a user-entered shipping address into components your backend can validate, geocode, or route independently.
Form Normalization
Convert a single free-text address field collected from a form into a structured record for a database or CRM.
Data Cleaning
Process legacy datasets where Thai addresses were stored as unstructured strings and normalize them in bulk.
User Profile Data
Validate and structure address fields before they are persisted, reducing downstream parsing errors in Thai e-commerce or registration flows.
Using /tools with Extract Address
Inspect the Extract Address catalog entry
Search for address or structured-text services