# Get weather by coordinates

> `GET /weather?lat=&lon=` · Section: Data AI — Weather · PaperOffice AI API, release `R20261020.1917`.

`GET https://api.paperoffice.ai/latest/weather`

## Overview
Returns current weather and a multi-day forecast for **GPS coordinates**.

Use **Tool-ID** `po_weather_by_coordinates`. For city-based lookup use `po_weather_by_city` (same path, different required fields). For IP-based lookup use `po_weather_by_ip` (`GET /ip2location/weather`).

## Required query parameters
- **lat** — latitude (e.g. `52.52` for Berlin)
- **lon** — longitude (e.g. `13.405` for Berlin)

Optional: **lang** — response language (default `en`).

## Example
`GET /weather?lat=52.52&lon=13.405&lang=de`

## Error example (HTTP 400)
Missing location input:

```json
{
"status": "error",
"code": "MISSING_LOCATION_INPUT",
"message": "Provide lat and lon (or latitude and longitude), or city (country optional)."
}
```

Validation errors are not billed.

**API reference:** `po-weather-by-coordinates` (documentation ID; not a `/job/add/` pipeline slug) • **Cost:** 10 credits (base, at Start-SLA `no_sla` / ×1; higher lanes multiply job price)

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `lat` | number | Yes | Latitude (-90 to 90). |
| `lon` | number | Yes | Longitude (-180 to 180). |
| `lang` | string | No | Response language for condition text (e.g. de, en). (default: "en") |

## Responses

Returns JSON with `status: "success"`; most endpoints use top-level fields, jobs use `result` or `job_result`, some account endpoints use `data`. Optional `_billing` and `processing_time`. Errors: HTTP 4xx/5xx with `status: "error"`, `code`, and `message`.

## Essentials (all endpoints)

- **Base URL:** `https://api.paperoffice.ai/latest` · **Auth:** `Authorization: Bearer po_sk_…` or `po_ut_…` (server-side only); browser code uses `po_pk_…` with an allowlisted `Origin`. No Bearer at all on a product API returns HTTP 403 `TIER_RESTRICTED`.
- **Errors:** HTTP 4xx/5xx with `status: "error"`, `code` and `message`. Retry 429 (`Retry-After`) and 5xx with exponential backoff; do not retry validation errors.
- **Jobs:** `client_wait=true` (default) holds the connection. HTTP 202 means the job is still running — poll `GET /job/get/{job_id}` every 5–10 s until `job_status` is `completed`, then read `result ?? job_result`. `processing_lane` sets the Start-SLA; legacy `priority` is not part of the public contract.
- **Billing:** every billable product call costs at least 5 credits; read `_billing.job.credits_billed` on billed responses.
- **Mutations** use `POST` with action paths (e.g. `POST /documents/document-delete`), not HTTP `DELETE`.

---

All endpoints: [llms.txt](https://api.paperoffice.ai/latest/docs/llms.txt) · Everything in one file: [llms-full.txt](https://api.paperoffice.ai/latest/docs/llms-full.txt) · [OpenAPI 3.1](https://api.paperoffice.ai/latest/docs/openapi.json) · This page: https://api.paperoffice.ai/latest/docs/endpoints/po-weather-by-coordinates.md

*Generated 2026-10-20 from live API documentation (release `R20261020.1917`).*
