{
  "openapi": "3.0.1",
  "info": {
    "title": "SRU Catalog Harvester",
    "description": "Point at ANY SRU/SRW library catalog (DNB, Library of Congress, K10plus and thousands more — one LoC standard) and get flat bibliographic rows from a CQL query: title, creator, publisher, date, subject, ISBN and more, plus lossless raw XML. Discovery mode lists a server's indexes. Pay per record.",
    "version": "0.1",
    "x-build-id": "9KjAU4aoIBQSg8bs0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~sru-catalog-harvester/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-sru-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~sru-catalog-harvester/runs": {
      "post": {
        "operationId": "runs-sync-datamule-sru-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~sru-catalog-harvester/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-sru-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": [
          "base_url"
        ],
        "properties": {
          "base_url": {
            "title": "SRU/SRW endpoint URL",
            "type": "string",
            "description": "The base URL of any SRU (Search/Retrieve via URL) or SRW server — the Library of Congress standard protocol spoken by most national, university and union library catalogs. Examples: https://services.dnb.de/sru/dnb (German National Library), http://lx2.loc.gov:210/lcdb (Library of Congress), https://sru.k10plus.de/gvk (K10plus/GBV union catalog). One actor works against thousands of these."
          },
          "query": {
            "title": "CQL query",
            "type": "string",
            "description": "A CQL (Contextual Query Language) search expression, e.g. dc.title=climate, dc.creator=goethe, or a bare keyword. The exact indexes a server supports vary — run this actor once with operation=explain to list them. Required for a searchRetrieve; ignored for explain."
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "searchRetrieve",
              "explain"
            ],
            "type": "string",
            "description": "searchRetrieve (default) runs the query and returns bibliographic records. explain fetches the server's self-description and lists its searchable indexes and available record schemas — a cheap way to discover a server before querying it.",
            "default": "searchRetrieve"
          },
          "recordSchema": {
            "title": "Record schema",
            "type": "string",
            "description": "The metadata schema to request per record. oai_dc / dc (Dublin Core) flattens to clean columns; MARC21-xml / marcxml is decoded from standard MARC tags. Any other schema still yields a structured fields map + the lossless raw XML. Leave empty to use the server's default. Common values: oai_dc, dc, marcxml, MARC21-xml, mods."
          },
          "maximumRecords": {
            "title": "Records per page",
            "minimum": 1,
            "type": "integer",
            "description": "How many records to request per SRU page (the server's maximumRecords parameter). Most servers cap this at 100. Default 50.",
            "default": 50
          },
          "maxRecords": {
            "title": "Max records (global cap)",
            "minimum": 1,
            "type": "integer",
            "description": "A GLOBAL cap on the total number of records to harvest 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 result set."
          },
          "startRecord": {
            "title": "Start record",
            "minimum": 1,
            "type": "integer",
            "description": "The 1-based position of the first record to return (SRU is 1-indexed). Use to resume or skip into a result set. Default 1.",
            "default": 1
          },
          "sruVersion": {
            "title": "SRU version",
            "enum": [
              "1.1",
              "1.2",
              "2.0"
            ],
            "type": "string",
            "description": "The SRU protocol version to send. Most servers accept 1.1; some require 1.2 or 2.0. The response is parsed the same way regardless. Default 1.1.",
            "default": "1.1"
          },
          "bearer": {
            "title": "Bearer token",
            "type": "string",
            "description": "Optional bearer token for gated SRU deployments (sent as Authorization: Bearer ***). Not required for public library catalogs. 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 servers. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}