{
  "openapi": "3.0.1",
  "info": {
    "title": "OData Service Extractor",
    "description": "Point at ANY OData service (v2/v3/v4) — SAP, Dynamics 365, Business Central, Dataverse, SharePoint, national-stats & gov portals. Pick an entity set or auto-discover from $metadata; apply $filter/$select/$orderby/$expand; auto-paginate to flat rows + raw. Pay per row.",
    "version": "0.1",
    "x-build-id": "XAFTcDhApy0fc4Hmr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~odata-service-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-odata-service-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~odata-service-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-odata-service-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~odata-service-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-odata-service-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": [
          "serviceRoot"
        ],
        "properties": {
          "serviceRoot": {
            "title": "OData service root URL",
            "type": "string",
            "description": "The root URL of ANY OData service (v2, v3 or v4). Examples: https://services.odata.org/V4/Northwind/Northwind.svc , https://opendata.cbs.nl/ODataApi/odata/83765NED (Statistics Netherlands), or your SAP / Dynamics 365 / Business Central / Dataverse / SharePoint OData endpoint. Do NOT include the entity set here — put that in the field below (or leave it empty to auto-discover)."
          },
          "entitySet": {
            "title": "Entity set",
            "type": "string",
            "description": "The entity set (collection) to extract, e.g. Products, Customers, Orders, or TypedDataSet on CBS. Leave EMPTY to auto-discover the service's entity sets from its $metadata and extract across all of them (sharing the Max results budget). Tip: turn on \"List entity sets only\" below to just see what's available first."
          },
          "listEntitySetsOnly": {
            "title": "List entity sets only (discovery)",
            "type": "boolean",
            "description": "When on, the actor only reads the service's $metadata and returns one row per available entity set (name + entity type + items URL) — it does NOT pull any data. Use this to discover what a service exposes, then set the Entity set above to extract one.",
            "default": false
          },
          "filter": {
            "title": "$filter",
            "type": "string",
            "description": "OData $filter expression (server-side row filter), e.g. UnitPrice gt 20 , Discontinued eq false , contains(ProductName,'Chai') , or Year eq 2023. Uses the target service's OData grammar. Leave empty for no filter."
          },
          "select": {
            "title": "$select",
            "type": "string",
            "description": "Comma-separated list of properties to return, e.g. ProductID,ProductName,UnitPrice. Narrows each row to just these fields (the full object is still kept in raw). Leave empty for all properties."
          },
          "orderby": {
            "title": "$orderby",
            "type": "string",
            "description": "OData $orderby, e.g. UnitPrice desc or ProductName asc. Leave empty for the service's default order."
          },
          "expand": {
            "title": "$expand",
            "type": "string",
            "description": "OData $expand — inline related entities, e.g. Category or Orders($top=5). Expanded objects are kept in each row and in raw. Leave empty for none."
          },
          "search": {
            "title": "$search",
            "type": "string",
            "description": "Free-text $search term (only supported on OData v4 services that enable it, e.g. many Dynamics/SharePoint endpoints). Ignored by services that don't support it. Leave empty for none."
          },
          "top": {
            "title": "$top (server-side page size)",
            "minimum": 1,
            "type": "integer",
            "description": "OData $top — asks the service for at most this many rows in the FIRST request. Most services also apply their own server-side paging; the actor follows nextLink regardless. Leave empty to use the service default. Use \"Max results\" below to cap the TOTAL number of rows pulled across all pages."
          },
          "maxResults": {
            "title": "Max results (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total number of rows to pull across all pages (the actor auto-follows @odata.nextLink / odata.nextLink / __next). Each returned row is one billable entity. Default 1000.",
            "default": 1000
          },
          "queryParams": {
            "title": "Extra query parameters",
            "type": "object",
            "description": "Optional extra URL query parameters to add to every request, as a JSON object, e.g. {\"api-version\": \"9.2\"} for Dynamics or a service-specific param. OData $-options are better set in the fields above."
          },
          "bearerToken": {
            "title": "Bearer token (optional)",
            "type": "string",
            "description": "Optional OAuth2 bearer token for tenant-gated services (Dynamics 365 / Business Central / Dataverse / SharePoint). Sent as the Authorization: Bearer header. NOT required for public services — 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, e.g. {\"OData-Version\": \"4.0\", \"Prefer\": \"odata.maxpagesize=200\"}. Use for services that need a custom header. Leave empty for public services."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}