dados.gov.pt Dataservices API

Dataservices related operations (beta)

GitHub OpenAPI

Operations 16

GET /dataservices/ List or search all dataservices #
POST /dataservices/ Create dataservice #
GET /dataservices/recent.atom Recent dataservices atom feed #
DELETE /dataservices/{dataservice}/ Delete dataservice #
GET /dataservices/{dataservice}/ Get dataservice #
PATCH /dataservices/{dataservice}/ Update dataservice #
POST /dataservices/{dataservice}/datasets/ Dataservice datasets create #
DELETE /dataservices/{dataservice}/datasets/{dataset}/ Delete dataservice dataset api /dataservices//datasets/… #
DELETE /dataservices/{dataservice}/featured/ Unmark a dataservice as featured #
POST /dataservices/{dataservice}/featured/ Mark a dataservice as featured #
GET /dataservices/{dataservice}/rdf Rdf dataservice #
GET /dataservices/{dataservice}/rdf.{_format} Rdf dataservice format #
DELETE /dataservices/{id}/followers/ Unfollow an object given its ID #
GET /dataservices/{id}/followers/ List all followers for a given object #
POST /dataservices/{id}/followers/ Follow an object given its ID #
GET /dataservices/search/ Search all dataservices #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/open-government-portugal:open-government-portugal-dataservices-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

open-government-portugal-dataservices-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Open Government Portugal Dataservices API
  version: '1.0'
  description: 'Operations tagged dataservices across 2 of this provider''s published API definitions: dados-gov-pt-api-v1-swagger.json, dados-gov-pt-api-v2-swagger.json. Each path carries the servers of the definition it was published in.'
servers:
- url: /api/1
- url: /api/2
tags:
- description: Dataservices related operations (beta)
  name: dataservices
paths:
  /dataservices/:
    get:
      operationId: list_dataservices
      parameters:
      - description: The page to display
        in: query
        name: page
        schema:
          type: integer
          default: 1
      - description: The page size
        in: query
        name: page_size
        schema:
          type: integer
          default: 20
      - description: The field (and direction) on which sorting apply
        in: query
        name: sort
        schema:
          type: string
          enum:
          - followers
          - views
          - title
          - base_api_url
          - created
          - last_modified
          - -followers
          - -views
          - -title
          - -base_api_url
          - -created
          - -last_modified
      - in: query
        name: q
        schema:
          type: string
      - in: query
        name: topic
        schema:
          type: string
      - in: query
        name: reuse
        schema:
          type: string
      - in: query
        name: modified_since
        schema:
          type: string
      - in: query
        name: owner
        schema:
          type: string
      - in: query
        name: organization
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - in: query
        name: organization_badge
        schema:
          type: string
          format: my-custom-format
      - in: query
        name: access_type
        schema:
          type: string
          enum:
          - open
          - open_with_account
          - restricted
      - in: query
        name: tag
        schema:
          type: string
      - in: query
        name: featured
        schema:
          type: boolean
      - in: query
        name: contact_point
        schema:
          type: string
      - in: query
        name: dataset
        schema:
          type: string
      - description: An optional fields mask
        in: header
        name: X-Fields
        schema:
          type: string
          format: mask
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataservicePage'
      summary: List or search all dataservices
      tags:
      - dataservices
    post:
      operationId: create_dataservice
      parameters:
      - description: An optional fields mask
        in: header
        name: X-Fields
        schema:
          type: string
          format: mask
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataservice%20%28read%29'
        '400':
          description: Validation error
      tags:
      - dataservices
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Dataservice%20%28write%29'
        required: true
      summary: Create dataservice
      x-summary-source: derived
    servers:
    - url: /api/1
  /dataservices/recent.atom:
    get:
      operationId: recent_dataservices_atom_feed
      responses:
        '200':
          description: Success
      tags:
      - dataservices
      summary: Recent dataservices atom feed
      x-summary-source: derived
    servers:
    - url: /api/1
  /dataservices/{dataservice}/:
    parameters:
    - in: path
      name: dataservice
      required: true
      schema:
        type: string
    delete:
      operationId: delete_dataservice
      parameters:
      - description: Send formal legal notice with appeal information to owner (admin only)
        in: query
        name: send_legal_notice
        schema:
          type: boolean
          default: false
      responses:
        '204':
          description: dataservice deleted
      tags:
      - dataservices
      summary: Delete dataservice
      x-summary-source: derived
    get:
      operationId: get_dataservice
      parameters:
      - description: An optional fields mask
        in: header
        name: X-Fields
        schema:
          type: string
          format: mask
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataservice%20%28read%29'
      tags:
      - dataservices
      summary: Get dataservice
      x-summary-source: derived
    patch:
      operationId: update_dataservice
      parameters:
      - description: An optional fields mask
        in: header
        name: X-Fields
        schema:
          type: string
          format: mask
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataservice%20%28read%29'
        '400':
          description: Validation error
      tags:
      - dataservices
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Dataservice%20%28write%29'
        required: true
      summary: Update dataservice
      x-summary-source: derived
    servers:
    - url: /api/1
  /dataservices/{dataservice}/datasets/:
    parameters:
    - description: The dataservice ID or slug
      in: path
      name: dataservice
      required: true
      schema:
        type: string
    post:
      operationId: dataservice_datasets_create
      parameters:
      - description: An optional fields mask
        in: header
        name: X-Fields
        schema:
          type: string
          format: mask
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataservice%20%28read%29'
        '400':
          description: Malformed object id(s) in request
        '403':
          description: Forbidden
        '404':
          description: Dataservice not found
        '410':
          description: Dataservice has been deleted
      tags:
      - dataservices
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/DataserviceDatasetsAdd'
              type: array
        required: true
      summary: Dataservice datasets create
      x-summary-source: derived
    servers:
    - url: /api/1
  /dataservices/{dataservice}/datasets/{dataset}/:
    parameters:
    - description: The dataservice ID or slug
      in: path
      name: dataservice
      required: true
      schema:
        type: string
    - in: path
      name: dataset
      required: true
      schema:
        type: string
    delete:
      operationId: delete_dataservice_dataset_api_/dataservices/<dataservice:dataservice>/datasets/<dataset:dataset>/
      responses:
        '404':
          description: Dataservice not found
      tags:
      - dataservices
      summary: Delete dataservice dataset api /dataservices/<dataservice:dataservice>/datasets/…
      x-summary-source: derived
    servers:
    - url: /api/1
  /dataservices/{dataservice}/featured/:
    parameters:
    - description: The dataservice ID or slug
      in: path
      name: dataservice
      required: true
      schema:
        type: string
    delete:
      operationId: unfeature_dataservice
      parameters:
      - description: An optional fields mask
        in: header
        name: X-Fields
        schema:
          type: string
          format: mask
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataservice%20%28read%29'
      summary: Unmark a dataservice as featured
      tags:
      - dataservices
    post:
      operationId: feature_dataservice
      parameters:
      - description: An optional fields mask
        in: header
        name: X-Fields
        schema:
          type: string
          format: mask
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataservice%20%28read%29'
      summary: Mark a dataservice as featured
      tags:
      - dataservices
    servers:
    - url: /api/1
  /dataservices/{dataservice}/rdf:
    parameters:
    - description: The dataservice ID or slug
      in: path
      name: dataservice
      required: true
      schema:
        type: string
    get:
      operationId: rdf_dataservice
      responses:
        '404':
          description: Dataservice not found
        '410':
          description: Dataservice has been deleted
      tags:
      - dataservices
      summary: Rdf dataservice
      x-summary-source: derived
    servers:
    - url: /api/1
  /dataservices/{dataservice}/rdf.{_format}:
    parameters:
    - description: The dataservice ID or slug
      in: path
      name: dataservice
      required: true
      schema:
        type: string
    - in: path
      name: _format
      required: true
      schema:
        type: string
    get:
      operationId: rdf_dataservice_format
      responses:
        '404':
          description: Dataservice not found
        '410':
          description: Dataservice has been deleted
      tags:
      - dataservices
      summary: Rdf dataservice format
      x-summary-source: derived
    servers:
    - url: /api/1
  /dataservices/{id}/followers/:
    parameters:
    - in: path
      name: id
      required: true
      schema:
        type: string
    delete:
      description: Returns the number of followers left after the operation
      operationId: unfollow_dataservice
      responses:
        '200':
          description: Success
      summary: Unfollow an object given its ID
      tags:
      - dataservices
    get:
      operationId: list_dataservice_followers
      parameters:
      - description: The page to fetch
        in: query
        name: page
        schema:
          type: integer
          default: 1
      - description: The page size to fetch
        in: query
        name: page_size
        schema:
          type: integer
          default: 20
      - description: Filter follower by user, it allows to check if a user is following the object
        in: query
        name: user
        schema:
          type: string
      - description: An optional fields mask
        in: header
        name: X-Fields
        schema:
          type: string
          format: mask
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FollowPage'
      summary: List all followers for a given object
      tags:
      - dataservices
    post:
      description: Returns the number of followers left after the operation
      operationId: follow_dataservice
      responses:
        '200':
          description: Success
      summary: Follow an object given its ID
      tags:
      - dataservices
    servers:
    - url: /api/1
  /dataservices/search/:
    get:
      operationId: search_dataservices
      parameters:
      - description: The search query
        in: query
        name: q
        schema:
          type: string
      - in: query
        name: tag
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - in: query
        name: topic
        schema:
          type: string
      - in: query
        name: organization
        schema:
          type: string
      - in: query
        name: archived
        schema:
          type: boolean
      - in: query
        name: featured
        schema:
          type: boolean
      - in: query
        name: access_type
        schema:
          type: string
      - in: query
        name: producer_type
        schema:
          type: string
          enum:
          - company
          - association
          - local-authority
          - public-service
          - user
          - not-specified
      - in: query
        name: last_update_range
        schema:
          type: string
          enum:
          - last_30_days
          - last_12_months
          - last_3_years
      - in: query
        name: is_restricted
        schema:
          type: boolean
      - description: The field (and direction) on which sorting apply
        in: query
        name: sort
        schema:
          type: string
          enum:
          - created
          - views
          - followers
          - -created
          - -views
          - -followers
      - description: The page to display
        in: query
        name: page
        schema:
          type: integer
          default: 1
      - description: The page size
        in: query
        name: page_size
        schema:
          type: integer
          default: 20
      - description: An optional fields mask
        in: header
        name: X-Fields
        schema:
          type: string
          format: mask
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataserviceSearchPage'
      summary: Search all dataservices
      tags:
      - dataservices
    servers:
    - url: /api/2
components:
  schemas:
    DataservicePage:
      properties:
        data:
          description: The page data
          items:
            $ref: '#/components/schemas/Dataservice__read'
          type: array
        next_page:
          description: The next page URL if exists
          type: string
        page:
          description: The current page
          minimum: 1
          type: integer
        page_size:
          description: The page size used for pagination
          minimum: 0
          type: integer
        previous_page:
          description: The previous page URL if exists
          type: string
        total:
          description: The total paginated items
          minimum: 0
          type: integer
      required:
      - page
      - page_size
      - total
      type: object
    Dataservice__read:
      properties:
        access_audiences:
          items:
            $ref: '#/components/schemas/AccessAudience__read'
          type: array
        access_type:
          enum:
          - open
          - open_with_account
          - restricted
          example: open
          type: string
        access_type_reason:
          type: string
        access_type_reason_category:
          enum:
          - confidentiality_of_proceedings_of_public_authorities
          - international_relations_public_security_or_national_defence
          - course_of_justice_or_fair_trial
          - confidentiality_of_commercial_or_industrial_information
          - intellectual_property_rights
          - confidentiality_of_personal_data
          - protection_of_voluntary_information_suppliers
          - protection_of_environment
          example: confidentiality_of_proceedings_of_public_authorities
          type: string
        acronym:
          maxLength: 128
          type: string
        archived_at:
          format: date-time
          type: string
        authorization_request_url:
          type: string
        availability:
          example: '99.99'
          maximum: 100
          minimum: 0
          type: number
        availability_url:
          type: string
        badges:
          items:
            allOf:
            - $ref: '#/components/schemas/Badge__read'
            readOnly: true
          readOnly: true
          type: array
        base_api_url:
          type: string
        business_documentation_url:
          type: string
        contact_points:
          items:
            $ref: '#/components/schemas/ContactPoint__read'
          type: array
        created_at:
          format: date-time
          readOnly: true
          type: string
        datasets:
          description: Visit this API link to see the list.
          type: object
        deleted_at:
          format: date-time
          type: string
        description:
          format: markdown
          type: string
        extras:
          type: object
        featured:
          readOnly: true
          type: boolean
        format:
          enum:
          - REST
          - WMS
          - WSL
          example: REST
          type: string
        harvest:
          allOf:
          - $ref: '#/components/schemas/HarvestMetadata__read'
          readOnly: true
        id:
          readOnly: true
          type: string
        license:
          description: The ID of the license
          type: string
        machine_documentation_url:
          description: Swagger link, OpenAPI format, WMS XML…
          type: string
        metadata_modified_at:
          format: date-time
          readOnly: true
          type: string
        metrics:
          readOnly: true
          type: object
        organization:
          allOf:
          - $ref: '#/components/schemas/OrganizationReference'
          description: Only present if owner is not set. Can only be set to an organization of the current authenticated user.
        owner:
          allOf:
          - $ref: '#/components/schemas/UserReference'
          description: Only present if organization is not set. Can only be set to the current authenticated user.
        permissions:
          allOf:
          - $ref: '#/components/schemas/DataservicePermissions'
          readOnly: true
        private:
          description: Is the dataservice private to the owner or the organization
          type: boolean
        rate_limiting:
          type: string
        rate_limiting_url:
          type: string
        self_api_url:
          description: Link to the API endpoint for this dataservice
          readOnly: true
          type: string
        self_web_url:
          description: Link to the udata web page for this dataservice
          readOnly: true
          type: string
        slug:
          maxLength: 255
          readOnly: true
          type: string
        tags:
          items:
            type: string
          type: array
        technical_documentation_url:
          description: HTML version of a Swagger…
          type: string
        title:
          example: My awesome API
          type: string
      required:
      - created_at
      - id
      - metadata_modified_at
      - slug
      - title
      type: object
    Badge__read:
      properties:
        kind:
          type: string
      required:
      - kind
      type: object
    DataservicePermissions:
      properties:
        delete:
          type: boolean
        edit:
          type: boolean
      type: object
    FollowPage:
      properties:
        data:
          description: The page data
          items:
            $ref: '#/components/schemas/Follow'
          type: array
        next_page:
          description: The next page URL if exists
          type: string
        page:
          description: The current page
          minimum: 1
          type: integer
        page_size:
          description: The page size used for pagination
          minimum: 0
          type: integer
        previous_page:
          description: The previous page URL if exists
          type: string
        total:
          description: The total paginated items
          minimum: 0
          type: integer
      required:
      - page
      - page_size
      - total
      type: object
    DataserviceDatasetsAdd:
      properties:
        id:
          description: Id of the dataset to add
          type: string
      required:
      - id
      type: object
    BaseReference:
      discriminator:
        propertyName: class
      properties:
        class:
          description: The object class
          type: string
        id:
          description: The object unique identifier
          type: string
      required:
      - class
      - id
      type: object
    Follow:
      properties:
        follower:
          allOf:
          - $ref: '#/components/schemas/UserReference'
          description: The follower
          readOnly: true
        id:
          description: The follow object technical ID
          readOnly: true
          type: string
        since:
          description: The date from which the user started following
          format: date-time
          readOnly: true
          type: string
      type: object
    HarvestMetadata__read:
      properties:
        archived_at:
          format: date-time
          type: string
        archived_reason:
          type: string
        backend:
          type: string
        created_at:
          description: Date of the creation as provided by the harvested catalog
          format: date-time
          type: string
        domain:
          type: string
        issued_at:
          description: Release date as provided by the harvested catalog
          format: date-time
          type: string
        last_update:
          description: Date of the last harvesting
          format: date-time
          type: string
        remote_id:
          type: string
        remote_url:
          type: string
        source_id:
          type: string
        source_url:
          type: string
        uri:
          description: RDF node ID if it's an `URIRef`. `None` if it's not present or if it's a random auto-generated ID inside the graph.
          type: string
      type: object
    AccessAudience__read:
      properties:
        condition:
          enum:
          - 'yes'
          - 'no'
          - under_condition
          example: 'yes'
          type: string
        role:
          enum:
          - local_authority_and_administration
          - company_and_association
          - private
          example: local_authority_and_administration
          type: string
      type: object
    OrganizationPermissions:
      properties:
        delete:
          type: boolean
        edit:
          type: boolean
        harvest:
          type: boolean
        members:
          type: boolean
        private:
          type: boolean
      type: object
    UserReference:
      allOf:
      - $ref: '#/components/schemas/BaseReference'
      - properties:
          avatar:
            description: The user avatar URL
            type: string
          avatar_thumbnail:
            description: The user avatar thumbnail URL. This is the square (500x500) and cropped version.
            type: string
          first_name:
            description: The user first name
            readOnly: true
            type: string
          last_name:
            description: The user larst name
            readOnly: true
            type: string
          page:
            description: The user web page URL
            readOnly: true
            type: string
          slug:
            description: The user permalink string
            readOnly: true
            type: string
          uri:
            description: The API URI for this user
            readOnly: true
            type: string
        type: object
    OrganizationReference:
      allOf:
      - $ref: '#/components/schemas/BaseReference'
      - properties:
          acronym:
            description: The organization acronym
            type: string
          badges:
            description: The organization badges
            items:
              $ref: '#/components/schemas/Badge__read'
            readOnly: true
            type: array
          logo:
            description: The organization logo URL
            type: string
          logo_thumbnail:
            description: The organization logo thumbnail URL. This is the square (100x100) and cropped version.
            type: string
          name:
            description: The organization name
            readOnly: true
            type: string
          page:
            description: The organization web page URL
            readOnly: true
            type: string
          permissions:
            allOf:
            - $ref: '#/components/schemas/OrganizationPermissions'
            readOnly: true
          slug:
            description: The organization string used as permalink
            readOnly: true
            type: string
          uri:
            description: The API URI for this organization
            readOnly: true
            type: string
        type: object
    ContactPoint__read:
      properties:
        contact_form:
          type: string
        email:
          maxLength: 255
          type: string
        id:
          readOnly: true
          type: string
        name:
          maxLength: 255
          type: string
        organization:
          allOf:
          - $ref: '#/components/schemas/OrganizationReference'
          description: Only present if owner is not set. Can only be set to an organization of the current authenticated user.
        owner:
          allOf:
          - $ref: '#/components/schemas/UserReference'
          description: Only present if organization is not set. Can only be set to the current authenticated user.
        role:
          enum:
          - contact
          - creator
          - publisher
          - rightsHolder
          - custodian
          - distributor
          - originator
          - principalInvestigator
          - processor
          - resourceProvider
          - user
          example: contact
          type: string
      required:
      - id
      - name
      - role
      type: object
      x-mask: '{id,name,email,contact_form,role}'
    UserReference_2:
      properties:
        avatar:
          description: The user avatar URL
          type: string
        avatar_thumbnail:
          description: The user avatar thumbnail URL. This is the square (500x500) and cropped version.
          type: string
        first_name:
          description: The user first name
          readOnly: true
          type: string
        last_name:
          description: The user larst name
          readOnly: true
          type: string
        page:
          description: The user web page URL
          readOnly: true
          type: string
        slug:
          description: The user permalink string
          readOnly: true
          type: string
        uri:
          description: The API URI for this user
          readOnly: true
          type: string
      type: object
    DataserviceSearchPage:
      properties:
        data:
          description: The page data
          items:
            $ref: '#/components/schemas/Dataservice__read'
          type: array
        facets:
          description: Facets/aggregations for filtering
          type: object
        next_page:
          description: The next page URL if exists
          type: string
        page:
          description: The current page
          minimum: 1
          type: integer
        page_size:
          description: The page size used for pagination
          minimum: 0
          type: integer
        previous_page:
          description: The previous page URL if exists
          type: string
        total:
          description: The total paginated items
          minimum: 0
          type: integer
      required:
      - page
      - page_size
      - total
      type: object
    OrganizationReference_2:
      properties:
        acronym:
          description: The organization acronym
          type: string
        badges:
          description: The organization badges
          items:
            $ref: '#/components/schemas/Badge__read'
          readOnly: true
          type: array
        logo:
          description: The organization logo URL
          type: string
        logo_thumbnail:
          description: The organization logo thumbnail URL. This is the square (100x100) and cropped version.
          type: string
        name:
          description: The organization name
          readOnly: true
          type: string
        page:
          description: The organization web page URL
          readOnly: true
          type: string
        permissions:
          allOf:
          - $ref: '#/components/schemas/OrganizationPermissions'
          readOnly: true
        slug:
          description: The organization string used as permalink
          readOnly: true
          type: string
        uri:
          description: The API URI for this organization
          readOnly: true
          type: string
      type: object
    ContactPoint__read_2:
      properties:
        contact_form:
          type: string
        email:
          maxLength: 255
          type: string
        id:
          readOnly: true
          type: string
        name:
          maxLength: 255
          type: string
        organization:
          allOf:
          - $ref: '#/components/schemas/OrganizationReference_2'
          description: Only present if owner is not set. Can only be set to an organization of the current authenticated user.
        owner:
          allOf:
          - $ref: '#/components/schemas/UserReference_2'
          description: Only present if organization is not set. Can only be set to the current authenticated user.
        role:
          enum:
          - contact
          - creator
          - publisher
          - rightsHolder
          - custodian
          - distributor
          - originator
          - principalInvestigator
          - processor
          - resourceProvider
          - user
          example: contact
          type: string
      required:
      - id
      - name
      - role
      type: object
  securitySchemes:
    apikey:
      in: header
      name: X-API-KEY
      type: apiKey
x-refined-from:
- dados-gov-pt-api-v1-swagger.json
- dados-gov-pt-api-v2-swagger.json