# Harga Emas API

> Returns world gold prices, Antam and Pegadaian gold prices in IDR, and silver prices with the rupiah exchange rate.

Category: Finance & Crypto. Region: ID. 3 endpoints at `https://api.hoshime.com/v1/hargaemas/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/hargaemas
## GET /v1/hargaemas/world

World gold price in USD and IDR per troy ounce, gram and kilogram.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `idr` (string), `idrChange` (string), `name` (string), `unit` (string), `usd` (string), `usdChange` (string)

```bash
curl "https://api.hoshime.com/v1/hargaemas/world" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/hargaemas/domestic

Antam and Pegadaian gold prices in IDR for each weight in grams.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `antam` (string), `grams` (number (double)), `pegadaian` (string)

```bash
curl "https://api.hoshime.com/v1/hargaemas/domestic" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/hargaemas/silver

Silver price of one gram and one troy ounce in IDR and USD, with the rupiah exchange rate.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `change` (string), `changePercent` (number (double)), `label` (string), `price` (string)

```bash
curl "https://api.hoshime.com/v1/hargaemas/silver" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
