{
  "openapi": "3.0.1",
  "info": {
    "title": "JSONPath Extractor: pull fields out of JSON",
    "description": "Pulls fields out of nested JSON with JSONPath: $.a.b, [*], [0], slices, .., filters like [?(@.price > 10)]. Reads Apify datasets and JSON / NDJSON files, one clean row per record. Empty input = free demo.",
    "version": "0.1",
    "x-build-id": "hBEFKpg7u50ekhaZQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~jsonpath-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-jsonpath-extractor",
        "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/ucchiii~jsonpath-extractor/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-jsonpath-extractor",
        "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/ucchiii~jsonpath-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-jsonpath-extractor",
        "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": {
          "datasetIds": {
            "title": "Apify datasets",
            "type": "array",
            "description": "Datasets to read (the 'defaultDatasetId' of a finished run). You can paste a dataset URL from Apify Console too. Each item of a dataset is one record. Several datasets and files are read in the order given and come out as one table. Up to 20 in total. Leave this and 'File URLs' empty to run a free demo on a built-in sample (not charged)."
          },
          "fileUrls": {
            "title": "File URLs",
            "type": "array",
            "description": "Public http(s) links to JSON or NDJSON files (up to 100 MB each; a JSON file up to 50 MB, use NDJSON for bigger files). A JSON file that is a list gives one record per item; a JSON file that is one object is one record (see 'Records path' and 'How to split'). Links to internal networks are blocked.",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "title": "Fields",
            "type": "object",
            "description": "The values to extract: an object of {\"output name\": \"JSONPath\"}. The path is applied to every record, with $ meaning the record. One match gives the value, several matches give a list, no match gives null (see 'If a field has no match'). For finer control use an object instead of the text: {\"path\": \"$.tags[*]\", \"multiple\": \"auto|first|all\", \"default\": \"n/a\"}: 'first' keeps only the first match, 'all' always gives a list, 'default' replaces a missing value. Paths are checked before anything is read: a mistake fails the run at once, free. Required unless you run the demo."
          },
          "recordsPath": {
            "title": "Records path",
            "type": "string",
            "description": "Optional. A JSONPath that finds the records inside each document, for when the list you want is nested, for example $.features or $.data.items. If it points to a list, every item of the list is a record; if it points to something else, that value is one record. Leave it empty to use the document as it is (a JSON file that is a list gives one record per item). Not used with 'Whole document'."
          },
          "recordMode": {
            "title": "How to split",
            "enum": [
              "auto",
              "whole"
            ],
            "type": "string",
            "description": "'One record per item': a JSON file that is a list gives one row per item, a file that is one object gives one row, an NDJSON file gives one row per line, a dataset gives one row per item. 'Whole document': each JSON file, NDJSON line or dataset item is one record as a whole, so a path like $[?(@.rating > 8)].title collects values across the entire list into one row. Default: one record per item.",
            "default": "auto"
          },
          "onMissing": {
            "title": "If a field has no match",
            "enum": [
              "null",
              "skip",
              "error-row"
            ],
            "type": "string",
            "description": "What happens when a path matches nothing in a record. 'null': the field is null (a field with a 'default' uses that value instead and counts as found). 'skip': a record where any field has no match is not written and not charged. 'error-row': the row is written with the field null and an '_errors' list that says which path matched nothing; such a row is not charged. Default: null.",
            "default": "null"
          },
          "keepOriginal": {
            "title": "Keep the original record",
            "type": "boolean",
            "description": "Also copy the top-level fields of each input record into the output row (the extracted fields are added after them and win if a name is the same). A record that is not an object (a number, a list) is kept under the name 'value'. Default: off, so a row has only the fields you extracted.",
            "default": false
          },
          "maxInputRows": {
            "title": "Max input records",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Safety limit on the records read across all sources. If there are more records than this the run stops without writing or charging (it never gives you a partial table). Maximum and default: 200,000.",
            "default": 200000
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}