{
  "openapi": "3.0.1",
  "info": {
    "title": "France Public Sector Late Payers: Payment Times",
    "description": "How long French communes, departments, regions and 90,000 other local public budgets take to pay their suppliers, from the official yearly figures: average payment time in days, days over the 30-day legal limit, and the trend from 2023 to 2025. Search by department, name, SIRET or kind of body.",
    "version": "1.0",
    "x-build-id": "dqzG527qhr5BcqKDP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/digital_influx~france-public-payment-times/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-digital_influx-france-public-payment-times",
        "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/digital_influx~france-public-payment-times/runs": {
      "post": {
        "operationId": "runs-sync-digital_influx-france-public-payment-times",
        "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/digital_influx~france-public-payment-times/run-sync": {
      "post": {
        "operationId": "run-sync-digital_influx-france-public-payment-times",
        "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": {
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "French departments by code (75, 13, 2A, 971) or by name (Paris, Bouches-du-Rhône). Empty = all of France.",
            "items": {
              "type": "string"
            }
          },
          "entityTypes": {
            "title": "Kinds of public body",
            "type": "array",
            "description": "Empty = all kinds (35 in the source, also budgets of local public services).",
            "items": {
              "type": "string",
              "enum": [
                "commune",
                "department",
                "region",
                "intermunicipal",
                "syndicate",
                "socialCentre",
                "water",
                "fireService",
                "transport",
                "schoolFund"
              ],
              "enumTitles": [
                "Communes (town halls)",
                "Departments",
                "Regions",
                "Intermunicipal bodies (communautés, métropoles)",
                "Syndicates (SIVU, SIVOM, syndicats mixtes)",
                "Social action centres (CCAS, CIAS)",
                "Water and sanitation",
                "Fire and rescue services (SDIS)",
                "Passenger transport",
                "School funds (caisses des écoles)"
              ]
            }
          },
          "names": {
            "title": "Names",
            "type": "array",
            "description": "Find public bodies by name: Marseille, Saint-Étienne, Neuilly-le-Bisson. Accents, hyphens and capitals do not matter. Each name is one search; add a department when the name is common.",
            "items": {
              "type": "string"
            }
          },
          "sirets": {
            "title": "SIRET numbers",
            "type": "array",
            "description": "Look up public bodies by their 14-digit SIRET. The other filters are not applied to these.",
            "items": {
              "type": "string"
            }
          },
          "minAverageDays": {
            "title": "Average payment time: at least (days)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only bodies whose yearly average payment time is this many days or more. The legal limit for French local authorities is 30 days. Empty = any."
          },
          "year": {
            "title": "Year",
            "enum": [
              "2025",
              "2024",
              "2023"
            ],
            "type": "string",
            "description": "The year of the figures. Each year's file is published in the middle of the next year.",
            "default": "2025"
          },
          "compareYears": {
            "title": "Add the other years' figures and the trend",
            "type": "boolean",
            "description": "On: each row also gets the average of the other years (2023 to 2025), the change against the year before and the trend. It takes two more queries per 100 rows.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Rows saved per run, slowest payers first; you pay per row saved. On the free Apify plan a run saves at most 25 rows; any paid Apify plan removes that limit.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}