Prayer Times API

A comprehensive REST API for accessing accurate Islamic prayer times data for locations in Kerala, India. Free, fast, and reliable.

API Overview

Everything you need to know to get started with our Prayer Times API

Features

  • Accurate prayer times for locations in Kerala
  • Daily, monthly, and yearly data formats
  • RESTful JSON API with consistent responses
  • No authentication required
  • Fast and reliable service
  • CORS enabled for web applications

Quick Start

# Get today's prayer times for Kuttiady Assembly Constituency
curl -X GET \
/v1/timesheets/Kuttiady_Assembly_Constituency/today.json

Base URL

Authentication

No Authentication Required

This API is completely open and does not require any API keys, tokens, or authentication headers. Simply make requests to the endpoints directly and start integrating immediately.

API Endpoints

Explore all available endpoints and their usage

Get Available Locations

GET
GET
/v1/timesheets/index.json

Returns an array of all available location identifiers that you can use for fetching prayer times.

Response Example
[ "Kozhikode_North_Assembly_Constituency", "Chandrika_Calicut_2011", "Arookutty_Vaduthala", "Kalpetta_Assembly_Constituency" ]

Get Today's Prayer Times

GET
GET
/v1/timesheets/{location}/today.json

Parameters

{location} - Location identifier with underscores instead of spaces
Response Example
{ "date": "29-08-2025", "subh": "4:57 AM", "duhr": "12:31 PM", "asar": "3:38 PM", "maghrib": "6:43 PM", "isha": "7:53 PM", "sunrise": "6:17 AM" }

Get Month's Prayer Times

GET
GET
/v1/timesheets/{location}/month.json

Returns prayer times for the current month as an array of objects.

Response Example
[ { "date": "01-08-2025", "subh": "4:52 AM", "duhr": "12:37 PM", "asar": "3:53 PM", "maghrib": "6:56 PM", "isha": "8:09 PM", "sunrise": "6:15 AM" }, { "date": "02-08-2025", "subh": "4:52 AM", "duhr": "12:37 PM", "asar": "3:53 PM", "maghrib": "6:55 PM", "isha": "8:09 PM", "sunrise": "6:15 AM" } ]

Get Year's Prayer Times

GET
GET
/v1/timesheets/{location}/year.json

Returns prayer times for the entire current year as an array of objects.

Response Format

Data Formats

  • Time: 12-hour format (hh:mm AM/PM)
  • Date: DD-MM-YYYY format
  • Location: Underscore separated identifiers

Error Responses

404 Not Found
When location or file doesn't exist

Code Examples

Integration examples in different programming languages

JavaScript (Fetch)

// Fetch today's prayer times async function getPrayerTimes(location) { try { const response = await fetch( `/v1/timesheets/${location}/today.json` ); const data = await response.json(); console.log(data); } catch (error) { console.error('Error:', error); } } getPrayerTimes('Kuttiady_Assembly_Constituency');

cURL

# Get locations curl -X GET /v1/timesheets/index.json # Get today's times curl -X GET \ /v1/timesheets/Kuttiady_Assembly_Constituency/today.json # Get month's times curl -X GET \ /v1/timesheets/Mumbai/month.json

Python (Requests)

import requests def get_prayer_times(location, period='today'): url = f"/v1/timesheets/{location}/{period}.json" try: response = requests.get(url) response.raise_for_status() return response.json() except requests.exceptions.RequestException as e: print(f"Error: {e}") return None # Usage data = get_prayer_times('Istanbul', 'today') print(data)

Node.js (Axios)

const axios = require('axios'); async function fetchPrayerTimes(location) { try { const response = await axios.get( `/v1/timesheets/${location}/today.json` ); return response.data; } catch (error) { console.error('Request failed:', error); } } // Usage fetchPrayerTimes('London').then(data => { console.log(data); });

Interactive API Playground

Test the API endpoints directly from your browser

Request Details

Select location and period, then click fetch to see request details

API Response

Select options and click "Fetch Prayer Times" to see the API response

Best Practices

Usage Guidelines

  • Cache responses to reduce API calls
  • Use appropriate time period endpoints
  • Handle 404 errors gracefully
  • Validate location names before requests

Error Handling

if (response.status === 404) { console.log('Location not found'); } else if (!response.ok) { console.log('API error:', response.status); }