Get Search results from Name ,Latitude and Longitude
Example code is provided for both JavaScript , along with a response schema.
Route Schema (URL)
https://api.pewds.vercel.app/foodpanda/search/{latitude}/{longitude}/{query}?type={type}path Parameters.
| Parameter | Type | Description | Required? | Default |
|---|---|---|---|---|
| latitude | string | Latitude of selected location. | Yes | N/A |
| longitude | string | Longitude of selected location. | Yes | N/A |
| query | string | The search query; i.e. the name of the restaurant or menu you are looking for. | Yes | N/A |
Query Parameters.
| Parameter | Type | Description | Required? | Default |
|---|---|---|---|---|
| type | string | Available types (2): "delivery" "pickup" | No | N/A |
| per_page | string | The numb of results per page to return. | No | 48 |
Request Samples
import axios from "axios";
// Example request using no paramters
const url = "https://api.pewds.vercel.app/foodpanda/search/23.7701456/90.3768805/burger?per_page=2&type=pickup";
const data = async () => {
try {
const { data } = await axios.get(url);
return data;
} catch (err) {
throw new Error(err.message);
}
};
console.log(data);Response Schema
MIME Type: application/json
[
{
"total": string,
"items": [
{
},
{
}
]
}
]