Skip to content

Weather API (mock data)

Current weather and 7-day forecasts that look right for the season, in English and Khmer.

Design a weather screen, a widget or a "should I bring an umbrella?" card without an API key. The Weather API answers for all 25 Cambodian provinces (English and Khmer names) and about 50 world cities, or any latitude and longitude, with temperature, feels-like, humidity, wind, cloud cover, UV index, rain chance and a condition code with text in English and Khmer.

Values are generated from each place’s climate: hot and dry in Cambodia’s April, rainy afternoons from June to October, snow in a Moscow winter. Sunrise, sunset and day length are calculated from the real position of the sun. It is not a real forecast; use a weather service for anything people rely on.

Base URL https://toolorca.com/api/v1 No key · CORS open · JSON · conventions and limits

Endpoints

GET /api/v1/weather/current #

Weather now at a place: temperature, feels like, humidity, wind, clouds, UV, rain and condition, plus sunrise and sunset.

Parameter In Type Description
city query string Place id or name, e.g. phnom-penh, Siem Reap, សៀមរាប or tokyo.
lat / lon query number Coordinates instead of city; the climate of the nearest known place is used.
units query string metric (°C, km/h, mm; default) or imperial (°F, mph, in).
curl 'https://toolorca.com/api/v1/weather/current?city=phnom-penh'
GET /weather/current?city=phnom-penh
Example response
{
  "location": {
    "id": "phnom-penh",
    "name": "Phnom Penh",
    "nameKm": "ភ្នំពេញ",
    "country": "Cambodia",
    "countryCode": "KH",
    "lat": 11.5625,
    "lon": 104.916,
    "timezone": "Asia/Phnom_Penh",
    "utcOffset": "+07:00",
    "localTime": "2026-11-22T02:15+07:00"
  },
  "current": {
    "time": "2026-11-22T02:15+07:00",
    "isDay": false,
    "temperature": 25.1,
    "feelsLike": 25.1,
    "tempMin": 23.9,
    "tempMax": 31.2,
    "humidity": 74,
    "dewPoint": 20.2,
    "pressure": 1013,
    "windSpeed": 9.5,
    "windDeg": 68,
    "windDirection": "ENE",
    "cloudCover": 36,
    "visibility": 10,
    "uvIndex": 0,
    "rainChance": 11,
    "precipitation": 0,
    "condition": {
      "code": 802,
      "text": "Scattered clouds",
      "textKm": "ពពករាយប៉ាយ",
      "icon": "partly-cloudy-night"
    }
  },
  "sun": {
    "sunrise": "2026-11-22T05:59+07:00",
    "sunset": "2026-11-22T17:33+07:00",
    "solarNoon": "2026-11-22T11:46+07:00",
    "dayLength": "11:33"
  },
  "units": {
    "system": "metric",
    "temperature": "°C",
    "windSpeed": "km/h",
    "precipitation": "mm",
    "visibility": "km",
    "pressure": "hPa"
  },
  "mock": true,
  "disclaimer": "Mock weather for learning and prototyping. Generated from climate averages, not a real forecast."
}

GET /api/v1/weather/forecast #

Daily forecast for 1 to 7 days from today (local date): minimum and maximum temperature, rain chance and amount, wind, UV, condition and sun times.

Parameter In Type Description
city query string Place id or name (or lat and lon).
days query integer 1 to 7 (default 7).
units query string metric or imperial.
curl 'https://toolorca.com/api/v1/weather/forecast?city=siem-reap&days=3'
GET /weather/forecast?city=siem-reap&days=3
Example response
{
  "location": {
    "id": "siem-reap",
    "name": "Siem Reap",
    "nameKm": "សៀមរាប",
    "country": "Cambodia",
    "countryCode": "KH",
    "lat": 13.3618,
    "lon": 103.8607,
    "timezone": "Asia/Phnom_Penh",
    "utcOffset": "+07:00",
    "localTime": "2026-11-22T02:15+07:00"
  },
  "days": 3,
  "data": [
    {
      "date": "2026-11-22",
      "weekday": "Sunday",
      "weekdayKm": "ថ្ងៃអាទិត្យ",
      "tempMin": 22.9,
      "tempMax": 32.6,
      "feelsLikeMax": 35.5,
      "humidity": 65,
      "windSpeed": 13.6,
      "windDeg": 38,
      "windDirection": "NE",
      "cloudCover": 14,
      "rainChance": 17,
      "precipitation": 0,
      "uvIndex": 7,
      "condition": {
        "code": 800,
        "text": "Clear sky",
        "textKm": "មេឃស្រឡះ",
        "icon": "clear-day"
      },
      "sunrise": "2026-11-22T06:06+07:00",
      "sunset": "2026-11-22T17:34+07:00",
      "solarNoon": "2026-11-22T11:50+07:00",
      "dayLength": "11:28"
    },
    {
      "date": "2026-11-23",
      "weekday": "Monday",
      "weekdayKm": "ថ្ងៃច័ន្ទ",
      "tempMin": 20.9,
      "tempMax": 30.2,
      "feelsLikeMax": 32,
      "humidity": 69,
      "windSpeed": 12.2,
      "windDeg": 68,
      "windDirection": "ENE",
      "cloudCover": 30,
      "rainChance": 11,
      "precipitation": 0,
      "uvIndex": 6,
      "condition": {
        "code": 801,
        "text": "Few clouds",
        "textKm": "ពពកតិចតួច",
        "icon": "partly-cloudy-day"
      },
      "sunrise": "2026-11-23T06:07+07:00",
      "sunset": "2026-11-23T17:34+07:00",
      "solarNoon": "2026-11-23T11:51+07:00",
      "dayLength": "11:27"
    },
    {
      "date": "2026-11-24",
      "weekday": "Tuesday",
      "weekdayKm": "ថ្ងៃអង្គារ",
      "tempMin": 20.3,
      "tempMax": 29.9,
      "feelsLikeMax": 30.7,
      "humidity": 64,
      "windSpeed": 11,
      "windDeg": 57,
      "windDirection": "ENE",
      "cloudCover": 17,
      "rainChance": 15,
      "precipitation": 0,
      "uvIndex": 7,
      "condition": {
        "code": 801,
        "text": "Few clouds",
        "textKm": "ពពកតិចតួច",
        "icon": "partly-cloudy-day"
      },
      "sunrise": "2026-11-24T06:07+07:00",
      "sunset": "2026-11-24T17:34+07:00",
      "solarNoon": "2026-11-24T11:51+07:00",
      "dayLength": "11:27"
    }
  ],
  "units": {
    "system": "metric",
    "temperature": "°C",
    "windSpeed": "km/h",
    "precipitation": "mm",
    "visibility": "km",
    "pressure": "hPa"
  },
  "mock": true,
  "disclaimer": "Mock weather for learning and prototyping. Generated from climate averages, not a real forecast."
}

GET /api/v1/weather/cities #

All places you can ask for, with ids, English and Khmer names, coordinates and time zones.

Parameter In Type Description
country query string ISO country code, e.g. KH for the 25 provinces.
type query string province or city.
q query string Search names.
limit query integer Items per page (default 30, max 100). 0 returns the maximum.
skip query integer Items to skip, for offset pagination.
page query integer 1-based page number; used when skip is not given.
curl 'https://toolorca.com/api/v1/weather/cities?country=KH&limit=5'
GET /weather/cities?country=KH&limit=5
Example response
{
  "data": [
    {
      "id": "banteay-meanchey",
      "name": "Banteay Meanchey",
      "nameKm": "បន្ទាយមានជ័យ",
      "country": "Cambodia",
      "countryCode": "KH",
      "lat": 13.7525,
      "lon": 102.5667,
      "timezone": "Asia/Phnom_Penh",
      "type": "province"
    },
    {
      "id": "battambang",
      "name": "Battambang",
      "nameKm": "បាត់ដំបង",
      "country": "Cambodia",
      "countryCode": "KH",
      "lat": 13.0288,
      "lon": 102.9896,
      "timezone": "Asia/Phnom_Penh",
      "type": "province"
    },
    {
      "id": "kampong-cham",
      "name": "Kampong Cham",
      "nameKm": "កំពង់ចាម",
      "country": "Cambodia",
      "countryCode": "KH",
      "lat": 12,
      "lon": 105.4667,
      "timezone": "Asia/Phnom_Penh",
      "type": "province"
    },
    "… 2 more"
  ],
  "meta": {
    "total": 25,
    "limit": 5,
    "skip": 0,
    "page": 1,
    "pages": 5
  }
}

GET /api/v1/weather/conditions #

The condition codes with English and Khmer text and an icon name, to build your own icon set.

curl 'https://toolorca.com/api/v1/weather/conditions'
GET /weather/conditions
Example response
{
  "data": [
    {
      "code": 200,
      "text": "Thunderstorm with light rain",
      "textKm": "ផ្គររន្ទះមានភ្លៀងធ្លាក់តិចៗ",
      "icon": "thunderstorm"
    },
    {
      "code": 201,
      "text": "Thunderstorm with rain",
      "textKm": "ផ្គររន្ទះមានភ្លៀងធ្លាក់",
      "icon": "thunderstorm"
    },
    {
      "code": 211,
      "text": "Thunderstorm",
      "textKm": "ផ្គររន្ទះ",
      "icon": "thunderstorm"
    },
    "… 12 more"
  ],
  "meta": {
    "total": 15,
    "note": "Codes follow the common OpenWeather numbering: 2xx thunderstorm, 3xx drizzle, 5xx rain, 6xx snow, 7xx fog, 800 clear, 80x clouds."
  }
}

Condition codes and icons

Codes follow the common OpenWeather numbering, so code written for that service maps easily: 2xx thunderstorm, 3xx drizzle, 5xx rain, 6xx snow, 741 fog, 800 clear sky and 801–804 clouds. The icon field is a simple name such as clear-day, partly-cloudy-night, rain or thunderstorm that you can map to your own images.

Free daily limit

Shared with the other mock services: 50 requests per day and 10 per minute per IP address, shown in the X-RateLimit-Daily-* headers. Current weather changes every hour and forecasts once a day, so cache responses for at least 10 minutes.

Frequently asked questions

Is this real weather?

No. It is generated from climate averages for each place and season, so it is realistic for designs and tests but not a forecast.

Which Cambodian places are covered?

All 24 provinces and Phnom Penh, by id (e.g. kampong-cham), English name or Khmer name. /weather/cities?country=KH lists them.

Are sunrise and sunset times correct?

Yes, they are calculated from latitude, longitude and date with the standard solar formula, in the place’s local time zone.

Can I get the text in Khmer?

Every condition has text in English and textKm in Khmer, and forecast days include weekdayKm.

More free APIs