My place in the WordPress community
- I have had a wordpress.org account since 2006.
- I contributed to WordPress core for versions 7.0 and 7.1.
- I maintain 30 plugins on wordpress.org.
- I organise and speak at WordCamps.
- I have attended every WordCamp Europe from 2017 to 2026.
- Local WordPress meetup: WordPress Lisboa

The Vasco da Gama Tower above Parque das Nações in Lisbon, a photograph by Haydn Blackey from Cardiff, reused under CC BY-SA 2.0 from Wikimedia Commons.
A Next.js application that shows Portuguese public data, whether it is metropolitan transport in Lisbon, health statistics or energy use, can read it from one place: dados.gov.pt, the national open data portal. The portal has a free REST API, a published OpenAPI specification and terms of use that decide what you may do with the data. I am Mariusz Szatkowski, a Gdynia-based developer who builds Next.js apps on public APIs, remotely and in writing. This page is based on the portal’s API reference, its specification and its terms (in Portuguese, last updated 29 September 2026), read on 4 December 2026. I am not a lawyer, and the licence reading for your project is yours.
What is dados.gov.pt?
The terms of use describe dados.gov.pt as the national open data portal of the Portuguese public administration, developed and managed by the Agência para a Reforma Tecnológica do Estado (ARTE). Public bodies and other registered participants publish datasets there; any user can consult or download them.
Two technical facts help when you plan the integration. The terms say the portal uses uData, the open data platform created by Etalab of the French administration, so the API follows uData conventions. And the portal’s own web interface is a Next.js application: the frontend repository that the footer links to, amagovpt/dadosgov-fe on GitHub, lists next and react among its dependencies.
Do I need a dados.gov.pt API key?
Not for reading. The API reference calls the API open and free, and says an API key is needed to carry out write operations. You get the key in your profile settings and send it in the X-API-KEY HTTP header on every call. API calls have the same permissions as the web interface, so to change a dataset you must belong to the organisation that owns it.
The terms say consulting and downloading the data needs no registration of any kind. A Next.js app that only reads public datasets can therefore call the API without credentials. If the same app also publishes data back, for example a municipality’s own datasets, the key belongs in a server-only environment variable. The Next.js environment variables guide says only variables prefixed with NEXT_PUBLIC_ are inlined into the JavaScript sent to the browser.
How does the API paginate?
The reference describes one pattern for every paginated method. The list sits inside a Page object with data, page, page_size, total, next_page and previous_page. You do not compute the next page yourself: the response carries the URLs, and they are null when there is no previous or next page.
The OpenAPI specification lists the filters on the dataset search endpoint at /api/1/datasets/. Among them are q for the search text, organization, tag, license, format, frequency, temporal_coverage, geozone, modified_since and page_size. A dataset object in the response carries, among other fields, its title, organisation, licence, update frequency, last modification date, temporal coverage and a list of resources with their format and URL.
A server-side function that follows next_page until the end:
// lib/dados.ts
import 'server-only'
type Page<T> = { data: T[]; next_page: string | null; total: number }
export async function allDatasets(query: string) {
let url: string | null =
`https://dados.gov.pt/api/1/datasets/?q=${encodeURIComponent(query)}&page_size=50`
const out = []
while (url) {
const res = await fetch(url, { next: { revalidate: 3600 } })
if (!res.ok) throw new Error(`dados.gov.pt returned ${res.status}`)
const page: Page<Record<string, unknown>> = await res.json()
out.push(...page.data)
url = page.next_page
}
return out
}The Next.js fetch reference says next.revalidate sets the cache lifetime of a resource in seconds. One hour is a sensible start for catalogue metadata; the right value for the data itself follows the frequency the dataset declares.
Which licence applies to a dataset?
The terms set the default: all data uploaded by state bodies is published under Creative Commons CC BY 4.0, unless something else is specified. Other participants may publish under other open licences that the platform offers. Resources inside a dataset fall under the licence of the dataset they belong to.
The licence endpoint at /api/1/datasets/licenses/ shows what “other licences” means in practice. On 4 December 2026 it listed, among others:
| Licence id | Name in the API |
|---|---|
| cc-by | Creative Commons Attribution 4.0 |
| cc-by-sa | Creative Commons Attribution Share-Alike |
| cc-zero | Creative Commons CCZero |
| odc-odbl | Open Data Commons Open Database License |
| cc-by-nc | Creative Commons Attribution-NonCommercial 4.0 |
| cc-by-nc-nd | Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 |
| notspecified | licence not specified |
| unknown | unknown, check at the data source |
The table is the reason a Next.js app should not hard-code one licence. A commercial app cannot treat a cc-by-nc dataset like a cc-by one, and an unknown or notspecified dataset needs a check with the publisher before reuse. I would store the licence id with every dataset the app imports and refuse to publish a dataset whose licence is not on a list you have approved.
What does CC BY 4.0 attribution ask for?
For the default licence, section 3(a) of the CC BY 4.0 legal code sets the conditions when you share the material, including in modified form. You keep the identification of the creators and of others designated for attribution, a copyright notice, a notice referring to the licence and to the disclaimer of warranties, and a link to the material where reasonably practicable, when the licensor supplies them. You say whether you modified the material and keep any earlier indication of changes. And you indicate the licence, with its text or a link to it.
The legal code adds that you may meet these conditions in any reasonable manner based on the medium, and that a link to a resource holding the required information can be reasonable. For an app that combines several datasets, that suggests one sources page listing each dataset with its publisher, link, licence and a note of what the app changed, and a short credit with a link on each view that shows the data. I have read only the CC BY 4.0 text for this page; datasets under the other licences need their own reading.
What else do the terms say about reuse?
A few points from the terms shape the build:
- Personal data. Datasets on the portal cannot contain personal data, except with express consent or a legal provision allowing publication. The reuser must respect the data protection law of their territory and every condition of the licence. If personal data appears by mistake, the terms ask users to report it through the help and contact page.
- Intellectual property inside a dataset. A publisher whose dataset contains elements under intellectual property rights that may block reuse must say so in the documentation. That documentation is worth reading before you build on a dataset.
- Availability. ARTE says it will strive for 99.5% monthly availability, may change or suspend the portal without notice for maintenance, and that unavailability gives no right to compensation.
- No prior control. ARTE does not check publications in advance. Publishers are solely responsible for their data and metadata.
For a Next.js app this argues for caching. If a page depends on dados.gov.pt at request time, the portal’s maintenance window becomes your outage. A copy refreshed on a schedule, with the date of the last successful refresh shown on the page, keeps the app up when the portal is not.
What does the API mean for the code?
The API reference and the terms translate into these build rules:
- Read without keys. Public reads go straight from Server Components or Route Handlers; the API key exists only if the app writes.
- Follow the links. Pagination uses
next_pagefrom the response, never a computed page number. - Licence per dataset. The licence id travels with each dataset into the database and decides whether the app may show it.
- Attribution in one place. A sources page plus a credit component, fed from the stored metadata.
- Cache with dates. Revalidation times match each dataset’s declared frequency, and the page says when the data was last fetched.
- Spec in the repo. The OpenAPI JSON from the portal, saved with the code, so a later change in the API shows up as a diff.
Checklist for a dados.gov.pt integration
- List the datasets the app needs and record each licence id from the API.
- Exclude or clear with the publisher any dataset marked non-commercial, no-derivatives, unknown or not specified, if the use does not fit.
- Build a sources page with publisher, link, licence and changes for every dataset.
- Use the pagination links from the response and cache with revalidation.
- Keep any API key for write operations in a server-only environment variable.
- Store a copy of the OpenAPI specification in the repository.
How does a dados.gov.pt project run?
- You send the datasets or topics, the audience of the app and whether it is commercial. My written reply arrives on the next working day and names the dataset licences I would check first.
- I write the scope with the data model, the licence filter and the attribution plan, and the questions for publishers where a licence is unclear.
- I build on a staging copy with real imports from the portal, and you check the figures and credits on each view.
- After written acceptance I hand over the repository, the import jobs and the list of datasets with their licences.
Dashboards and data views can be designed by me or built from your own design; the Next.js developer page describes the wider offer.
Putting Portuguese open data into a Next.js app?
Send the datasets you have in mind, who will use the app and whether it earns money through the contact page. The first written estimate is free, and it flags any dataset whose licence does not fit the use before the build starts.
Selected projects
Examples of my work.
Real Estate Platform: DUNE CITY
The Dune City website was built for a prestigious apartment complex located on the 10-kilometre spit separating the Baltic ...
Real Estate Platform: lifetree.pl
The lifetree.pl website is a platform dedicated to personal development, healthy lifestyle, and inspiration from nature. The project was created for users se...
Real Estate Platform: linkr.pl
Linkr.pl is an online portal launched in 2007 as an alternative to Wykop.pl, which at that time dominated the Polish “social news” market. The project was in...
WordPress support & development in Lisbon
See also in Portugal
Need this service: Next.js developer in Lisbon?
Describe your project by e-mail. I reply within 24 hours.
Describe your projectExplore other WordPress services and knowledge base
Migration to Astro, Next.js, and headless WordPress.
WooCommerce sync with ERP and wholesale systems.
Business process automation around WordPress and company systems.
Library of concrete automation use cases.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Related categories
Supporting articles

Six to sixteen weeks for typical engagements, with a four-phase shape: discovery, scoping, build and cutover, tuning. The variables are catalogue size, integration count, URL preservation, and editorial team readiness, not framework choice.

A definitive 4-year Total Cost of Ownership (TCO) analysis, real-world Core Web Vitals benchmarks, Astro 7 GraphQL APQ architecture, and a 10-point executive decision matrix for choosing between decoupled and traditional WordPress.

The Shopify Plus vs WooCommerce headless decision in 2026 is no longer a binary "platform vs custom" trade-off. Both can run headless, both integrate AI, both ship at the edge. The real axes are control, total cost over five years, and exit strategy. This article walks the matrix with confirmed platform facts.