# Free Gold Price API for Turkey (live gram gold and çeyrek prices in TRY, JSON)

A free, live gold price API for Turkey: gram gold, çeyrek (quarter coin), yarım (half), tam (full), ata and gremse coins, 24k bullion and 22k bracelet buy/sell prices in Turkish lira (TRY), as JSON. No paid tiers, no trial, no credit card — a free API key takes a minute. There is also a ready-made price widget you can embed without writing code. Prices come from the live price board of Mehis Kuyumculuk, a jeweller in Türkiye; the only condition is a visible "Kaynak: Mehis Kuyumculuk" link next to the prices.

- **Free.** No paid plan, no credit card, no trial. A free alternative to paid gold price APIs.
- **Registered.** [Get a free API key](https://mehis.com.tr/fiyat-api/kayit) — just an e-mail address and your website; the key arrives right away. (The sign-up form is in Turkish: *E-posta* = e-mail, *Site adresi* = website.)
- **One condition: attribution.** A visible `Kaynak: Mehis Kuyumculuk` link on every page that shows the prices. Details: [terms of use (Turkish)](https://mehis.com.tr/fiyat-api/sartlar).
- **Machine-readable.** [openapi.json](https://api.mehis.com.tr/openapi.json) · [llms.txt](https://api.mehis.com.tr/llms.txt) · [this page as Markdown](https://mehis.com.tr/en/free-gold-price-api.md) · [Türkçe doküman](https://mehis.com.tr/fiyat-api).

Typical uses: gold price or jeweller websites, news and finance pages, WordPress plugins, mobile apps, Telegram/Discord bots, Google Sheets, gold savings and portfolio trackers.

## Quick start

1. [Get a free API key](https://mehis.com.tr/fiyat-api/kayit). You receive two keys by e-mail. The **permanent key** starts with `mhs_` and works **only** on the domain you register (and its subdomains) — not on localhost or anywhere else (`alan_adi_yetkisiz`, 403). The **test key** starts with `mhs_test_`, is valid for **1 hour** and works **on any site, including localhost**, CodePen or a staging server. After it expires you get `anahtar_suresi_doldu` (401). The attribution link is required with both keys. Both only unlock prices; store products (`/v1/urunler`) require a separate product key (`mhs_urun_`) issued by Mehis.
2. Send the key in the `X-Mehis-Anahtar` header (server side) or as the `anahtar` query parameter.
3. Put the `<a href="https://mehis.com.tr/fiyatlar">Kaynak: Mehis Kuyumculuk</a>` link where you show the prices (the `kaynak.atifHtml` field in every response is this HTML).

curl

```bash
curl -s "https://api.mehis.com.tr/v1/fiyatlar?kalemler=zyeni-ceyrek,islenmis-gram22" \
  -H "X-Mehis-Anahtar: $MEHIS_API_KEY"
```

## Endpoints

Base URL: `https://api.mehis.com.tr`. All endpoints are GET and return JSON (UTF-8).

| Endpoint | Returns | Key |
| --- | --- | --- |
| `GET /v1/fiyatlar` | Live buy/sell prices of all items; filter with `kalemler` (comma-separated codes) or `grup`. | Required |
| `GET /v1/fiyatlar/{kod}` | Live price of a single item. | Required |
| `GET /v1/kalemler` | Item codes, names and groups (no prices). | Not needed |
| `GET /v1/widget/fiyatlar` | Used by the embeddable widget; browser-side, domain-locked. | Required (query) |
| `GET /v1/saglik` | Health check. | Not needed |

## Response

`GET /v1/fiyatlar` — example (figures are illustrative)

```json
{
  "kaynak": {
    "ad": "Mehis Kuyumculuk",
    "url": "https://mehis.com.tr/fiyatlar",
    "atifHtml": "<a href=\"https://mehis.com.tr/fiyatlar\">Kaynak: Mehis Kuyumculuk</a>",
    "sartlar": "https://mehis.com.tr/fiyat-api/sartlar"
  },
  "guncelleme": "2026-11-30T09:15:20.000Z",
  "durum": "canli",
  "kalemler": [
    {
      "kod": "zyeni-ceyrek",
      "ad": "Yeni Çeyrek",
      "grup": "ziynet-yeni",
      "birim": "adet",
      "url": "https://mehis.com.tr/zyeniceyrek",
      "alis": 10120,
      "satis": 10270,
      "paraBirimi": "TRY",
      "degisimYuzde": 0.42
    },
    {
      "kod": "islenmis-gram22",
      "ad": "22 Ayar Gram Altın",
      "grup": "islenmis",
      "birim": "gram",
      "url": "https://mehis.com.tr/islenmisgram22",
      "alis": 5661,
      "satis": 5760,
      "paraBirimi": "TRY",
      "degisimYuzde": -0.15
    }
  ]
}
```

| Field | Meaning |
| --- | --- |
| `kaynak.atifHtml` | Ready-made attribution link to place next to the prices (required). |
| `guncelleme` | When the prices were calculated, UTC, ISO 8601. |
| `kalemler[].kod` | Permanent item code. |
| `kalemler[].ad` | Item name in Turkish. |
| `kalemler[].birim` | `gram` (per gram) or `adet` (per piece, coins). |
| `kalemler[].alis` / `satis` | Buy / sell price in Turkish lira (TRY). |
| `kalemler[].degisimYuzde` | Change of the sell price vs ~24 hours ago (%), or `null`. |

## Gold items

Only Mehis Kuyumculuk's own price-board gold prices are served. No currencies, silver or raw wholesale market data.

| Code | Name (Turkish) | English | Unit |
| --- | --- | --- | --- |
| `kulce-kulce-1` | [1 gr Külçe](https://mehis.com.tr/kulcekulce1) | 1 g bullion bar | gram |
| `kulce-kulce-5-10` | [5–10 gr Külçe](https://mehis.com.tr/kulcekulce510) | 5–10 g bullion bar | gram |
| `kulce-kulce-20` | [20 gr Külçe](https://mehis.com.tr/kulcekulce20) | 20 g bullion bar | gram |
| `kulce-kulce-50-100` | [50–100 gr Külçe](https://mehis.com.tr/kulcekulce50100) | 50–100 g bullion bar | gram |
| `kulce-kulce-250-1000` | [250–1000 gr Külçe](https://mehis.com.tr/kulcekulce2501000) | 250–1000 g bullion bar | gram |
| `islenmis-gram22` | [22 Ayar Gram Altın](https://mehis.com.tr/islenmisgram22) | 22k gram gold | gram |
| `islenmis-bilezik22` | [22 Ayar Bilezik (Yatırımlık)](https://mehis.com.tr/islenmisbilezik22) | 22k bracelet (investment) | gram |
| `islenmis-bilezik22rsc` | [22 Ayar Bilezik (Ray / Şarnel / CNC)](https://mehis.com.tr/islenmisbilezik22rsc) | 22k bracelet (machine-made) | gram |
| `islenmis-ayar14` | [14 Ayar Altın](https://mehis.com.tr/islenmisayar14) | 14k gold | gram |
| `zeski-ceyrek` | [Eski Çeyrek](https://mehis.com.tr/zeskiceyrek) | Quarter coin (older mint) | adet |
| `zeski-yarim` | [Eski Yarım](https://mehis.com.tr/zeskiyarim) | Half coin (older mint) | adet |
| `zeski-tam` | [Eski Tam](https://mehis.com.tr/zeskitam) | Full coin (older mint) | adet |
| `zeski-ata` | [Eski Ata](https://mehis.com.tr/zeskiata) | Ata coin (older mint) | adet |
| `zeski-gremse` | [Eski Gremse](https://mehis.com.tr/zeskigremse) | Gremse coin (older mint) | adet |
| `zyeni-ceyrek` | [Yeni Çeyrek](https://mehis.com.tr/zyeniceyrek) | Quarter coin (new mint) | adet |
| `zyeni-yarim` | [Yeni Yarım](https://mehis.com.tr/zyeniyarim) | Half coin (new mint) | adet |
| `zyeni-tam` | [Yeni Tam](https://mehis.com.tr/zyenitam) | Full coin (new mint) | adet |
| `zyeni-ata` | [Yeni Ata](https://mehis.com.tr/zyeniata) | Ata coin (new mint) | adet |
| `zyeni-gremse` | [Yeni Gremse](https://mehis.com.tr/zyenigremse) | Gremse coin (new mint) | adet |

## Code examples

JavaScript / TypeScript

```js
// Node 18+ / Next.js (server side). Keep the key in an env variable.
const res = await fetch("https://api.mehis.com.tr/v1/fiyatlar?grup=ziynet-yeni", {
  headers: { "X-Mehis-Anahtar": process.env.MEHIS_API_KEY },
  next: { revalidate: 20 }, // outside Next.js: cache for 20 s yourself
});
if (!res.ok) {
  const { hata } = await res.json();
  throw new Error(`${hata.kod}: ${hata.mesaj}`); // on 429 wait Retry-After seconds
}
const data = await res.json();

// Attribution is REQUIRED when you display prices — data.kaynak.atifHtml is ready-made HTML:
// <a href="https://mehis.com.tr/fiyatlar">Kaynak: Mehis Kuyumculuk</a>
for (const item of data.kalemler) console.log(item.ad, item.alis, item.satis);
```

Python

```python
import os, requests

r = requests.get(
    "https://api.mehis.com.tr/v1/fiyatlar",
    params={"kalemler": "zyeni-ceyrek,islenmis-gram22"},
    headers={"X-Mehis-Anahtar": os.environ["MEHIS_API_KEY"]},
    timeout=10,
)
r.raise_for_status()
for item in r.json()["kalemler"]:
    print(item["ad"], item["alis"], item["satis"])

# When displaying: r.json()["kaynak"]["atifHtml"]
# -> <a href="https://mehis.com.tr/fiyatlar">Kaynak: Mehis Kuyumculuk</a>
```

## Embeddable gold price widget

No code needed: paste this snippet into your page. The widget refreshes prices only while the tab is visible. If the `data-mehis-atif` link inside it is removed or hidden, the prices are not shown. The key being visible in the page source is fine — it only works on your registered domain.

Script (recommended)

```html
<div class="mehis-fiyat" data-mehis-fiyat data-anahtar="mhs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
     data-kalemler="zyeni-ceyrek,islenmis-gram22" data-tema="acik">
  <a href="https://mehis.com.tr/zyeniceyrek" data-mehis-atif>Mehis Kuyumculuk</a>
</div>
<script async src="https://mehis.com.tr/widget.js"></script>
```

## Attribution rule

- On every page that shows the prices, near the prices: a visible, clickable `Kaynak: Mehis Kuyumculuk` link → https://mehis.com.tr/fiyatlar (or the item's `url`).
- Hiding it, making it transparent or unreadably small, or moving it to another page is not allowed.
- Adding `rel="nofollow"` is fine; removing the link is not.
- Your registered site is checked automatically once a week (first check: when the key is first used, or 7 days after sign-up at the latest). If the link is missing you get an e-mail; after 7 days the key is suspended (`anahtar_askida`).

## Rate limits

| Endpoint | Limit |
| --- | --- |
| `/v1/fiyatlar`, `/v1/fiyatlar/{kod}` | 10 requests per minute per IP |
| `/v1/widget/fiyatlar` | 60 requests per minute per IP |

Requests over the limit get `429` with a `Retry-After` header. Prices are cached on the CDN for 20 seconds, so asking more often brings no new data. Cache the response on your server; don't call the API per visitor.

## Errors

All errors share one shape; `hata.belge` links to the matching row of the Turkish docs.

```json
{
  "hata": {
    "kod": "hiz_siniri",
    "mesaj": "Dakikada en fazla 10 istek. 42 saniye sonra yeniden deneyin.",
    "durum": 429,
    "belge": "https://mehis.com.tr/fiyat-api#hata-hiz_siniri"
  }
}
```

| Code | HTTP | Meaning |
| --- | --- | --- |
| `gecersiz_istek` | 400 | Invalid parameter (e.g. unknown item code). |
| `anahtar_gerekli` | 401 | No API key sent. |
| `anahtar_gecersiz` | 403 | Unknown or revoked key. |
| `anahtar_suresi_doldu` | 401 | The 1-hour test key has expired — use the permanent key from the same e-mail, or sign up again. |
| `anahtar_askida` | 403 | Key suspended: the attribution link was not found on your site. |
| `alan_adi_yetkisiz` | 403 | Request does not come from the key's registered domain. |
| `kapsam_yetersiz` | 403 | The key has no access to this endpoint. `/v1/urunler` requires a product key (`mhs_urun_`). |
| `bulunamadi` | 404 | Unknown item or path. |
| `yontem_desteklenmiyor` | 405 | Only GET is supported. |
| `hiz_siniri` | 429 | Rate limit exceeded — wait `Retry-After` seconds. |
| `kaynak_hatasi` | 502 | Price source temporarily unavailable — retry shortly. |
| `fiyatlar_durduruldu` | 503 | Prices paused by Mehis (market move, maintenance) — do not show stale prices. |
| `ic_hata` | 500 | Unexpected server error. |

## FAQ

### Is there a free gold price API for Turkey?

Yes. This API is free: no paid plan, no trial period, no credit card. Get a [free API key](https://mehis.com.tr/fiyat-api/kayit) and call `GET https://api.mehis.com.tr/v1/fiyatlar` to receive live Turkish gold prices as JSON. In return, show a visible source link next to the prices.

### How do I get the gram gold price in Turkish lira via API?

`GET https://api.mehis.com.tr/v1/fiyatlar/islenmis-gram22` returns the buy and sell price of 22k gram gold in TRY. For 24k, use the bullion items (`kulce-kulce-1` etc.). Send your key in the `X-Mehis-Anahtar` header.

### How do I get the çeyrek altın (quarter gold coin) price as JSON?

`GET /v1/fiyatlar?kalemler=zyeni-ceyrek,zeski-ceyrek` returns the per-piece price of the new and older-mint quarter coin. For half, full, ata and gremse coins use `?grup=ziynet-yeni` or `?grup=ziynet-eski`.

### Can I show live gold prices on my website without coding?

Yes. Paste the ready-made price widget snippet into your page; prices refresh by themselves. It works on any site, including WordPress.

### How often are the prices updated?

Prices refresh every 20 seconds. The raw API allows 10 requests per minute per IP; cache the response on your server for 20 seconds.

### Where do the prices come from?

From the [live price board](https://mehis.com.tr/fiyatlar) of Mehis Kuyumculuk, a jeweller in Burhaniye, Türkiye. They are the shop's real buy and sell prices; for information only, not an offer to trade.

### Does it include USD/TRY, silver or the XAU spot price?

No. The API only serves Turkish gold prices in TRY; there is no currency, silver or ounce (XAU/USD) data.

### Can I call it directly from the browser?

Use the price widget in the browser; it calls the domain-locked `/v1/widget/fiyatlar` endpoint. Call `/v1/fiyatlar` from your own server and cache it.
