TheShia
Back to all APIs

Qibla direction

Qibla bearing in degrees from true north for any coordinates.

GET https://theshia.org/api/v1/qibla

Parameters

  • lat required latitude, -90 to 90.
  • lng required longitude, -180 to 180.
Open live example ↗

Code samples

curl

curl "https://theshia.org/api/v1/qibla?lat=51.51&lng=-0.13"

JavaScript

const res = await fetch("https://theshia.org/api/v1/qibla?lat=51.51&lng=-0.13");
const data = await res.json();

Python

import requests

data = requests.get("https://theshia.org/api/v1/qibla?lat=51.51&lng=-0.13").json()

Rate limits & fair use

Responses are cached hard at the edge — please cache on your side too. Uncached requests are limited to 100 per minute per IP; oversized requests (over 496 day×method computations) are rejected. Free for community use, no uptime guarantee.