# The API

The API is a set of plain JSON files, all `GET`, no key, no sign-up. The build writes them; there is no server to fail. The addresses are stable for the life of v1: read [the contract](/api/v1/README.md).

## Start here

| What | Address |
|---|---|
| Catalogue of every source | [https://data.promptugal.news/api/v1/index.json](/api/v1/index.json) |
| OpenAPI 3.1, every path | [https://data.promptugal.news/api/v1/openapi.json](/api/v1/openapi.json) |
| OpenAPI for one source | https://data.promptugal.news/api/v1/<source>/openapi.json |
| Latest read of a source | https://data.promptugal.news/api/v1/<source>/latest.json |
| Every read of a source | https://data.promptugal.news/api/v1/<source>/reads.json |
| A source's card (terms, schedule, vault) | https://data.promptugal.news/api/v1/<source>/card.json |
| Algarve places, now | [https://data.promptugal.news/api/v1/by-place/now/index.json](/api/v1/by-place/now/index.json), then `https://data.promptugal.news/api/v1/by-place/now/<place>.json` |
| Try it in the browser | [API explorer](/api/swagger/) |

```
curl -s https://data.promptugal.news/api/v1/index.json
curl -s https://data.promptugal.news/api/v1/ipma-warnings/latest.json
curl -s https://data.promptugal.news/api/v1/by-place/now/faro.json
```

## Sources and places

Source ids: [adsb-faro](/sources/adsb-faro/), [base-gov-pt](/sources/base-gov-pt/), [cams](/sources/cams/), [events-pt](/sources/events-pt/), [github-pt](/sources/github-pt/), [ipma-city-forecasts](/sources/ipma-city-forecasts/), [ipma-fire-risk](/sources/ipma-fire-risk/), [ipma-observations](/sources/ipma-observations/), [ipma-sea](/sources/ipma-sea/), [ipma-uv](/sources/ipma-uv/), [ipma-warnings](/sources/ipma-warnings/), [meteoalarm-pt](/sources/meteoalarm-pt/), [social](/sources/social/), [storm-charles-archive](/sources/storm-charles-archive/).

Places with a now file: [albufeira](/api/v1/by-place/now/albufeira.json), [alcoutim](/api/v1/by-place/now/alcoutim.json), [algarve](/api/v1/by-place/now/algarve.json), [aljezur](/api/v1/by-place/now/aljezur.json), [castro-marim](/api/v1/by-place/now/castro-marim.json), [faro](/api/v1/by-place/now/faro.json), [lagoa](/api/v1/by-place/now/lagoa.json), [lagos](/api/v1/by-place/now/lagos.json), [loule](/api/v1/by-place/now/loule.json), [monchique](/api/v1/by-place/now/monchique.json), [olhao](/api/v1/by-place/now/olhao.json), [portimao](/api/v1/by-place/now/portimao.json), [quarteira](/api/v1/by-place/now/quarteira.json), [sao-bras-de-alportel](/api/v1/by-place/now/sao-bras-de-alportel.json), [silves](/api/v1/by-place/now/silves.json), [tavira](/api/v1/by-place/now/tavira.json), [vila-do-bispo](/api/v1/by-place/now/vila-do-bispo.json), [vila-real-de-santo-antonio](/api/v1/by-place/now/vila-real-de-santo-antonio.json).

## Every value has a source

Each latest.json has a `provenance` block: the source address, the page a reader would use, the time read, what read it, and the source's terms. Keep the source named when you reuse a value, and check the terms on the card first: they differ.

## CORS

GitHub Pages serves every file with `Access-Control-Allow-Origin: *`, so a browser page on any origin can read these files with `fetch`. The API explorer on this site calls only this site.

## The other four PrompTugal sites

Each site publishes the same kind of catalogue at the same path. These are the intended addresses; this site does not check that they are live yet.

| Site | Catalogue |
|---|---|
| Weather | https://weather.promptugal.news/api/v1/index.json |
| Civic | https://civic.promptugal.news/api/v1/index.json |
| Startups | https://startups.promptugal.news/api/v1/index.json |
| Travel | https://travel.promptugal.news/api/v1/index.json |

## Machine-readable

- [openapi.json](/api/v1/openapi.json)
- [API explorer](/api/swagger/)
- [llms.txt](/llms.txt)
- [sitemap.xml](/sitemap.xml)

---

Version v0.1.47 · data read 2026-11-18 19:18 UTC · Code Apache-2.0; our pages, records and visualisations CC BY 4.0; each source's data under its own licence or terms, linked · [Repository](https://github.com/PrompTugal/PrompTugal__News__Data) · [Pay for what you read](https://promptugal.news/account/) · https://data.promptugal.news/api/
