---
title: "Fetch an external resource server-side and stream it back with"
method: GET
path: "/datasets/proxy/download/"
tags: ["datasets"]
---

# Fetch an external resource server-side and stream it back with

`GET /datasets/proxy/download/`

## Request

- Base URL: `https://dados.gov.pt/api/1`
- URL: `https://dados.gov.pt/api/1/datasets/proxy/download/`
- Auth: none declared

Content-Disposition: attachment so the browser always downloads.

See LEDG-1214. Reuses the harvest SSRF guard, disables redirects on
the outbound request, and caps the streamed body at
DOWNLOAD_PROXY_MAX_BYTES.

## Query parameters

- `url` string, required
- `filename` string
- `dataset` string

## Other responses

- `400`: Missing or invalid 'url' query parameter
- `403`: URL rejected by SSRF guard
- `502`: Upstream fetch failed

## Changes

- **2026-09-11** `1175d034be00`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/dados/apis/udata-api/changes/datasets/proxy/download/get.md)

---

[API](https://skmtc.dev/dados/apis/udata-api.md) - [All operations](https://skmtc.dev/dados/apis/udata-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dados/apis/udata-api/revisions/77edaf8a00ea?raw)
