API Documentation

REST API for accessing Bitola Tour Guide data

Introduction

The Bitola Tour Guide API provides programmatic access to location data, categories, and more. All API responses are in JSON format.

Base URL:

https://bitolatourguide.com/api

GET /get-locations.php

Retrieve all locations with optional filtering.

Parameters:

Parameter Type Description
category string Filter by category slug
lang string Language (mk or en)
limit integer Number of results
offset integer Pagination offset
search string Search query

Example Request:

GET /api/get-locations.php?category=city-walk&lang=en&limit=10

Example Response:

{ "success": true, "data": [ { "id": 1, "name": "Clock Tower", "story": "Historical description...", "category_name": "City Walk", "coordinates": { "lat": 41.0266, "lng": 21.3368 }, "images": [...], "audio_guides": { "mk": {...}, "en": {...} } } ], "total": 112, "count": 10, "language": "en" }

GET /get-categories.php

Retrieve all categories with location count.

Parameters:

Parameter Type Description
lang string Language (mk or en)

Example Response:

{ "success": true, "data": [ { "id": 1, "name": "City Walk", "slug": "city-walk", "location_count": 15 } ], "count": 8, "language": "en" }

GET /get-location.php

Retrieve detailed information about a single location.

Parameters:

Parameter Type Description
id integer Location ID (required if slug not provided)
slug string Location slug (alternative to ID)
lang string Language (mk or en)

Example Request:

GET /api/get-location.php?id=1&lang=en

Rate Limiting

The API is currently not rate-limited, but please be respectful and cache responses when possible.

Error Handling

All errors return appropriate HTTP status codes and JSON error messages.

{ "success": false, "error": "Location not found" }