{
  "openapi": "3.0.1",
  "info": {
    "title": "CSW Catalog Harvester",
    "description": "Point at ANY OGC CSW 2.0.2 catalog (GeoNetwork, pycsw, ESRI Geoportal — the metadata backbone of national/EU/city SDIs) and get flat Dublin Core rows: identifier, title, type, subject, format, date, abstract, bounding box + lossless raw XML. Handles GeoNetwork's POST-only quirk. Pay per record.",
    "version": "0.1",
    "x-build-id": "ptlr857pXlzgToAbp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~csw-catalog-harvester/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-csw-catalog-harvester",
        "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/datamule~csw-catalog-harvester/runs": {
      "post": {
        "operationId": "runs-sync-datamule-csw-catalog-harvester",
        "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/datamule~csw-catalog-harvester/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-csw-catalog-harvester",
        "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",
        "required": [
          "catalogUrls"
        ],
        "properties": {
          "catalogUrls": {
            "title": "CSW catalog URLs",
            "type": "array",
            "description": "One or more OGC CSW 2.0.2 catalog base URLs — the endpoint a geoportal answers service=CSW&request=GetRecords on. This is the metadata backbone of national / EU / city Spatial Data Infrastructures (GeoNetwork, pycsw, ESRI Geoportal). Examples: https://demo.pycsw.org/gisdata/csw (pycsw demo) or https://sdi.eea.europa.eu/catalogue/srv/eng/csw (European Environment Agency, GeoNetwork). One actor works against thousands of these. Each URL is harvested independently; an unreachable one is skipped with a warning.",
            "items": {
              "type": "string"
            }
          },
          "elementSetName": {
            "title": "Element set (record detail)",
            "enum": [
              "brief",
              "summary",
              "full"
            ],
            "type": "string",
            "description": "How much each Dublin Core record carries: brief (identifier, title, type, bbox), summary (adds subject, format, abstract and more) or full (every Dublin Core term). All three are flattened to the same row shape; the lossless raw XML is always preserved. Default summary.",
            "default": "summary"
          },
          "maxRecords": {
            "title": "Max records per catalog (global cap)",
            "minimum": 1,
            "type": "integer",
            "description": "A GLOBAL cap on the total number of records to harvest from EACH catalog across all pages (each emitted record is one billable event). Leave empty to fetch a single page (equal to Records per page) — a cost-safe default. Set higher to auto-paginate through a large catalog, following the server's nextRecord / numberOfRecordsReturned paging."
          },
          "recordsPerPage": {
            "title": "Records per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many records to request per CSW GetRecords page (the server's maxRecords parameter). Most CSW servers cap this at 100 server-side; the actor honors the returned numberOfRecordsReturned when a server returns fewer. Default 20.",
            "default": 20
          },
          "startPosition": {
            "title": "Start position",
            "minimum": 1,
            "type": "integer",
            "description": "The 1-based position of the first record to return (CSW is 1-indexed). Use to resume or skip into a large result set. Default 1.",
            "default": 1
          },
          "typeNames": {
            "title": "Type names",
            "type": "string",
            "description": "The record type to query. csw:Record (the default) returns the standard Dublin Core profile every CSW server supports. Some servers also expose richer profiles like gmd:MD_Metadata (ISO 19115) — change this only if you know the server advertises it. Default csw:Record."
          },
          "cqlFilter": {
            "title": "CQL filter",
            "type": "string",
            "description": "An optional CQL (Common Query Language) constraint to filter the catalog, e.g. csw:AnyText LIKE '%climate%' or dc:type = 'dataset'. Leave empty to return all records. The exact queryable properties vary per server. ANDed with the bounding box below if both are set."
          },
          "bbox": {
            "title": "Bounding box filter",
            "type": "string",
            "description": "An optional spatial filter as minLon,minLat,maxLon,maxLat (WGS84 lon/lat), e.g. 3.3,50.7,7.2,53.6 for the Netherlands. Only records whose footprint intersects the box are returned. Combined with the CQL filter above when both are provided."
          },
          "bearerToken": {
            "title": "Bearer token",
            "type": "string",
            "description": "Optional bearer token for gated CSW deployments (sent as Authorization: Bearer ***). Not required for public geoportals. Never logged."
          },
          "extraHeaders": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional extra HTTP headers as a JSON object, e.g. {\"x-api-key\": \"...\"} for gated servers. Not required for public catalogs. Header values are never logged."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}