# Dataset Format Converter (`landlordtools/dataset-format-converter`) Actor

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.

- **URL**: https://apify.com/landlordtools/dataset-format-converter.md
- **Developed by:** [LandlordTools](https://apify.com/landlordtools) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 converted outputs

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Dataset Format Converter

Turn any Apify dataset, or a JSON list, into the exact file the next system needs, in one run: CSV in the right style for UK, US or European Excel, Salesforce, HubSpot or Airtable; SQL scripts for seven databases with column types worked out; a **Microsoft Dataverse** table definition and import file; BigQuery load files; maps; calendars; feeds; sitemaps; real `.xlsx` workbooks; contact cards; search, time-series and document-database load files; fixed-width text for legacy importers; Parquet for data lakes; **shopping feeds** for Google, Meta and Shopify; **bank-statement imports** for Xero, QuickBooks, Sage and FreeAgent; and Teams and Slack cards. **44 targets.**

It is **deterministic**: field mapping is explicit (or everything is flattened), so the same input always gives the same files and you can check them. Nothing goes to an AI service. Every format is read back by the test suite: CSV is parsed, JSON parsed, XML checked for well-formedness, the SQLite script is executed, and calendars pass an RFC 5545 validator [4].

### Targets

| Target | File(s) | What's special | For |
|---|---|---|---|
| `csv` | `output.csv` | Plain RFC 4180 CSV (UTF-8, ISO dates or `csvDateFormat`) | Any tool, Google Sheets, Power BI |
| `tsv` | `output.tsv` | Tab-separated | Databases, command-line tools |
| `excel-uk-csv` | `output-excel-uk.csv` | BOM, dd/mm/yyyy dates, formula-injection guard | Excel (UK) |
| `excel-us-csv` | `output-excel-us.csv` | BOM, mm/dd/yyyy dates, formula guard | Excel (US) |
| `excel-eu-csv` | `output-excel-eu.csv` | BOM, `;` separator, decimal commas, formula guard | Excel (most of Europe) |
| `salesforce-csv` | `output-salesforce.csv` | UTF-8, ISO dates, UTC date-times, formula guard | Salesforce Data Import Wizard / Data Loader |
| `hubspot-csv` | `output-hubspot.csv` | UTF-8, ISO dates, UTC date-times, formula guard | HubSpot imports |
| `airtable-csv` | `output-airtable.csv` | UTF-8, ISO dates, formula guard | Airtable CSV import |
| `dataverse` | `dataverse-import.csv` + `dataverse-table.json` | Import CSV with display-name headers, plus a table definition (column types, schema names with your publisher prefix, lengths) | Microsoft Dataverse / Power Apps / Power Automate |
| `json` | `output.json` | Array of flat objects | APIs, web apps |
| `jsonl` | `output.jsonl` | One object per line | Data pipelines, Elasticsearch, Splunk |
| `bigquery` | `bigquery-data.jsonl` + `bigquery-schema.json` | Column names made BigQuery-safe, types and modes; exact NUMERICs | Google BigQuery (`bq load --source_format=NEWLINE_DELIMITED_JSON`) |
| `xml` | `output.xml` | Well-formed XML with safe element names | Legacy systems, ETL tools |
| `yaml` | `output.yaml` | YAML list (JSON-compatible scalars) | Config-driven tools |
| `html` | `output.html` | Accessible HTML table | Email, intranets |
| `markdown` | `output.md` | Markdown table (pipes escaped) | Docs, GitHub, Notion |
| `sql-postgres` | `output-postgres.sql` | CREATE TABLE with inferred types + batched INSERTs | PostgreSQL, Supabase |
| `sql-sqlserver` | `output-sqlserver.sql` | NVARCHAR/BIT/DECIMAL/DATETIMEOFFSET, batches of 1000 | SQL Server, Azure SQL |
| `sql-mysql` | `output-mysql.sql` | Backtick identifiers, backslash-safe strings | MySQL, MariaDB |
| `sql-sqlite` | `output-sqlite.sql` | Executed for real in the tests | SQLite |
| `sql-snowflake` | `output-snowflake.sql` | NUMBER/TIMESTAMP_TZ | Snowflake |
| `sql-oracle` | `output-oracle.sql` | VARCHAR2/CLOB, TO_TIMESTAMP_TZ, one INSERT per row | Oracle |
| `geojson` | `output.geojson` | FeatureCollection of points (`geoMapping`) | QGIS, Mapbox, Leaflet, ArcGIS |
| `kml` | `output.kml` | Placemarks with ExtendedData (`geoMapping`) | Google Earth, Google My Maps |
| `ics` | `output.ics` | Events (`icsMapping`), validated against RFC 5545 before saving | Outlook, Google Calendar, Apple Calendar |
| `rss` | `feed.xml` | RSS 2.0 feed (`rssMapping`) | Feed readers, Slack/Teams RSS apps |
| `sitemap` | `sitemap.xml` | XML sitemap of URLs (`sitemapMapping`) | Search engines |
| `xlsx` | `output.xlsx` | Real Excel workbook: numbers, true/false and dates stored as typed cells, bold frozen header row, filter on, column widths set; formula-like text stays text; byte-identical for the same input [11] | Excel, SharePoint, Teams, Google Sheets, Power BI |
| `vcard` | `contacts.vcf` | vCard 4.0 contacts (`vcardMapping`), escaped and line-folded per RFC 6350 [6] | Outlook, Google Contacts, iPhone, CRMs |
| `gpx` | `output.gpx` | GPX 1.1 waypoints (`geoMapping`) [7] | GPS units, Garmin, Strava, field-survey apps, QGIS |
| `elasticsearch-bulk` | `elasticsearch-bulk.ndjson` | `_bulk` body: an index action line before each document, index = `tableName` in lower case [8] | Elasticsearch, OpenSearch, Kibana (`POST _bulk`) |
| `influx-line` | `influx.lp` | Line protocol (`influxMapping`): tags and keys escaped, integers marked `i`, nanosecond timestamps [9] | InfluxDB, Telegraf, QuestDB and other time-series stores (meter and SCADA data) |
| `mongodb-jsonl` | `mongodb.jsonl` | Extended JSON (relaxed): date-times become `{"$date": ...}` so they load as real dates [10] | MongoDB (`mongoimport`), Atlas, Cosmos DB for MongoDB |
| `fixed-width` | `output-fixed-width.txt` + `fixed-width-layout.json` | Space-padded columns (numbers right-aligned), CRLF, plus a layout file giving each field's start, width and type | Mainframe, COBOL, banking and utility billing importers |
| `parquet` | `output.parquet` | Apache Parquet: typed columns (string, int64, double, boolean, date, UTC timestamp), GZIP pages; read back with pyarrow and DuckDB [12] | Microsoft Fabric, Databricks, Snowflake, BigQuery, Athena, DuckDB, pandas |

#### Platform presets

| Target | File | What it does | For |
|---|---|---|---|
| `google-merchant` | `google-merchant.tsv` | Product feed (`productMapping`): `15.00 GBP` prices, `in_stock`/`out_of_stock`/`preorder`/`backorder`, sale price from a higher `wasPrice`, GTIN check digits verified, `identifier_exists` set when there's no GTIN or brand + MPN, Google's length limits applied, commas in URLs encoded [13] | Google Merchant Center (Shopping ads, free listings) |
| `meta-catalog` | `meta-catalog.csv` | Catalogue feed (`productMapping`): `in stock`/`out of stock`, up to 20 extra images within 2,000 characters, Meta's length limits; warns when brand is missing [14] | Meta Commerce Manager (Facebook and Instagram shops, Advantage+ catalogue ads) |
| `shopify-products` | `shopify-products.csv` | Product import (`productMapping`): unique handles from titles, HTML body, compare-at price from `wasPrice`, extra images as extra rows, out-of-stock items as drafts [15] | Shopify admin > Products > Import |
| `xero-bank-csv` | `xero-bank-statement.csv` | Date, Amount (money out negative), Payee, Description, Reference; UK or US date order (`bankDateStyle`) [18] | Xero bank statement import |
| `quickbooks-bank-csv` | `quickbooks-bank-statement.csv` | 3-column Date, Description, Amount [19] | QuickBooks Online bank upload |
| `sage-bank-csv` | `sage-bank-statement.csv` | Date, Description, Amount in that order, a description on every row, plus Reference and Payee name [16] | Sage Accounting bank import |
| `freeagent-bank-csv` | `freeagent-bank-statement.csv` | No header; dd/mm/yyyy, amount to 2 decimal places, description with no commas, quotes or line breaks [17] | FreeAgent bank statement upload |
| `teams-card` | `teams-card.json` | Adaptive Card 1.4 message (`cardMapping`): up to 20 items with links and facts; warns over Teams' 28 KB limit [21] | Teams incoming webhooks and Workflows, Power Automate |
| `slack-blocks` | `slack-blocks.json` | Block Kit message (`cardMapping`): header, up to 20 linked items with fields, within Slack's block and text limits [20] | Slack incoming webhooks, `chat.postMessage` |

Platform presets load straight into the platform, so they don't add the spreadsheet formula guard (which would end up stored in the data). Item rows the platform would reject (no id, zero price, relative links, impossible dates) are skipped and counted in the warnings. Layouts were checked against each platform's help pages on 3 October 2026; platforms change their import screens, so check a small file first.

All spreadsheet targets except `csv` and `tsv` prefix cells that start with `=`, `+`, `-` or `@` with an apostrophe, so a value can't run as a formula when opened (CSV injection) [5].

### Input

```json
{
  "items": [
    {
      "name": "Example site A",
      "site": {
        "region": "West Midlands",
        "lat": 52.4862,
        "lon": -1.8904
      },
      "start": "2026-11-02",
      "tags": [
        "solar",
        "battery"
      ],
      "capacityMw": 12.5,
      "live": true,
      "url": "https://example.com/a"
    },
    {
      "name": "Example site B, phase 2",
      "site": {
        "region": "East of England",
        "lat": 52.2053,
        "lon": 0.1218
      },
      "start": "2027-01-15",
      "tags": [
        "wind"
      ],
      "capacityMw": 40,
      "live": false,
      "url": "https://example.com/b"
    },
    {
      "name": "=Example site C",
      "site": {
        "region": "London",
        "lat": 51.5072,
        "lon": -0.1276
      },
      "start": "2026-12-01T09:30:00Z",
      "tags": [],
      "capacityMw": null,
      "live": true,
      "url": "https://example.com/c"
    }
  ],
  "targets": [
    "excel-uk-csv",
    "sql-postgres",
    "dataverse",
    "ics",
    "geojson",
    "xlsx"
  ],
  "tableName": "sites",
  "icsMapping": {
    "summary": "name",
    "start": "start",
    "location": "site.region"
  },
  "geoMapping": {
    "lat": "site.lat",
    "lon": "site.lon",
    "name": "name"
  }
}
```

- **Source:** `items` (a JSON list) or `datasetId` (any Apify dataset this run's token can read [1]; up to 20,000 items).
- **`targets`:** one or more from the table.
- **`fields`** (optional): `[{"from": "site.region", "to": "Region", "type": "string"}]`. Paths use dots for nesting and numbers for list positions (`tags.0`). Without `fields`, nested objects are flattened to dotted columns, lists of plain values are joined with `arrayJoiner` (default `"; "`), and lists of objects become JSON text.
- **Types** are inferred per column (boolean, integer, number, date, date-time, string) and drive SQL, Dataverse and BigQuery column types. Override them with `fields[].type`.
- **Mappings** for the formats that need them (each value is a field path):
  - `icsMapping`: `{summary, start, end?, description?, location?, uid?}`
  - `geoMapping` (geojson, kml, gpx): `{lat, lon, name?}`
  - `rssMapping`: `{title, link, channelLink, description?, date?, channelTitle?, channelDescription?}`
  - `sitemapMapping`: `{loc, lastmod?}`
  - `vcardMapping`: `{fn, org?, title?, email?, tel?, url?, address?, note?}` (a list of emails or phone numbers gives one line each)
  - `productMapping` (shopping feeds): `{id, title, price, link, description?, imageLink?, additionalImages?, availability?, availabilityDate?, condition?, brand?, gtin?, mpn?, sku?, productType?, wasPrice?}`, plus `currency` (ISO 4217, default `GBP`). Prices may be numbers or text such as `£1,299.00`; availability may be `true`/`false`, `InStock` or a schema.org URL.
  - `bankMapping` (bank statements): `{date, amount, description?, payee?, reference?}`. Dates are ISO or dd/mm/yyyy; amounts are signed (money out negative) or in brackets. `bankDateStyle`: `uk` (default) or `us`.
  - `cardMapping` (Teams and Slack): `{title, text?, link?, fields?}`, where `fields` is a comma-separated list of up to 10 columns shown as facts.
  - `influxMapping`: `{time, tags?}`. `time` is an ISO timestamp with `Z` or an offset; `tags` is a comma-separated list of columns to index as tags (every other column becomes a field). The measurement is `tableName`.
- **Energy add-on:** `"enrich": {"settlementPeriodFrom": "timestamp"}` adds GB electricity `settlementDate` and `settlementPeriod` columns (46, 48 or 50 periods a day around clock changes), so half-hourly data lines up with Elexon and supplier settlement data.

### Output

Each file is saved in the run's key-value store under the name shown. The `SCHEMA` record holds the inferred columns, and the dataset gets one row per file (where it is, rows, bytes, warnings). The first row for the input above:

```json
{
  "target": "excel-uk-csv",
  "key": "output-excel-uk.csv",
  "contentType": "text/csv; charset=utf-8",
  "rows": 3,
  "columns": 9,
  "bytes": 369,
  "url": null,
  "warnings": []
}
```

Warnings say when rows were skipped (for example, missing coordinates for a map) and why.

### Limits

- Up to 20,000 items and 1,000 columns per run.
- SQL scripts are for loading data; review the inferred types before production use.
- Dataverse: create the table from `dataverse-table.json` (Power Apps > Tables > New table), then import `dataverse-import.csv` (Import > Import data from Excel/CSV, or a dataflow) [2].
- Excel cells hold at most 32,767 characters; longer text is cut, with a warning. Date-times go into `.xlsx` in UTC.
- Oracle string literals over 4,000 characters need loading another way (the column becomes CLOB).

### Pricing

Pay per event: $5 per 1,000 results, plus Apify's tiny per-run start fee ($0.00005). See the Pricing tab for the current price.

### Local use

With Node.js 22 or later, run `node cli.js examples/input.json` (writes files to `./out`), or `npm test`.

### Sources

1. [Apify: Get dataset items (API)](https://docs.apify.com/api/v2/dataset-items-get). Accessed 3 October 2026.
2. [Microsoft Learn: Import data into Dataverse (Power Apps)](https://learn.microsoft.com/en-us/power-apps/maker/data-platform/data-platform-import-export). Accessed 3 October 2026.
3. [RFC 4180: Common Format and MIME Type for CSV Files](https://www.rfc-editor.org/rfc/rfc4180). Accessed 3 October 2026.
4. [RFC 5545: iCalendar](https://www.rfc-editor.org/rfc/rfc5545). Accessed 3 October 2026.
5. [OWASP: CSV Injection](https://owasp.org/www-community/attacks/CSV_Injection). Accessed 3 October 2026.
6. [RFC 6350: vCard Format Specification](https://www.rfc-editor.org/rfc/rfc6350). Accessed 3 October 2026.
7. [GPX 1.1 Schema Documentation](https://www.topografix.com/GPX/1/1/). Accessed 3 October 2026.
8. [Elastic: Bulk API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html). Accessed 3 October 2026.
9. [InfluxData: Line protocol (InfluxDB v2)](https://docs.influxdata.com/influxdb/v2/reference/syntax/line-protocol/). Accessed 3 October 2026.
10. [MongoDB: Extended JSON](https://www.mongodb.com/docs/manual/reference/mongodb-extended-json/). Accessed 3 October 2026.
11. [Ecma International: ECMA-376 Office Open XML File Formats](https://ecma-international.org/publications-and-standards/standards/ecma-376/). Accessed 3 October 2026.
12. [Apache Parquet: File format](https://parquet.apache.org/docs/file-format/). Accessed 3 October 2026.
13. [Google Merchant Center: Product data specification](https://support.google.com/merchants/answer/7052112). Accessed 3 October 2026.
14. [Meta: Catalog fields reference](https://developers.facebook.com/docs/marketing-api/catalog/reference/). Accessed 3 October 2026.
15. [Shopify Help Center: Product CSV columns](https://help.shopify.com/en/manual/products/import-export/using-csv/csv-columns). Accessed 3 October 2026.
16. [Sage: Supported file formats for bank statement imports](https://gb-kb.sage.com/portal/app/portlets/results/viewsolution.jsp?solutionid=240718093942637\&hypermediatext=null). Accessed 3 October 2026.
17. [FreeAgent: Format a CSV file to upload a bank statement](https://support.freeagent.com/hc/en-gb/articles/115001222564). Accessed 3 October 2026.
18. [Xero Central: Import a bank statement](https://central.xero.com/s/article/Import-a-bank-statement-CSV). Accessed 3 October 2026.
19. [QuickBooks: Format CSV files to get bank transactions into QuickBooks](https://quickbooks.intuit.com/learn-support/en-global/help-article/bank-transactions/format-csv-files-excel-get-bank-transactions/L4BjLWckq_ROW_en). Accessed 3 October 2026.
20. [Slack: Block Kit blocks reference](https://docs.slack.dev/reference/block-kit/blocks). Accessed 3 October 2026.
21. [Microsoft Learn: Create an Incoming Webhook (Teams)](https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook). Accessed 3 October 2026.

[1]: https://docs.apify.com/api/v2/dataset-items-get

[2]: https://learn.microsoft.com/en-us/power-apps/maker/data-platform/data-platform-import-export

[3]: https://www.rfc-editor.org/rfc/rfc4180

[4]: https://www.rfc-editor.org/rfc/rfc5545

[5]: https://owasp.org/www-community/attacks/CSV_Injection

[6]: https://www.rfc-editor.org/rfc/rfc6350

[7]: https://www.topografix.com/GPX/1/1/

[8]: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html

[9]: https://docs.influxdata.com/influxdb/v2/reference/syntax/line-protocol/

[10]: https://www.mongodb.com/docs/manual/reference/mongodb-extended-json/

[11]: https://ecma-international.org/publications-and-standards/standards/ecma-376/

[12]: https://parquet.apache.org/docs/file-format/

[13]: https://support.google.com/merchants/answer/7052112

[14]: https://developers.facebook.com/docs/marketing-api/catalog/reference/

[15]: https://help.shopify.com/en/manual/products/import-export/using-csv/csv-columns

[16]: https://gb-kb.sage.com/portal/app/portlets/results/viewsolution.jsp?solutionid=240718093942637&hypermediatext=null

[17]: https://support.freeagent.com/hc/en-gb/articles/115001222564

[18]: https://central.xero.com/s/article/Import-a-bank-statement-CSV

[19]: https://quickbooks.intuit.com/learn-support/en-global/help-article/bank-transactions/format-csv-files-excel-get-bank-transactions/L4BjLWckq_ROW_en

[20]: https://docs.slack.dev/reference/block-kit/blocks

[21]: https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook

# Actor input Schema

## `datasetId` (type: `string`):

Dataset ID or username~dataset-name to convert (read with this run's token). Use this or items.

## `items` (type: `array`):

A JSON list of objects to convert, instead of a dataset.

## `targets` (type: `array`):

One or more of the formats listed in the README.

## `fields` (type: `array`):

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` (type: `string`):

Used for SQL tables, the Dataverse table, XML root and feed titles. Letters, digits and underscores.

## `csvDateFormat` (type: `string`):

iso (default), uk or us.

## `arrayJoiner` (type: `string`):

Lists of plain values become one cell joined with this (default '; ').

## `dataversePrefix` (type: `string`):

2-8 lowercase letters or digits (default new).

## `icsMapping` (type: `object`):

For the ics target: {summary, start, end?, description?, location?, uid?} as field paths.

## `geoMapping` (type: `object`):

For geojson, kml and gpx: {lat, lon, name?} as field paths.

## `rssMapping` (type: `object`):

For rss: {title, link, channelLink, description?, date?, channelTitle?, channelDescription?}.

## `sitemapMapping` (type: `object`):

For sitemap: {loc, lastmod?}.

## `vcardMapping` (type: `object`):

For vcard: {fn, org?, title?, email?, tel?, url?, address?, note?} as field paths.

## `influxMapping` (type: `object`):

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` (type: `object`):

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` (type: `string`):

ISO 4217 code for shopping-feed prices (default GBP).

## `bankMapping` (type: `object`):

For xero-bank-csv, quickbooks-bank-csv, sage-bank-csv and freeagent-bank-csv: {date, amount, description?, payee?, reference?} as field paths.

## `bankDateStyle` (type: `string`):

uk (dd/mm/yyyy, default) or us (mm/dd/yyyy).

## `cardMapping` (type: `object`):

For teams-card and slack-blocks: {title, text?, link?, fields?}; fields is a comma-separated list of up to 10 columns.

## `enrich` (type: `object`):

{settlementPeriodFrom: field path}: adds GB electricity settlementDate and settlementPeriod columns from an ISO timestamp with Z or an offset.

## `maxItems` (type: `integer`):

1 to 20000 (default 20000).

## Actor input object example

```json
{
  "items": [
    {
      "name": "Example site A",
      "site": {
        "region": "West Midlands",
        "lat": 52.4862,
        "lon": -1.8904
      },
      "start": "2026-11-02",
      "tags": [
        "solar",
        "battery"
      ],
      "capacityMw": 12.5,
      "live": true,
      "url": "https://example.com/a"
    },
    {
      "name": "Example site B, phase 2",
      "site": {
        "region": "East of England",
        "lat": 52.2053,
        "lon": 0.1218
      },
      "start": "2027-01-15",
      "tags": [
        "wind"
      ],
      "capacityMw": 40,
      "live": false,
      "url": "https://example.com/b"
    },
    {
      "name": "=Example site C",
      "site": {
        "region": "London",
        "lat": 51.5072,
        "lon": -0.1276
      },
      "start": "2026-12-01T09:30:00Z",
      "tags": [],
      "capacityMw": null,
      "live": true,
      "url": "https://example.com/c"
    }
  ],
  "targets": [
    "excel-uk-csv",
    "sql-postgres",
    "dataverse",
    "ics",
    "geojson",
    "xlsx"
  ],
  "tableName": "sites",
  "icsMapping": {
    "summary": "name",
    "start": "start",
    "location": "site.region"
  },
  "geoMapping": {
    "lat": "site.lat",
    "lon": "site.lon",
    "name": "name"
  }
}
```

# Actor output Schema

## `result` (type: `string`):

No description

## `output` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "items": [
        {
            "name": "Example site A",
            "site": {
                "region": "West Midlands",
                "lat": 52.4862,
                "lon": -1.8904
            },
            "start": "2026-11-02",
            "tags": [
                "solar",
                "battery"
            ],
            "capacityMw": 12.5,
            "live": true,
            "url": "https://example.com/a"
        },
        {
            "name": "Example site B, phase 2",
            "site": {
                "region": "East of England",
                "lat": 52.2053,
                "lon": 0.1218
            },
            "start": "2027-01-15",
            "tags": [
                "wind"
            ],
            "capacityMw": 40,
            "live": false,
            "url": "https://example.com/b"
        },
        {
            "name": "=Example site C",
            "site": {
                "region": "London",
                "lat": 51.5072,
                "lon": -0.1276
            },
            "start": "2026-12-01T09:30:00Z",
            "tags": [],
            "capacityMw": null,
            "live": true,
            "url": "https://example.com/c"
        }
    ],
    "targets": [
        "excel-uk-csv",
        "sql-postgres",
        "dataverse",
        "ics",
        "geojson",
        "xlsx"
    ],
    "tableName": "sites",
    "icsMapping": {
        "summary": "name",
        "start": "start",
        "location": "site.region"
    },
    "geoMapping": {
        "lat": "site.lat",
        "lon": "site.lon",
        "name": "name"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("landlordtools/dataset-format-converter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "items": [
        {
            "name": "Example site A",
            "site": {
                "region": "West Midlands",
                "lat": 52.4862,
                "lon": -1.8904,
            },
            "start": "2026-11-02",
            "tags": [
                "solar",
                "battery",
            ],
            "capacityMw": 12.5,
            "live": True,
            "url": "https://example.com/a",
        },
        {
            "name": "Example site B, phase 2",
            "site": {
                "region": "East of England",
                "lat": 52.2053,
                "lon": 0.1218,
            },
            "start": "2027-01-15",
            "tags": ["wind"],
            "capacityMw": 40,
            "live": False,
            "url": "https://example.com/b",
        },
        {
            "name": "=Example site C",
            "site": {
                "region": "London",
                "lat": 51.5072,
                "lon": -0.1276,
            },
            "start": "2026-12-01T09:30:00Z",
            "tags": [],
            "capacityMw": None,
            "live": True,
            "url": "https://example.com/c",
        },
    ],
    "targets": [
        "excel-uk-csv",
        "sql-postgres",
        "dataverse",
        "ics",
        "geojson",
        "xlsx",
    ],
    "tableName": "sites",
    "icsMapping": {
        "summary": "name",
        "start": "start",
        "location": "site.region",
    },
    "geoMapping": {
        "lat": "site.lat",
        "lon": "site.lon",
        "name": "name",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("landlordtools/dataset-format-converter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "items": [
    {
      "name": "Example site A",
      "site": {
        "region": "West Midlands",
        "lat": 52.4862,
        "lon": -1.8904
      },
      "start": "2026-11-02",
      "tags": [
        "solar",
        "battery"
      ],
      "capacityMw": 12.5,
      "live": true,
      "url": "https://example.com/a"
    },
    {
      "name": "Example site B, phase 2",
      "site": {
        "region": "East of England",
        "lat": 52.2053,
        "lon": 0.1218
      },
      "start": "2027-01-15",
      "tags": [
        "wind"
      ],
      "capacityMw": 40,
      "live": false,
      "url": "https://example.com/b"
    },
    {
      "name": "=Example site C",
      "site": {
        "region": "London",
        "lat": 51.5072,
        "lon": -0.1276
      },
      "start": "2026-12-01T09:30:00Z",
      "tags": [],
      "capacityMw": null,
      "live": true,
      "url": "https://example.com/c"
    }
  ],
  "targets": [
    "excel-uk-csv",
    "sql-postgres",
    "dataverse",
    "ics",
    "geojson",
    "xlsx"
  ],
  "tableName": "sites",
  "icsMapping": {
    "summary": "name",
    "start": "start",
    "location": "site.region"
  },
  "geoMapping": {
    "lat": "site.lat",
    "lon": "site.lon",
    "name": "name"
  }
}' |
apify call landlordtools/dataset-format-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,landlordtools/dataset-format-converter"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gBdAOegWsZpLXDD1H/builds/SucWF7J7MuETZa5hn/openapi.json
