BYTETOOLS

dati.gov.it API

Free Italian open data API with no key: 65,000+ datasets, heavily municipal, on a CKAN mounted under /opendata. CORS is off, so call it server-side. Tested example included.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the dati.gov.it API?

dati.gov.it is Italy's national open data catalogue, exposing a free, key-free CKAN API with more than 65,000 datasets. Its API lives under an `/opendata` path prefix rather than at the site root, and it sends no CORS headers, so browser JavaScript cannot call it directly.

Two practical facts shape how you use this one. First, the API is mounted at `/opendata/api/3/action/...`; drop the `opendata` segment and you get the portal's HTML shell with a 404, which is the most common reason people conclude the API does not exist. Second, no `Access-Control-Allow-Origin` header comes back at all, so a `fetch()` from a browser will be blocked. Proxy it through your own backend.

The catalogue's centre of gravity is local rather than national. A plain search surfaces records from bodies like the Comune di Mandello del Lario long before it surfaces a ministry, because thousands of Italian municipalities publish demographic, budget and planning extracts through the regional aggregators that dati.gov.it harvests. Dataset `name` slugs are frequently 64-character SHA-256 hashes generated by that harvest chain, so use `id` or the human `title` for anything user-facing, and expect `license_id` to be null on a large share of records.

Quick facts

Base URL
https://www.dati.gov.it/opendata/api/3/action
Authentication
No API key for reads. Publishing is done through the regional catalogues that dati.gov.it harvests, not through this endpoint.
Rate limit
No published limit. Keep page sizes modest.
Pricing
Free. Licences are often null on harvested records; check the source catalogue before reuse.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the dati.gov.it API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Search Italian government datasets

GET https://www.dati.gov.it/opendata/api/3/action/package_search?rows=1

curl
curl 'https://www.dati.gov.it/opendata/api/3/action/package_search?rows=1'
JavaScript (fetch)
const res = await fetch("https://www.dati.gov.it/opendata/api/3/action/package_search?rows=1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://www.dati.gov.it/opendata/api/3/action/package_search?rows=1", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "help": "https://www.dati.gov.it/opendata/api/3/action/help_show?name=package_search",
  "success": true,
  "result": {
    "count": 65865,
    "facets": {},
    "results": [
      {
        "author": null,
        "author_email": null,
        "creator_user_id": "d44c17b1-5c95-4403-ae56-a01a72c3b89f",
        "id": "6cc08414-75cd-42e8-9ee9-996ab87892f2",
        "isopen": false,
        "license_id": null,
        "license_title": null,
        "maintainer": null,
        "maintainer_email": null,
        "metadata_created": "2026-08-19T08:42:10.169423",
        "metadata_modified": "2026-08-20T06:40:21.380058",
        "name": "1d11c91ef3d9a3a727d3b61d7ec0e799d3cdca6fc0ee41053f8d9c4b1f6a3ff9",
        "notes": "Composizione della popolazione residente per fasce di eta' e sesso",
        "num_resources": 1,
        "num_tags": 3,
        "organization": {
          "id": "42c175f4-59d4-4f23-85f6-e9d6e8c9f920",
          "name": "comune-di-mandello-del-lario",
          "title": "Comune di Mandello del Lario",
          "type": "organization",
          "description": "",
          "image_url": "",
          "created": "2025-04-14T10:43:04.033479",
          "is_organization": true,
          "approval_status": "approved",
          "state": "active"
        },
        "owner_org": "42c175f4-59d4-4f23-85f6-e9d6e8c9f920",
        "private": false,
        "state": "active",
        "title": "Analisi demografica - Popolazione residente",
        "type": "dataset",
        "url": "https://www.comune.mandello.lc.it/it-it/amministrazione-trasparente/altri-contenuti/accessibi

Parameters

ParameterTypeRequiredDescription
qqueryOptionalFree-text Solr query in Italian across titles, notes and tags. popolazione
rowsqueryOptionalDatasets per page. Defaults to 20. 1
startqueryOptionalPagination offset. 0
fqqueryOptionalFilter query, typically by the publishing body. organization:comune-di-milano
sortqueryOptionalSort order, such as most recently modified. metadata_modified desc

Response fields

successboolean
CKAN's success flag. HTTP 200 does not imply it is true.
result.countinteger
Total matching datasets — 65,865 unfiltered when tested.
results[].namestring
URL slug, very often a 64-character hash rather than readable text. Prefer `id` or `title`.
results[].title / notesstring
Italian-language title and description. No English fields.
results[].organizationobject
Publishing body, frequently a `comune-di-*` municipality rather than a ministry.
results[].license_id / license_titlenull or string
Null on many harvested records. Absence of a licence is not a grant of one.
results[].num_resourcesinteger
Count of attached files or services; many municipal records carry exactly one CSV.

What you can build with the dati.gov.it API

  • Search Italian municipal budget and demographic releases programmatically
  • Build a regional dataset monitor for a specific comune or region
  • Harvest Italian metadata into a multi-country catalogue
  • Find direct CSV download URLs for local statistics

Common errors and how to fix them

404 on /api/3/action/...

The `/opendata` path segment is missing.

Fix: The correct base is `https://www.dati.gov.it/opendata/api/3/action/`. This is the single most common mistake with this portal.

CORS error in the browser

dati.gov.it sends no Access-Control-Allow-Origin header.

Fix: Call it from a server or serverless function and pass the result to your front end.

HTTP 200 with success false

CKAN rejected your parameters.

Fix: Read `error.message` in the response body.

Unreadable dataset slugs

Harvested records get hash-based `name` values.

Fix: Display `title` and link by `id`; never assume `name` is human-readable.

dati.gov.it API — frequently asked questions

Why does the dati.gov.it API return 404?

Almost always because the `/opendata` prefix was left out. The endpoint is `https://www.dati.gov.it/opendata/api/3/action/package_search`, not `https://www.dati.gov.it/api/3/action/package_search`.

Can I call dati.gov.it from browser JavaScript?

No. It returns no CORS headers, so the browser will block the response. Route the call through your own server, which also lets you cache it.

Why are most results from small towns rather than ministries?

The portal harvests from regional aggregators into which thousands of comuni publish. Municipal demographic and budget extracts vastly outnumber national datasets, so filter by `organization` if you want ministry-level data.

Is Italian open data free to reuse commercially?

Usually, under CC BY or IODL, but `license_id` is null on many harvested records. Follow the resource back to the publishing comune or region and check there before commercial reuse.

Tools that pair with this API

dati.gov.it is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.