# Nsbd Swj Beijing — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Monitor real-time and historical precipitation levels across Beijing's hydrological stations to track rainfall patterns and water levels in your area. Get detailed precipitation data directly from the Beijing Water Authority to support weather forecasting, flood prevention planning, or environmental research.

**Category:** Weather | **Website:** [nsbd.swj.beijing.gov.cn/csyq1.html](https://nsbd.swj.beijing.gov.cn/csyq1.html) | **Docs:** [parse.bot/marketplace/14e000e0-6990-40a1-b9d7-8f3079ff3d25/nsbd-swj-beijing-gov-cn-api](https://parse.bot/marketplace/14e000e0-6990-40a1-b9d7-8f3079ff3d25/nsbd-swj-beijing-gov-cn-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-nsbd-swj-beijing-gov-cn-api-14e000e0/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_rainfall

Returns rainfall measurements from all monitoring stations in Beijing for a 24-hour period ending at 8:00 AM on the queried date. Includes per-station readings grouped by district and summary statistics (average, maximum, year-to-date cumulative, etc.). When date is omitted, defaults to yesterday.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | No | Query date in ISO format YYYY-MM-DD. The response covers the 24-hour period ending at 8:00 AM on this date. Defaults to yesterday when omitted. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nsbd-swj-beijing-gov-cn-api-14e000e0/get_rainfall \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>"}'
```
