# INDIA-HOTEL

<mark style="color:blue;">`GET`</mark> `https://api.kosontechnology.com/india-hotel.php`

This API script is designed to retrieve information from the India Hotel info database using provided parameters.

#### Path Parameters

| Name     | Type   | Description                                |
| -------- | ------ | ------------------------------------------ |
| State    | String | To specify the desired state within India. |
| City     | String | To specify the desired city within India.  |
| Category | String | To specify the desired hotel category.     |
| download | -      | To download the json file                  |

{% hint style="info" %}
This API script is designed to retrieve information from the India hotel info database using provided parameters. The script constructs the appropriate URL based on the parameters provided and then fetches data from the API. Please follow the instructions below to use this script effectively.
{% endhint %}

## **Usage**

1. Making an HTTP request via a web browser or API Platform etc. [Postman](https://www.postman.com/).
2. The following parameters are accepted:

<table><thead><tr><th width="139.20000000000002">Name</th><th width="269">Description</th><th>Format</th></tr></thead><tbody><tr><td>State</td><td>To specify the desired state within India.</td><td><ul><li>State Name. Etc. <strong>Delhi</strong></li></ul></td></tr><tr><td>City</td><td>To specify the desired city within India.</td><td><ul><li>City Name. Etc. <strong>New Delhi</strong></li></ul></td></tr><tr><td>Category</td><td>To specify the desired hotel category.</td><td><ul><li>Hotel Category. Etc. <strong>5 Star</strong></li></ul></td></tr><tr><td>download</td><td>To download the JSON output</td><td><ul><li>This parameter does not require the content, <strong>Leave empty</strong> or <strong>Type anything</strong> is acceptable.</li></ul></td></tr></tbody></table>

3. Depending on the parameters provided, the script will construct a URL to fetch information from the India hotel database.

## **Parameter Guidelines**.

* **`State` Parameter:**
  * If you provide a state parameter of India state name etc. '**Delhi**', the script will retrieve all hotel information within the selected state.
* **`City` Parameter:**
  * If you provide a `city` parameter of India city name etc. '**New Delhi**', the script will retrieve all hotel information within the selected city.
* **`Category` Parameter:**
  * If you provide a `Category` parameter of hotel category etc. '5 **Star**', the script will retrieve all hotel information that matches the selected category.
* **`download` Parameter:**
  * If you want to `download` the JSON output of these parameter, define the parameter with empty or any input will able you to auto download it. See the download sample at [here](#download).

## List of India States and Cities

Refer this [wikipedia](https://en.wikipedia.org/wiki/List_of_cities_in_India_by_area) to have India's States and Cities List.

## List of Hotel Category

* 1 to 5 Star

## Demo

{% embed url="<https://api.kosontechnology.com/india-hotel.php>" %}
Retrieve all hotel data from database.
{% endembed %}

{% embed url="<https://api.kosontechnology.com/india-hotel.php?State=Delhi>" %}
all hotel data from Delhi State
{% endembed %}

{% embed url="<https://api.kosontechnology.com/india-hotel.php?City=Delhi>" %}
all hotel data from Delhi City
{% endembed %}

{% embed url="<https://api.kosontechnology.com/india-hotel.php?Category=1%20Star>" %}
all hotel data with 1 Star Category
{% endembed %}

## Download

Add download at the back of the link to download the database in json format.

{% embed url="<https://api.kosontechnology.com/india-hotel.php?Category=1%20Star&download>" %}
download all hotel data with 1 Star Category
{% endembed %}


---

# 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://api-gitbook.kosontechnology.com/india-hotel.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.
