{
  "openapi": "3.0.1",
  "info": {
    "title": "OAI-PMH Repository Harvester",
    "description": "Point at ANY OAI-PMH endpoint (arXiv, DSpace, EPrints, Invenio, OJS and thousands more) and get flat metadata rows — identifier, datestamp, title, creators, subjects, publisher, date, rights — plus lossless raw XML. All 6 verbs, incremental from/until, resumptionToken paging. Pay per record.",
    "version": "0.1",
    "x-build-id": "IW80fPXyDTeHvDI1d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~oai-pmh-repository-harvester/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-oai-pmh-repository-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~oai-pmh-repository-harvester/runs": {
      "post": {
        "operationId": "runs-sync-datamule-oai-pmh-repository-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~oai-pmh-repository-harvester/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-oai-pmh-repository-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": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "OAI-PMH endpoint URL(s)",
            "type": "array",
            "description": "One or more OAI-PMH base URLs — the Open Archives Initiative Protocol for Metadata Harvesting endpoint of ANY conforming repository (DSpace, EPrints, Invenio, OJS, custom). A bare base URL is fine — the actor appends the ?verb query itself. Examples: https://export.arxiv.org/oai2 (arXiv), https://dspace.mit.edu/oai/request (MIT DSpace), https://pub.uni-bielefeld.de/oai (Bielefeld), https://zenodo.org/oai2d (Zenodo/Invenio), https://api.archives-ouvertes.fr/oai/hal (HAL). One actor works against the ~4,000–8,000 repositories indexed by OpenDOAR/ROAR/BASE.",
            "items": {
              "type": "string"
            }
          },
          "verb": {
            "title": "Verb",
            "enum": [
              "ListRecords",
              "ListIdentifiers",
              "Identify",
              "ListSets",
              "ListMetadataFormats",
              "GetRecord"
            ],
            "type": "string",
            "description": "The OAI-PMH verb to run. ListRecords (default) harvests full metadata records; ListIdentifiers is the lightweight header-only harvest (identifier + datestamp + sets); Identify returns the repository census row; ListSets lists the harvestable sets; ListMetadataFormats lists the supported metadata formats; GetRecord fetches a single record by identifier.",
            "default": "ListRecords"
          },
          "metadataPrefix": {
            "title": "Metadata prefix",
            "type": "string",
            "description": "The metadata format to request (ListRecords / ListIdentifiers / GetRecord). oai_dc (Dublin Core) is the spec-mandated default present on every conforming provider and is flattened to clean columns (title / creators / subjects / description / publisher / date / type / rights …). Other formats (marcxml, mods, oai_datacite, …) still yield a structured fields map + the lossless raw XML. Not every provider supports every format beyond oai_dc.",
            "default": "oai_dc"
          },
          "set": {
            "title": "Set (selective harvest)",
            "type": "string",
            "description": "Restrict the harvest to one OAI set (a setSpec, e.g. cs on arXiv for Computer Science). Run the actor once with verb=ListSets to discover a repository's sets. Leave empty to harvest the whole repository."
          },
          "from": {
            "title": "From datestamp",
            "type": "string",
            "description": "Incremental harvest lower bound — only records with a datestamp on/after this date (OAI's native incremental harvesting). Format matches the repository's granularity: YYYY-MM-DD or a full ISO 8601 UTC timestamp (YYYY-MM-DDThh:mm:ssZ). Leave empty for no lower bound."
          },
          "until": {
            "title": "Until datestamp",
            "type": "string",
            "description": "Incremental harvest upper bound — only records with a datestamp on/before this date. Same format as From. Leave empty for no upper bound."
          },
          "identifier": {
            "title": "Record identifier (GetRecord)",
            "type": "string",
            "description": "The OAI record identifier for verb=GetRecord, e.g. oai:arXiv.org:cs/0208027. Required only for GetRecord; ignored otherwise."
          },
          "maxRecords": {
            "title": "Max records (global cap)",
            "minimum": 1,
            "type": "integer",
            "description": "A GLOBAL cap on the total number of records/rows to harvest across all sources and all resumptionToken pages (each emitted record is one billable event). Default 1000 (roughly one arXiv page). Increase to auto-paginate through a large result set.",
            "default": 1000
          },
          "bearer": {
            "title": "Bearer token",
            "type": "string",
            "description": "Optional bearer token for gated OAI deployments (sent as Authorization: Bearer ***). Not required for public repositories — anonymous read is the point of the protocol. 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 repositories. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}