{
  "openapi": "3.0.1",
  "info": {
    "title": "Romania Open Data Scraper - data.gov.ro API",
    "description": "Scrape all 5,227 datasets, 13,000+ files, 180 publishers and 5,753 SQL tables from data.gov.ro, with link-rot status and Five Stars openness scores.",
    "version": "0.1",
    "x-build-id": "C8jXzsSk9gHqbIRyZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~data-gov-ro-romania-open-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-data-gov-ro-romania-open-data-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/parseforge~data-gov-ro-romania-open-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-data-gov-ro-romania-open-data-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/parseforge~data-gov-ro-romania-open-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-data-gov-ro-romania-open-data-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "dataset": {
            "title": "What to scrape",
            "enum": [
              "datasets",
              "resources",
              "contacts",
              "organizations",
              "categories",
              "tags",
              "licenses",
              "showcases",
              "datastore-tables"
            ],
            "type": "string",
            "description": "Which collection to return. 'Datasets' is the main one: one row per dataset on data.gov.ro with its full resource list. 'Resources' flattens to one row per file. The directory collections (organizations, categories, tags, licenses, showcases, DataStore tables) ignore the search filters below except organization.",
            "default": "datasets"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text search across titles, descriptions and tags, in Romanian. Example: 'buget' returns 186 datasets, 'achizitii' returns 172. Leave empty to take the whole catalogue."
          },
          "startUrls": {
            "title": "Dataset URLs",
            "type": "array",
            "description": "Scrape only these exact datasets. Accepts full data.gov.ro dataset URLs, dataset slugs or dataset ids. When this is set the search filters are ignored.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: limited to 10 items (preview). Paid users: up to 1,000,000."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "modified-desc",
              "modified-asc",
              "created-desc",
              "created-asc",
              "title-asc",
              "title-desc",
              "name-asc",
              "name-desc",
              "views-desc",
              "rating-desc"
            ],
            "type": "string",
            "description": "Order of the results. Only these orders are real on data.gov.ro; anything else silently falls back to relevance.",
            "default": "relevance"
          },
          "organization": {
            "title": "Publishing organization",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only datasets published by these institutions. 130 of the 180 organizations have at least one dataset; the 30 largest are listed here.",
            "items": {
              "type": "string",
              "enum": [
                "mdrap",
                "inspectoratul-general-pentru-situatii-de-urgenta",
                "agentia-nationala-pentru-protectia-mediului",
                "agentia-nationala-pentru-ocuparea-fortei-de-munca",
                "institutul-national-de-administratie",
                "inspectoratul-general-pentru-imigrari",
                "agentia-nationala-a-functionarilor-publici",
                "consiliul-judetean-vrancea",
                "muzeul-national-de-istorie-a-romaniei",
                "ms",
                "mfp",
                "ministerul-educatiei",
                "ancpi",
                "directia-evidenta-persoanelor-admin-baze-de-date",
                "mj",
                "onrc",
                "directia-generala-anticoruptie",
                "mapn",
                "consiliul-judetean-braila",
                "consiliul-judetean-tulcea",
                "agentia-nationala-de-administrare-fiscala",
                "consiliul-judetean-cluj",
                "institutul-national-de-statistica",
                "me",
                "autoritatea-nationala-pentru-cetatenie",
                "muzeul-national-al-satului-dimitrie-gusti",
                "creart",
                "casa-nationala-de-asigurari-de-sanatate",
                "anp",
                "institutul-national-al-patrimoniului"
              ],
              "enumTitles": [
                "Ministerul Dezvoltarii, Lucrarilor Publice (1,458)",
                "Inspectoratul General pentru Situatii de Urgenta (596)",
                "Agentia Nationala pentru Protectia Mediului (234)",
                "Agentia Nationala pentru Ocuparea Fortei de Munca (197)",
                "Institutul National de Administratie (167)",
                "Inspectoratul General pentru Imigrari (141)",
                "Agentia Nationala a Functionarilor Publici (140)",
                "Consiliul Judetean Vrancea (134)",
                "Muzeul National de Istorie a Romaniei (124)",
                "Ministerul Sanatatii (111)",
                "Ministerul Finantelor (109)",
                "Ministerul Educatiei (94)",
                "Agentia Nationala de Cadastru (90)",
                "Directia pentru Evidenta Persoanelor (85)",
                "Ministerul Justitiei (81)",
                "Oficiul National al Registrului Comertului (76)",
                "Directia Generala Anticoruptie (74)",
                "Ministerul Apararii Nationale (57)",
                "Consiliul Judetean Braila (53)",
                "Consiliul Judetean Tulcea (50)",
                "Agentia Nationala de Administrare Fiscala (49)",
                "Consiliul Judetean Cluj (47)",
                "Institutul National de Statistica (46)",
                "Ministerul Economiei (43)",
                "Autoritatea Nationala pentru Cetatenie (38)",
                "Muzeul National al Satului Dimitrie Gusti (37)",
                "creart (33)",
                "Casa Nationala de Asigurari de Sanatate (32)",
                "Administratia Nationala a Penitenciarelor (32)",
                "Institutul National al Patrimoniului (28)"
              ]
            },
            "default": []
          },
          "category": {
            "title": "Category (portal group)",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only datasets filed under these portal groups. Groups are sparsely used on data.gov.ro: finance has 28 datasets, health has 1, and four groups are empty.",
            "items": {
              "type": "string",
              "enum": [
                "finante",
                "drept",
                "agricultura-silvicultura-si-pescuit",
                "nomenclatoare",
                "politica",
                "probleme-sociale",
                "orase-regiuni",
                "mediu-inconjurator",
                "sanatate",
                "relatii-internationale",
                "educatie-cultura-si-sport",
                "energie",
                "transport",
                "productie-tehnologie-si-cercetare"
              ],
              "enumTitles": [
                "Finante - Finance (28)",
                "Drept - Justice and law (14)",
                "Agricultura, silvicultura si pescuit (13)",
                "Nomenclatoare - Reference lists (9)",
                "Politica - Government and politics (6)",
                "Probleme sociale - Social issues (4)",
                "Orase si regiuni - Cities and regions (3)",
                "Mediu inconjurator - Environment (3)",
                "Sanatate - Health (1)",
                "Relatii internationale (1)",
                "Educatie, cultura si sport (0)",
                "Energie - Energy (0)",
                "Transport (0)",
                "Productie, tehnologie si cercetare (0)"
              ]
            },
            "default": []
          },
          "resourceFormat": {
            "title": "File format",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only datasets that publish at least one file in these formats. data.gov.ro stores 64 different spellings for about 20 real formats, so each choice is expanded to every spelling: picking CSV matches 570 datasets, not the 362 a plain search returns.",
            "items": {
              "type": "string",
              "enum": [
                "CSV",
                "XLSX",
                "XLS",
                "XML",
                "PDF",
                "JSON",
                "ODS",
                "ODT",
                "DOC",
                "SHP",
                "ZIP",
                "KML",
                "GPKG",
                "TXT",
                "WMS",
                "NETCDF",
                "GEOTIFF",
                "ATOM",
                "HTML",
                "XPS"
              ],
              "enumTitles": [
                "CSV (570 datasets)",
                "XLSX (2,350)",
                "XLS (1,829)",
                "XML (388)",
                "PDF (100)",
                "JSON (27)",
                "ODS (49)",
                "ODT (98)",
                "DOC and DOCX (86)",
                "Shapefile (13)",
                "ZIP and RAR (12)",
                "KML and KMZ (15)",
                "GeoPackage (16)",
                "TXT (28)",
                "WMS (6)",
                "NetCDF (2)",
                "GeoTIFF (3)",
                "Atom (6)",
                "HTML (4)",
                "XPS (31)"
              ]
            },
            "default": []
          },
          "licenseId": {
            "title": "Licence",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only datasets under these licences. Counts are the whole catalogue: CC-BY-4.0 covers 3,322 datasets and UK OGL covers 1,704.",
            "items": {
              "type": "string",
              "enum": [
                "CC-BY-4.0",
                "uk-ogl",
                "notspecified",
                "other-pd",
                "other-open",
                "ODC-PDDL-1.0",
                "CC-BY-NC-4.0"
              ],
              "enumTitles": [
                "Creative Commons Attribution 4.0 (3,322)",
                "UK Open Government Licence (1,704)",
                "Licence not specified (62)",
                "Other - Public Domain (2)",
                "Other - Open (2)",
                "Open Data Commons PDDL 1.0 (1)",
                "Creative Commons Attribution-NonCommercial 4.0 (1)"
              ]
            },
            "default": []
          },
          "tags": {
            "title": "Tags",
            "type": "string",
            "description": "Comma separated tags; a dataset matching any of them is kept. Real examples with counts: plati (466), refugiati (392), pompierii (280), inventar (123), buget (67), statistica (85)."
          },
          "author": {
            "title": "Author name",
            "type": "string",
            "description": "Exact author name as recorded on the dataset. Example: 'Ana Lazar' returns 40 datasets."
          },
          "titleContains": {
            "title": "Title contains",
            "type": "string",
            "description": "Keep only datasets whose title matches this phrase. Example: 'buget' returns 87 datasets."
          },
          "notesContains": {
            "title": "Description contains",
            "type": "string",
            "description": "Keep only datasets whose description matches this phrase. Example: 'achizitii' returns 88 datasets."
          },
          "modifiedAfter": {
            "title": "Updated after",
            "type": "string",
            "description": "Keep only datasets updated on or after this date (YYYY-MM-DD). 2026-01-01 returns 424 datasets."
          },
          "createdAfter": {
            "title": "Created after",
            "type": "string",
            "description": "Keep only datasets first published on or after this date (YYYY-MM-DD). 2026-01-01 returns 339 datasets."
          },
          "minResources": {
            "title": "Minimum files per dataset",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Keep only datasets with at least this many files. 5 or more returns 635 datasets."
          },
          "minTags": {
            "title": "Minimum tags per dataset",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only datasets carrying at least this many tags. 3 or more returns 1,331 datasets."
          },
          "minRating": {
            "title": "Minimum user rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only datasets rated at least this highly by portal users (0 to 5, decimals allowed). 2,627 datasets carry a rating of 1 or more."
          },
          "onlyOpenLicence": {
            "title": "Only open licences",
            "type": "boolean",
            "description": "Keep only datasets the portal flags as openly licensed. 5,030 of 5,227 datasets qualify.",
            "default": false
          },
          "onlyWithDatastore": {
            "title": "Only datasets with a queryable table",
            "type": "boolean",
            "description": "Keep only datasets with at least one file loaded into the portal's SQL DataStore. The portal's search index does not expose this, so it is applied after the search: expect fewer rows than the match count reported in the log.",
            "default": false
          },
          "onlyBrokenLinks": {
            "title": "Only datasets with a broken file link",
            "type": "boolean",
            "description": "Keep only datasets where the portal's own archiver has flagged at least one file as unreachable. Applied after the search. Across the catalogue 7.3% of archived files are broken.",
            "default": false
          },
          "minOpennessScore": {
            "title": "Minimum Five Stars openness score",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Keep only datasets whose best file scores at least this on Tim Berners-Lee's Five Stars scale. Applied after the search. Nothing on data.gov.ro scores above 3, and 56% of files score 0."
          },
          "includeArchiveStatus": {
            "title": "Include link-rot archive status",
            "type": "boolean",
            "description": "Adds the portal archiver's verdict for every file: broken flag, status text, failure count, first failure, last success, redirect target, content hash and the cached copy URL. Costs no extra request.",
            "default": false
          },
          "includeOpennessScore": {
            "title": "Include Five Stars openness scores",
            "type": "boolean",
            "description": "Adds the portal's Tim Berners-Lee Five Stars grade per file, with the reason text and the format the portal actually detected inside the file. Costs no extra request.",
            "default": false
          },
          "includeViewStats": {
            "title": "Include view statistics",
            "type": "boolean",
            "description": "Adds total and recent page-view counts per dataset. Costs one extra request per dataset.",
            "default": false
          },
          "includeActivityHistory": {
            "title": "Include revision history",
            "type": "boolean",
            "description": "Adds the last 25 changes to the dataset with timestamps and change types, plus the first and last change dates. Costs one extra request per dataset.",
            "default": false
          },
          "includeDatastoreSchema": {
            "title": "Include DataStore table schemas",
            "type": "boolean",
            "description": "For files loaded into the portal's SQL DataStore, adds the column names, PostgreSQL column types and the exact row count. Costs one extra request per table, up to 10 tables per dataset.",
            "default": false
          },
          "includeDatastorePreview": {
            "title": "Include DataStore preview rows",
            "type": "boolean",
            "description": "Adds real data rows read out of the portal's SQL DataStore. Costs one extra request per table, up to 5 tables per dataset.",
            "default": false
          },
          "datastorePreviewRows": {
            "title": "Preview rows per table",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many rows to read from each DataStore table when preview rows are enabled.",
            "default": 5
          },
          "includeOrganizationProfile": {
            "title": "Include publisher profile",
            "type": "boolean",
            "description": "Adds the publishing institution's description, logo, dataset count, follower count and member count. Cached per organization, so it costs one request per distinct publisher, not per dataset.",
            "default": false
          },
          "includeResourceViews": {
            "title": "Include file preview widgets",
            "type": "boolean",
            "description": "Adds the preview widgets the portal offers for each file (table, map, graph, text, PDF). Costs one extra request per file, up to 10 files per dataset.",
            "default": false
          },
          "includeLinkCheck": {
            "title": "Verify file links live",
            "type": "boolean",
            "description": "Sends a live HEAD request to each file URL to confirm it is retrievable right now, and returns the HTTP status, content type and content length. This is the current truth, unlike the archiver status which is the portal's last cached verdict. Costs one request per file, up to 10 files per dataset.",
            "default": false
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests to run in parallel against data.gov.ro. The portal asks crawlers for a 10 second delay, so this defaults to a polite 4 and is capped at 10.",
            "default": 4
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}