Turkpidya · Turkey Data API

Live Turkey data,
one clean API.

Gold prices, exchange rates, fuel, prayer times and earthquakes — pulled from official Turkish sources, refreshed automatically and served as free JSON. No API keys. No signup. Just GET.

GET https://turkpidya.com/wp-json/turkpidya-data/v1/
USD / TRY TCMB official rate
Gram gold · 24k Harem Altın, 5-min refresh
Latest earthquake Kandilli Observatory
01 · Quickstart

Your first request in ten seconds

Every endpoint is a plain HTTPS GET returning JSON with UTF-8 Turkish characters intact, a last_updated ISO-8601 timestamp (Europe/Istanbul) and honest Cache-Control headers. CORS is enabled — call it straight from the browser.

shell
# Today's official USD/TRY rate from the Turkish central bank
curl https://turkpidya.com/wp-json/turkpidya-data/v1/fx/USD

# Earthquakes above M2 in the last 24 hours
curl "https://turkpidya.com/wp-json/turkpidya-data/v1/earthquakes?min_magnitude=2"
02 · Reference

Endpoints

Base URL https://turkpidya.com/wp-json/turkpidya-data/v1 · all routes are public, read-only GET, rate-limited to 60 requests/min per IP. Sample responses below are real payloads, trimmed for length.

Gold & silver prices

GET/gold

Current gold and silver prices in Turkish lira — gram gold (14k/18k/22k/24k), classic coins (çeyrek, yarım, tam, cumhuriyet, ata) and silver. Sourced from Harem Altın and cross-checked against TCMB.

refresh every 5 min cache 5 min rate limit 60/min
ParamTypeDescription
categorystringall (default) · gram · coin · silver
request
curl "https://turkpidya.com/wp-json/turkpidya-data/v1/gold?category=gram"
Try it live ↗
response · 200
{
  "source": "Harem Altın (cross-checked with TCMB)",
  "currency": "TRY",
  "price_date": "2026-06-09",
  "count": 4,
  "prices": [
    {
      "type": "gram_24k",
      "name_tr": "24 Ayar Altın (Gram)",
      "name_en": "24 Karat Gold (Gram)",
      "category": "gram",
      "buy": 6275.61,
      "sell": 6276.43,
      "change_percent": -1.31,
      "change_amount": -83.27,
      "weight_grams": 1,
      "purity": 99.9
    }
  ],
  "last_updated": "2026-06-09T23:55:04+03:00"
}

Exchange rates

GET/fx GET/fx/{currency}

Turkish lira exchange rates straight from TCMB, the central bank’s official XML feed — forex and banknote buy/sell for 22 currencies. /fx/USD returns a single currency; unknown codes return 404.

refresh daily ~15:35 TRT cache 1 h rate limit 60/min
ParamTypeDescription
currencypathOptional ISO-4217 path segment, e.g. /fx/USD, /fx/EUR
request
curl https://turkpidya.com/wp-json/turkpidya-data/v1/fx/USD
Try it live ↗
response · 200
{
  "source": "TCMB (Central Bank of the Republic of Türkiye)",
  "base": "TRY",
  "rate_date": "2026-06-09",
  "rate": {
    "code": "USD",
    "name_en": "US DOLLAR",
    "name_tr": "ABD DOLARI",
    "unit": 1,
    "forex_buying": 46.0328,
    "forex_selling": 46.1158,
    "banknote_buying": 46.0006,
    "banknote_selling": 46.185
  },
  "last_updated": "2026-06-09T15:35:04+03:00"
}

Earthquakes

GET/earthquakes GET/earthquakes/latest

Recent seismic activity in and around Turkey from Kandilli Observatory (KOERI), polled every five minutes. /earthquakes/latest is a convenience route returning only the most recent event.

refresh every 5 min cache 5 min rate limit 60/min
ParamTypeDescription
hoursintLookback window. Default 24, max 168
min_magnitudefloatMinimum magnitude filter. Default 0
citystringSubstring match on location, e.g. balikesir
limitintDefault 20, max 100
request
curl "https://turkpidya.com/wp-json/turkpidya-data/v1/earthquakes?hours=24&min_magnitude=2&limit=5"
Try it live ↗
response · 200
{
  "source": "Kandilli Observatory (KOERI)",
  "window_hours": 24,
  "min_magnitude": 2,
  "count": 5,
  "earthquakes": [
    {
      "event_id": "K20260610001744-39552776",
      "magnitude": 2.5,
      "depth_km": 12.8,
      "latitude": 39.5552,
      "longitude": 27.7677,
      "location_tr": "KOZOREN-(BALIKESIR)",
      "occurred_at": "2026-06-09T21:17:44+03:00"
    }
  ],
  "last_updated": "2026-06-09T21:25:04+03:00"
}

Prayer times

GET/prayer-times GET/prayer-times/cities

Daily Islamic prayer times for 20 Turkish cities using the Diyanet İşleri calculation method, pre-cached months ahead. /prayer-times/cities lists every available city slug.

refresh daily 03:00 cache ≤ 24 h rate limit 60/min
ParamTypeDescription
citystringRequired. City slug, e.g. istanbul, ankara, izmir
datedateYYYY-MM-DD. Default: today (Europe/Istanbul)
request
curl "https://turkpidya.com/wp-json/turkpidya-data/v1/prayer-times?city=istanbul"
Try it live ↗
response · 200
{
  "source": "Aladhan API (Diyanet İşleri calculation method)",
  "city": "istanbul",
  "date": "2026-06-10",
  "hijri_date": "24 Dhū al-Ḥijjah 1447",
  "calculation_method": "diyanet",
  "times": {
    "fajr": "03:26",
    "sunrise": "05:25",
    "dhuhr": "13:09",
    "asr": "17:08",
    "maghrib": "20:43",
    "isha": "22:33"
  },
  "last_updated": "2026-06-10T00:49:01+03:00"
}

Fuel prices

GET/fuel

Pump prices per litre by city — gasoline (benzin95) and diesel (motorin) — aggregated to city averages from EPDK distributor reports. Currently covers Istanbul, Ankara, Izmir and Antalya.

refresh every 6 h cache 1 h rate limit 60/min
ParamTypeDescription
citystringOptional filter: istanbul · ankara · izmir · antalya
request
curl "https://turkpidya.com/wp-json/turkpidya-data/v1/fuel?city=istanbul"
Try it live ↗
response · 200
{
  "source": "EPDK (Energy Market Regulatory Authority)",
  "currency": "TRY",
  "unit": "per litre",
  "price_date": "2026-06-09",
  "count": 1,
  "cities": {
    "istanbul": {
      "benzin95": { "avg": 62.99, "min": 62.99, "max": 62.99, "brand_count": 2 },
      "motorin":  { "avg": 66.36, "min": 66.36, "max": 66.36, "brand_count": 2 }
    }
  },
  "last_updated": "2026-06-10T01:10:00+03:00"
}

Legacy namespaces turkpidya-gold/v1 and turkpidya-earthquake/v1 continue to work unchanged for existing integrations.

03 · Behaviour

Rate limits & caching

60Requests per minute

Each IP gets 60 requests/min across all routes. Exceed it and you’ll receive HTTP 429 — back off and retry after a minute. Verified search-engine crawlers are exempt.

Cache like we do

Responses carry Cache-Control headers matched to each dataset’s real refresh cycle (5 min for gold and earthquakes, 1 h for FX and fuel). Honor them — polling faster than the source updates buys you nothing.

Never a surprise 500

If a dataset is momentarily empty (e.g. right before a scheduled fetch), endpoints still return HTTP 200 with count: 0 and a note field — your parser never meets a fatal error.

04 · AI assistants

MCP server open source · MIT

turkey-data is a Model Context Protocol server that gives Claude and other AI assistants this entire API as native tools: gold & silver prices, official TCMB lira rates, EPDK fuel pump prices, Diyanet prayer times for 20 cities and the Kandilli earthquake feed — live, with no API key. Requires Node.js ≥ 18.

get_gold_prices get_exchange_rates get_fuel_prices get_prayer_times list_prayer_cities get_earthquakes get_latest_earthquake
claude code
claude mcp add turkey-data -- npx -y turkey-data-mcp

# until the npm listing is live, use the GitHub form:
claude mcp add turkey-data -- npx -y github:bodyegypt/turkey-data-mcp
claude desktop · claude_desktop_config.json
{
  "mcpServers": {
    "turkey-data": {
      "command": "npx",
      "args": ["-y", "turkey-data-mcp"]
    }
  }
}

npm package turkey-data-mcp · MCP registry ID io.github.bodyegypt/turkey-data-mcp (listing imminent). Until npm goes live, swap in github:bodyegypt/turkey-data-mcp — it works today.

View on GitHub ↗
05 · Health data

Medication lookup

Medication equivalence for Turkey — search ~61,000 foreign brands (openFDA US, EMA EU, ANSM/BDPM France) or any active-ingredient name, e.g. Doliprane, and get licensed Turkish products from the TİTCK registry with SGK reimbursement status and bioequivalence groups. Matching is deterministic and ATC-verified — never fuzzy — with five honest verdict classes from exact-equivalent to not-found. German national brands aren’t covered yet; search by active ingredient instead. Information only — not medical advice.

Open the web tool ↗

Medication equivalence

GET/meds/lookup GET/meds/suggest

/meds/lookup resolves a query to a foreign brand or active ingredient and buckets Turkish products into exact_equivalent, same_active_different_strength and same_active_unknown_strength. The verdict field is one of exact_equivalent_available · same_active_different_strength · same_active_unknown_strength · not_available_in_turkey · not_found. /meds/suggest gives deterministic typeahead suggestions (prefix match, max 8). Errors: 400 query too short · 429 rate limit · 503 dataset warming up.

refresh with TİTCK/SGK releases rate limit 60/min
ParamTypeDescription
qstringRequired. Foreign brand name or active ingredient (lookup); ≥ 2-char prefix (suggest)
limitintLookup only: max items per equivalence bucket, 1–25, default 10 (full totals stay in counts)
request
curl "https://turkpidya.com/wp-json/turkpidya-data/v1/meds/lookup?q=Doliprane&limit=3"

curl "https://turkpidya.com/wp-json/turkpidya-data/v1/meds/suggest?q=dolip"
Try it live ↗
response · 200
{
  "query": "Doliprane",
  "resolved_as": "foreign_brand",
  "foreign_match": {
    "brand_name": "DOLIPRANE 100 mg",
    "country": "FR",
    "source": "bdpm",
    "ingredients": ["PARACÉTAMOL"]
  },
  "active_ingredients": [
    { "en": "paracetamol", "tr": "parasetamol", "bridge_verified": true }
  ],
  "atc_codes": ["N02BE01"],
  "verdict": "exact_equivalent_available",
  "turkish_equivalents": {
    "exact_equivalent": [
      {
        "product_name": "ALGOMOL 500 MG TABLET, 20 ADET",
        "barcode": "8699633019217",
        "active_ingredient": "parasetamol",
        "atc_code": "N02BE01",
        "strengths": ["500mg"],
        "suspended": false,
        "sgk_reimbursed": false
      }
    ]
  },
  "counts": {
    "exact_equivalent": 44,
    "same_active_different_strength": 113,
    "same_active_unknown_strength": 32
  },
  "disclaimer": "Information service only — not medical advice. Equivalence means same active ingredient, not certified interchangeability. Always confirm with a pharmacist (eczane) before switching any medication.",
  "data_updated": "2026-06-09"
}
06 · Terms

Free for reasonable use

What “free” means

Use the API in your apps, dashboards, research and side projects at no cost — within the 60 req/min limit, with availability on a best-effort basis. Don’t resell raw feeds or hammer the endpoints.

@Attribution required

If you publish or display this data, credit it with a visible link:

html
Data by <a href="https://turkpidya.com">turkpidya.com</a>

Commercial volume

Need more than 60 req/min, bulk exports, historical data or an uptime commitment? Talk to us:

[email protected]

Data is aggregated from official and public sources (TCMB, EPDK, Kandilli Observatory/KOERI, Diyanet method via Aladhan, Harem Altın) and provided as-is, without warranty. It is not financial, legal or safety advice. An llms.txt is available for AI crawlers.

Built & maintained by Turkpidya · a Pidya Group project · [email protected]