{
  "openapi": "3.0.1",
  "info": {
    "title": "Dataset Format Converter",
    "description": "Turn any Apify dataset or JSON list into ready-to-import files: CSV (UK Excel-safe), JSON Lines, PostgreSQL and SQL Server scripts with inferred types, a Microsoft Dataverse table and import file, and validated iCalendar. Deterministic field mapping, no AI guessing. See README.",
    "version": "0.1",
    "x-build-id": "SucWF7J7MuETZa5hn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/landlordtools~dataset-format-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-landlordtools-dataset-format-converter",
        "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/landlordtools~dataset-format-converter/runs": {
      "post": {
        "operationId": "runs-sync-landlordtools-dataset-format-converter",
        "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/landlordtools~dataset-format-converter/run-sync": {
      "post": {
        "operationId": "run-sync-landlordtools-dataset-format-converter",
        "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": {
          "datasetId": {
            "title": "Apify dataset",
            "type": "string",
            "description": "Dataset ID or username~dataset-name to convert (read with this run's token). Use this or items."
          },
          "items": {
            "title": "Items",
            "type": "array",
            "description": "A JSON list of objects to convert, instead of a dataset."
          },
          "targets": {
            "title": "Target formats",
            "type": "array",
            "description": "One or more of the formats listed in the README.",
            "items": {
              "type": "string",
              "enum": [
                "csv",
                "tsv",
                "excel-uk-csv",
                "excel-us-csv",
                "excel-eu-csv",
                "salesforce-csv",
                "hubspot-csv",
                "airtable-csv",
                "json",
                "jsonl",
                "xml",
                "yaml",
                "html",
                "markdown",
                "sql-postgres",
                "sql-sqlserver",
                "sql-mysql",
                "sql-sqlite",
                "sql-snowflake",
                "sql-oracle",
                "bigquery",
                "dataverse",
                "geojson",
                "kml",
                "rss",
                "sitemap",
                "xlsx",
                "vcard",
                "gpx",
                "elasticsearch-bulk",
                "influx-line",
                "mongodb-jsonl",
                "parquet",
                "fixed-width",
                "google-merchant",
                "meta-catalog",
                "shopify-products",
                "xero-bank-csv",
                "quickbooks-bank-csv",
                "sage-bank-csv",
                "freeagent-bank-csv",
                "teams-card",
                "slack-blocks",
                "ics"
              ]
            }
          },
          "fields": {
            "title": "Field mapping (optional)",
            "type": "array",
            "description": "List of {from, to, type}: source path (dots for nesting, numbers for list positions), output column name, and type (string, integer, number, boolean, date, datetime). Without it, every field is flattened."
          },
          "tableName": {
            "title": "Table / file name",
            "type": "string",
            "description": "Used for SQL tables, the Dataverse table, XML root and feed titles. Letters, digits and underscores."
          },
          "csvDateFormat": {
            "title": "Date style for the plain csv target",
            "enum": [
              "iso",
              "uk",
              "us"
            ],
            "type": "string",
            "description": "iso (default), uk or us."
          },
          "arrayJoiner": {
            "title": "List joiner",
            "type": "string",
            "description": "Lists of plain values become one cell joined with this (default '; ')."
          },
          "dataversePrefix": {
            "title": "Dataverse publisher prefix",
            "type": "string",
            "description": "2-8 lowercase letters or digits (default new)."
          },
          "icsMapping": {
            "title": "iCalendar mapping",
            "type": "object",
            "description": "For the ics target: {summary, start, end?, description?, location?, uid?} as field paths."
          },
          "geoMapping": {
            "title": "Map mapping",
            "type": "object",
            "description": "For geojson, kml and gpx: {lat, lon, name?} as field paths."
          },
          "rssMapping": {
            "title": "RSS mapping",
            "type": "object",
            "description": "For rss: {title, link, channelLink, description?, date?, channelTitle?, channelDescription?}."
          },
          "sitemapMapping": {
            "title": "Sitemap mapping",
            "type": "object",
            "description": "For sitemap: {loc, lastmod?}."
          },
          "vcardMapping": {
            "title": "Contact (vCard) mapping",
            "type": "object",
            "description": "For vcard: {fn, org?, title?, email?, tel?, url?, address?, note?} as field paths."
          },
          "influxMapping": {
            "title": "InfluxDB mapping",
            "type": "object",
            "description": "For influx-line: {time, tags?}. time is a field path to an ISO timestamp with Z or an offset; tags is a comma-separated list of columns to store as tags."
          },
          "productMapping": {
            "title": "Product mapping (shopping feeds)",
            "type": "object",
            "description": "For google-merchant, meta-catalog and shopify-products: {id, title, price, link, description?, imageLink?, additionalImages?, availability?, availabilityDate?, condition?, brand?, gtin?, mpn?, sku?, productType?, wasPrice?} as field paths."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO 4217 code for shopping-feed prices (default GBP)."
          },
          "bankMapping": {
            "title": "Bank statement mapping",
            "type": "object",
            "description": "For xero-bank-csv, quickbooks-bank-csv, sage-bank-csv and freeagent-bank-csv: {date, amount, description?, payee?, reference?} as field paths."
          },
          "bankDateStyle": {
            "title": "Bank date order (Xero, QuickBooks)",
            "enum": [
              "uk",
              "us"
            ],
            "type": "string",
            "description": "uk (dd/mm/yyyy, default) or us (mm/dd/yyyy)."
          },
          "cardMapping": {
            "title": "Chat card mapping",
            "type": "object",
            "description": "For teams-card and slack-blocks: {title, text?, link?, fields?}; fields is a comma-separated list of up to 10 columns."
          },
          "enrich": {
            "title": "Enrichment",
            "type": "object",
            "description": "{settlementPeriodFrom: field path}: adds GB electricity settlementDate and settlementPeriod columns from an ISO timestamp with Z or an offset."
          },
          "maxItems": {
            "title": "Max items from the dataset",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "1 to 20000 (default 20000)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}