{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenDataSoft Explore Extractor",
    "description": "Point at ANY OpenDataSoft portal (Paris, RTE, data.opendatasoft.com + thousands more) and pull real ROW data via the Explore API v2.1. List the dataset catalog or extract records with ODSQL where/select/order_by/group_by + facets. Auto-paginates to flat rows + geo. Pay per record.",
    "version": "0.1",
    "x-build-id": "cnY2fqoZnJU7qXGM4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~opendatasoft-explore-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-opendatasoft-explore-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/datamule~opendatasoft-explore-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-opendatasoft-explore-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/datamule~opendatasoft-explore-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-opendatasoft-explore-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",
        "required": [
          "portalUrl"
        ],
        "properties": {
          "portalUrl": {
            "title": "OpenDataSoft portal URL",
            "type": "string",
            "description": "The base URL of ANY OpenDataSoft open-data portal (the platform behind thousands of city/energy/transport/government/corporate data portals). Examples: https://opendata.paris.fr (City of Paris), https://opendata.reseaux-energies.fr (RTE, France's TSO), https://data.opendatasoft.com (the ODS flagship, 90k+ datasets). Just the portal root — do NOT include /api/explore/...; the actor appends it."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "catalog",
              "records"
            ],
            "type": "string",
            "description": "catalog = list the datasets published on the portal. records = pull the actual ROW data of one dataset (requires Dataset id). auto (default) = records when a Dataset id is set, else catalog.",
            "default": "auto"
          },
          "datasetId": {
            "title": "Dataset id (records mode)",
            "type": "string",
            "description": "The dataset_id to pull records from, e.g. les-arbres (opendata.paris.fr) or eco2mix-national-tr (opendata.reseaux-energies.fr). Required for records mode. Run catalog mode first to discover the dataset ids available on a portal."
          },
          "where": {
            "title": "ODSQL where filter",
            "type": "string",
            "description": "Optional ODSQL predicate to filter rows (records) or datasets (catalog). Examples (records): hauteurenm > 20; arrondissement = \"PARIS 5E ARRDT\"; libellefrancais LIKE \"Ch\\u00eane\". Examples (catalog): records_count > 1000. Full ODSQL: field comparisons, AND/OR/NOT, LIKE, IN, date/geo functions. Leave empty for no filter."
          },
          "select": {
            "title": "ODSQL select (projection / aggregation)",
            "type": "string",
            "description": "Optional ODSQL select clause — choose/rename columns or compute aggregates. Examples: libellefrancais, hauteurenm; count(*) as n; avg(hauteurenm) as moy. Leave empty to return every field of each record."
          },
          "groupBy": {
            "title": "ODSQL group_by (aggregation)",
            "type": "string",
            "description": "Optional ODSQL group_by — turns the run into an aggregation (one output row per group). Pair with an aggregate in Select (e.g. group_by=arrondissement, select=count(*) as n gives per-arrondissement counts). Records mode only. Leave empty for raw rows."
          },
          "orderBy": {
            "title": "ODSQL order_by (sort)",
            "type": "string",
            "description": "Optional ODSQL order_by clause. Examples: hauteurenm DESC; modified DESC; random(). Sorting also lets you page a deeper, deterministic slice of a large dataset (the platform caps paging at offset+limit \\u2264 10000). Leave empty for the server's default order."
          },
          "refine": {
            "title": "Facet refine (=value)",
            "type": "array",
            "description": "Optional facet refinements as facet:value, keeping ONLY rows/datasets matching that facet value. Example (records): domanialite:Alignement. Example (catalog): theme:Environnement. Accepts multiple (ANDed). Leave empty for none.",
            "items": {
              "type": "string"
            }
          },
          "exclude": {
            "title": "Facet exclude (!=value)",
            "type": "array",
            "description": "Optional facet exclusions as facet:value, dropping rows/datasets matching that facet value (the inverse of Refine). Example: stadedeveloppement:Jeune. Accepts multiple. Leave empty for none.",
            "items": {
              "type": "string"
            }
          },
          "maxRecords": {
            "title": "Max records (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total rows to pull across all pages (the actor auto-paginates by offset). Each emitted row is one billable event. The OpenDataSoft API hard-caps paging at offset+limit \\u2264 10000, so a single run reaches at most 10000 rows of a dataset \\u2014 use a where filter / order_by to reach deeper slices. Default 1000.",
            "default": 1000
          },
          "limit": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Rows requested per API call (the actor auto-follows offset pagination regardless). OpenDataSoft caps this at 100 per call; higher values are clamped. Leave at the default unless you have a reason to change it.",
            "default": 100
          },
          "lang": {
            "title": "Language (optional)",
            "type": "string",
            "description": "Optional ODS lang code (e.g. fr, en) used to localize labels and interpret some ODSQL functions. Leave empty for the portal default."
          },
          "timezone": {
            "title": "Timezone (optional)",
            "type": "string",
            "description": "Optional IANA timezone (e.g. Europe/Paris, UTC) applied to datetime fields and ODSQL date functions. Leave empty for the portal default (usually UTC)."
          },
          "queryParams": {
            "title": "Extra query parameters",
            "type": "object",
            "description": "Arbitrary extra query-string parameters appended to each request, as a JSON object \\u2014 the generic passthrough for provider-specific ODS keys not covered above. The reserved keys limit/offset/where/select/order_by/group_by/refine/exclude/lang/timezone are managed by the actor and ignored here. Leave empty for none."
          },
          "apikey": {
            "title": "API key (optional)",
            "type": "string",
            "description": "Optional OpenDataSoft API key for private/key-gated portals or higher rate limits. Sent as Authorization: Apikey *** \\u2014 NOT required for public portals \\u2014 leave empty. Never logged."
          },
          "extraHeaders": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional extra HTTP headers to send with every request, as a JSON object. Leave empty for public portals."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}