{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Supplier Concentration Intelligence",
    "description": "Structurally paired buyer and CPV-market supplier dependency metrics from official TED XML.",
    "version": "1.2",
    "x-build-id": "2extHa49jGmwmWTTh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atlas-data~eu-supplier-concentration-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atlas-data-eu-supplier-concentration-intelligence",
        "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/atlas-data~eu-supplier-concentration-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-atlas-data-eu-supplier-concentration-intelligence",
        "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/atlas-data~eu-supplier-concentration-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-atlas-data-eu-supplier-concentration-intelligence",
        "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": {
          "mode": {
            "title": "Run mode",
            "enum": [
              "full",
              "incremental",
              "diff"
            ],
            "type": "string",
            "description": "full emits snapshots; incremental emits new/updated/removed groups; diff also emits unchanged groups.",
            "default": "incremental"
          },
          "groupBy": {
            "title": "Aggregation levels",
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "type": "array",
            "description": "Buyer requires one XML-resolved contracting organization; market uses CPV codes on the awarded XML lot.",
            "items": {
              "type": "string",
              "enum": [
                "buyer",
                "market"
              ],
              "enumTitles": [
                "Buyer",
                "CPV market"
              ]
            },
            "default": [
              "buyer",
              "market"
            ]
          },
          "buyerKeywords": {
            "title": "Buyer name keywords",
            "maxItems": 50,
            "type": "array",
            "description": "Case-insensitive OR match against official buyer names.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "default": []
          },
          "supplierKeywords": {
            "title": "Supplier name keywords",
            "maxItems": 50,
            "type": "array",
            "description": "Case-insensitive OR match against official winner names.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "default": []
          },
          "cpvPrefixes": {
            "title": "CPV filters",
            "maxItems": 100,
            "type": "array",
            "description": "Server-prefilter notices, then keep awards whose structurally linked lot has a matching CPV prefix.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{2,8}$"
            },
            "default": []
          },
          "buyerCountries": {
            "title": "Buyer countries",
            "maxItems": 50,
            "type": "array",
            "description": "Official three-letter TED country codes; OR within this filter.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$"
            },
            "default": []
          },
          "supplierCountries": {
            "title": "Supplier countries",
            "maxItems": 50,
            "type": "array",
            "description": "Server-prefilter notices, then match structurally resolved winning organizations.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$"
            },
            "default": []
          },
          "publicationFrom": {
            "title": "Published from",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD. Omit for the safe single-day default window."
          },
          "publicationTo": {
            "title": "Published through",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD."
          },
          "marketCpvDigits": {
            "title": "Market CPV prefix length",
            "minimum": 2,
            "maximum": 8,
            "type": "integer",
            "description": "Digits used to define each market; 2 is broad, 8 is specific.",
            "default": 2
          },
          "language": {
            "title": "Preferred language",
            "pattern": "^[a-z]{3}$",
            "type": "string",
            "description": "Falls back to English and then the first available localized value.",
            "default": "eng"
          },
          "maxItems": {
            "title": "Maximum output groups",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Highest-award-count active groups. Incremental/diff tombstones may be emitted in addition.",
            "default": 1000
          },
          "pageSize": {
            "title": "TED page size",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Advanced; official maximum 250.",
            "default": 250
          },
          "maxPages": {
            "title": "Maximum forward pages per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Duplicate-only token replay has a separate hard ceiling.",
            "default": 100
          },
          "maxScannedItems": {
            "title": "Maximum forward notices per run",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Sparse filters still advance safely. The server-filtered window is separately capped at 4,000 notices.",
            "default": 10000
          },
          "maxXmlDownloads": {
            "title": "Maximum XML downloads per run",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Bounds authoritative notice downloads; partial runs resume at the exact source row. Aggregates are emitted only once the window is fully scanned, so keep this at or above the notice count of the chosen window.",
            "default": 250
          },
          "overlapDays": {
            "title": "Incremental overlap days",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Revisit recent publications to detect source edits.",
            "default": 3
          },
          "stateRetentionDays": {
            "title": "Change digest retention days",
            "minimum": 7,
            "maximum": 730,
            "type": "integer",
            "description": "Completed group digests older than this can be forgotten.",
            "default": 180
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}