An Open-Meteo API mock for reading weather forecasts.

Your agent looks up places and requests forecasts from seeded locations and climate settings. The test checks the forecast request and that the final answer names San Francisco.

Connect your agent
The test
  • forecast_read

    Calls GET /v1/forecast

  • answer_given

    The final answer mentions San Francisco

Starting records

  • locations

    id
    5391959
    name
    San Francisco
    latitude
    37.7749
    longitude
    -122.4194

Connect your agent to the Open-Meteo mock

When ancha runs your agent, it sets:

  • OPEN_METEO_API_URL
  • OPEN_METEO_GEOCODING_URL

Point the client you already use at them.

const response = await fetch(process.env.OPEN_METEO_API_URL + '/v1/forecast?latitude=52.52&longitude=13.41&hourly=temperature_2m');
const forecast = await response.json();
// Place names: fetch(process.env.OPEN_METEO_GEOCODING_URL + '/v1/search?name=Berlin'). No key, like the real service.

Locally, ancha runs your agent as an ordinary process, so keep real Open-Meteo credentials out of its environment.

See all 2 endpoints

forecast

GET/v1/forecast

search

GET/v1/search

Seed your own data

The data the Open-Meteo mock starts with on every run, cut to a few records. ancha twins seed open-meteo prints every field.

Full seed YAML
twins:
  - open-meteo
seed:
  open-meteo:
    locations:
      - id: 5391959
        name: San Francisco
        country: United States
        country_code: US
        admin1: California
        latitude: 37.7749
        longitude: -122.4194
        elevation: 16
        timezone: America/Los_Angeles
        population: 864816
        climate:
          temperature_mean: 15
          temperature_swing: 5
          wind_mean: 18
          humidity_mean: 72
          rain_chance: 0.15

Check what your agent did

Checks YAML
checks:
  - id: forecast_read
    trace:
      called: GET /v1/forecast
  - id: answer_given
    answer:
      contains:
        - San Francisco

A test can name Open-Meteo with any of the other tools, and your agent works across them in one run.

All 43 tools

Open-Meteo API mock FAQ

How is this different from calling the real Open-Meteo API?

The real API returns the current forecast, which changes between runs. The mock builds its forecast from the places and climate in your test’s seed, so a test sets the weather your agent sees.

How do I make a weather agent encounter rain at a specific hour?

Add an entry to a seeded location’s hours with time, temperature_2m, precipitation and weather_code. For that exact hour, Ancha’s forecast uses those values in place of the climate-generated values.

Why does my daily forecast request need a timezone?

The Open-Meteo mock requires timezone when the request includes daily variables. Use timezone=auto for the nearest seeded location’s timezone or supply an IANA name. Omitting it returns 400 with a reason explaining the requirement.

How does the mock choose between places with similar names?

GET /v1/search matches name against seeded place names, ignoring case, and accepts a countryCode filter. Names beginning with the query come first, followed by higher-population places within each match group.

Install the CLI and run your agent against the Open-Meteo mock.

Book a demo

Ancha is not affiliated with Open-Meteo.