{
  "openapi": "3.0.1",
  "info": {
    "title": "Actor Dataset Provenance Enricher",
    "description": "Enrich Apify dataset rows with deterministic field-level provenance, source identity, canonical hashes, lineage, rights indicators, and artifact manifests.",
    "version": "0.1",
    "x-build-id": "6BDhlmbCIWvFx0FqQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/flintglade~actor-dataset-provenance-enricher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-flintglade-actor-dataset-provenance-enricher",
        "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/flintglade~actor-dataset-provenance-enricher/runs": {
      "post": {
        "operationId": "runs-sync-flintglade-actor-dataset-provenance-enricher",
        "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/flintglade~actor-dataset-provenance-enricher/run-sync": {
      "post": {
        "operationId": "run-sync-flintglade-actor-dataset-provenance-enricher",
        "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": [
          "includeOriginal"
        ],
        "properties": {
          "inputSchemaVersion": {
            "title": "Input schema version",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Versioned runtime input contract.",
            "default": 1
          },
          "datasetIds": {
            "title": "Authorized datasets",
            "minItems": 1,
            "maxItems": 5,
            "uniqueItems": true,
            "type": "array",
            "description": "Select 1-5 Apify datasets to read. The Actor does not discover or mutate datasets."
          },
          "inlineItems": {
            "title": "Inline JSON rows",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Use 1-100 small object rows for demos and health checks instead of datasetIds.",
            "items": {
              "type": "object"
            }
          },
          "profile": {
            "title": "Upstream profile",
            "enum": [
              "auto",
              "AP-003",
              "AP-014",
              "AP-021",
              "AP-027",
              "AP-002",
              "generic"
            ],
            "type": "string",
            "description": "Auto uses only explicit supported actor/schema markers. Generic requires fieldMappings.",
            "default": "auto"
          },
          "fieldMappings": {
            "title": "Generic JSON Pointer mappings",
            "type": "object",
            "description": "Explicit RFC 6901 pointers for an unknown dataset. At least one mapping is required when generic is selected.",
            "properties": {
              "actorId": {
                "title": "Actor ID pointer",
                "description": "Pointer to an explicit source Actor ID.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              },
              "runId": {
                "title": "Run ID pointer",
                "description": "Pointer to an upstream run ID.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              },
              "datasetId": {
                "title": "Dataset ID pointer",
                "description": "Pointer to an upstream dataset ID.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              },
              "sourceUrl": {
                "title": "Source URL pointer",
                "description": "Pointer to a recorded source URL.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              },
              "sourceIdentifier": {
                "title": "Source identifier pointer",
                "description": "Pointer to a source identifier.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              },
              "observedAt": {
                "title": "Observed time pointer",
                "description": "Pointer to an observation timestamp.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              },
              "retrievedAt": {
                "title": "Retrieved time pointer",
                "description": "Pointer to a retrieval timestamp.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              },
              "rightsIndicators": {
                "title": "Rights indicators pointer",
                "description": "Pointer to recorded rights indicators.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              },
              "upstreamStatus": {
                "title": "Upstream status pointer",
                "description": "Pointer to the upstream result status.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              },
              "lineageParents": {
                "title": "Lineage parents pointer",
                "description": "Pointer to recorded lineage parents.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              },
              "entityKey": {
                "title": "Entity key pointer",
                "description": "Pointer to the primary entity key.",
                "type": "string",
                "pattern": "^/",
                "maxLength": 500
              }
            },
            "additionalProperties": false
          },
          "includeOriginal": {
            "title": "Preserve original row",
            "type": "boolean",
            "description": "Required true in version 0.1. The original JSON data model is retained unchanged; runtime validation rejects false.",
            "default": true
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "default_dataset",
              "default_and_named"
            ],
            "type": "string",
            "description": "Write to the default dataset only, or also mirror successfully written enriched rows to a named dataset.",
            "default": "default_dataset"
          },
          "outputDatasetName": {
            "title": "Named output dataset",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,62}$",
            "minLength": 1,
            "maxLength": 63,
            "type": "string",
            "description": "Safe Apify dataset name required only for default_and_named."
          },
          "maxRows": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Global row-read ceiling across selected inputs.",
            "default": 10000
          },
          "startOffset": {
            "title": "Resume offset",
            "minimum": 0,
            "maximum": 2147483647,
            "type": "integer",
            "description": "Zero-based starting offset. For multiple datasets, the same resume offset is applied to each selected dataset.",
            "default": 0
          },
          "concurrency": {
            "title": "Processing concurrency",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Version 0.1 is deliberately local and streaming.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}