# Geocoding

Geocoding uses latitude and longitude information to provide an address. An optional description of the zoom level provides information suitable for the OpenLayers room level.

{% hint style="info" %}
See the [**API Key Issuance page**](/get-your-api-key.md) for information on using keys.
{% endhint %}

| Method | Request URI                               | Response Type |
| ------ | ----------------------------------------- | ------------- |
| GET    | https\:/api.fatos.biz/search/v1/geocoding | JSON          |

### Parameter

| Parameter | Required | Description                                              | Sample                     |
| --------- | -------- | -------------------------------------------------------- | -------------------------- |
| key       | Y        | Your API Key.                                            | key=xxxxxxxxxxx            |
| cx        | Y        | User's current location X coordinate (wgs84) (Longitude) | cx=126.896038              |
| cy        | Y        | User's current location Y coordinate (wgs84) (Latitude)  | cy=37.482901               |
| lang      | Y        | <p>Search Language<br>Default : en</p>                   | 한국어: kr, 영어: en, 태국어: th … |
| pno       | N        | <p>Page number<br>Default : 1</p>                        | pno=1                      |
| cpp       | N        | <p>Number of searches per page <br>Default : 20</p>      | cpp=20                     |

### Response

|    NAME    |    Type    |                           Description                          |
| :--------: | :--------: | :------------------------------------------------------------: |
|     err    |   string   |      If there is an error, write the contents of the error     |
|    stype   |     int    |      The type of search used for the search. Internal Use      |
|    sort    |     int    |         The sort type used in the search. Internal Use         |
|     pno    |     int    |                           Page number                          |
|     cpp    |     int    |                   Number of searches per page                  |
|    total   |     int    |                       Number of searches                       |
|  src\_type |     int    |                       Not currently used.                      |
| data\_type |     int    |                       Not currently used.                      |
|    items   |    Array   |                           Search list                          |
|     id     |   string   |                            Search ID                           |
|     flg    |     int    |                   Type of data. Internal Use                   |
|     pid    |   string   |                 Parent ID – Not currently used.                |
|     src    |     int    |                           Source Type                          |
|    cate    |   string   |             Large classification code. Internal Use            |
|    dist    | int(meter) |                            Distance                            |
|    entx    |   double   |                Entry point X coordinates (WGs84)               |
|    enty    |   double   |                Entry point Y coordinates (WGs84)               |
|    name    |   string   |                         Expression name                        |
|    posx    |   double   |                  Center X coordinates (WGs84)                  |
|    posy    |   double   |                  Center Y coordinates (WGs84)                  |
|    addr1   |   string   |                             Address                            |
|    addr2   |   string   |                 In Korea, the road name address                |
|    cate2   |   string   |              Division code. – Not currently used.              |
|    phone   |   string   |                Phone number: delimiter comma (,)               |
|    props   |    array   |              POI Properties – Not currently used.              |
|   hassub   |     int    | Sub POI Existence (0: None, Other : Yes) – Not currently used. |
|   s\_dist  | int(meter) |                         Screen Distance                        |
|  addr\_en  |   string   |                       an English address                       |
|   entries  |    array   |        Multiple Entry Points List – Not currently used.        |
|  name\_en  |   string   |                         an English name                        |

### Response Sample

```javascript
{
    "err": null,
    "stype": 4,
    "sort": 2,
    "total": 2,
    "pno": 1,
    "cpp": 2,
    "src_type": null,
    "data_type": 0,
    "items": [
        {
            "id": "899000300",
            "name": null,
            "name_en": null,
            "addr1": "서울 구로구 구로동 222-8",
            "addr2": "서울 구로구 디지털로30길 31",
            "cate": null,
            "cate2": null,
            "geom": "{\"type\":\"Point\",\"coordinates\":[126.896046586,37.482876299]}",
            "posx": 126.89604658558389,
            "posy": 37.48287629854469,
            "entx": 126.89560218600175,
            "enty": 37.48282074177592,
            "hassub": 0,
            "phone": null,
            "pid": null,
            "entries": null,
            "props": null,
            "dist": 3,
            "wgpt": null,
            "src": 8,
            "flg": 3,
            "addr3": "서울 구로구 구로동"
        },
        ...
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fatos-doc.fatos.biz/fatos-api/search/reverse.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
