{
  "openapi": "3.0.1",
  "info": {
    "title": "V-Dem Scraper [$5/1K💰] | Democracy Indices | 1789-2025 Data",
    "description": "Download V-Dem v16 democracy indices as country-year rows: electoral, liberal, participatory, deliberative and egalitarian scores for 202 countries from 1789 to 2025. Wide or long output, optional confidence bounds, CSV or Excel export.",
    "version": "1.0",
    "x-build-id": "GR4Y8fNk7Kzp49eLQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ahmed_jasarevic~v-dem-democracy-indices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ahmed_jasarevic-v-dem-democracy-indices",
        "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/ahmed_jasarevic~v-dem-democracy-indices/runs": {
      "post": {
        "operationId": "runs-sync-ahmed_jasarevic-v-dem-democracy-indices",
        "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/ahmed_jasarevic~v-dem-democracy-indices/run-sync": {
      "post": {
        "operationId": "run-sync-ahmed_jasarevic-v-dem-democracy-indices",
        "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": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Country names or 3-letter V-Dem codes (for example Sweden, USA, BRA). Historical names such as Siam or Zaire are also accepted. Leave empty to include every country.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "variables": {
            "title": "Variables",
            "type": "array",
            "description": "Pick one or more indices from the dropdown, or type any V-Dem variable tag/codebook name. Use \"headline\" for the five main democracy indices.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "v2x_polyarchy",
                "v2x_libdem",
                "v2x_partipdem",
                "v2x_delibdem",
                "v2x_egaldem",
                "v2x_rule",
                "v2x_corr",
                "v2x_freexp_altinf",
                "v2x_frassoc_thick",
                "v2x_suffr",
                "v2xel_frefair",
                "v2x_elecoff",
                "v2x_gender",
                "v2x_neopat"
              ],
              "enumTitles": [
                "Electoral democracy index (v2x_polyarchy)",
                "Liberal democracy index (v2x_libdem)",
                "Participatory democracy index (v2x_partipdem)",
                "Deliberative democracy index (v2x_delibdem)",
                "Egalitarian democracy index (v2x_egaldem)",
                "Rule of law index (v2x_rule)",
                "Political corruption index (v2x_corr, higher = worse)",
                "Freedom of expression index (v2x_freexp_altinf)",
                "Freedom of association index (v2x_frassoc_thick)",
                "Suffrage share (v2x_suffr)",
                "Clean elections index (v2xel_frefair)",
                "Elected officials index (v2x_elecoff)",
                "Women's political empowerment (v2x_gender)",
                "Neopatrimonial rule index (v2x_neopat, higher = worse)"
              ]
            },
            "default": [
              "v2x_polyarchy",
              "v2x_libdem",
              "v2x_partipdem",
              "v2x_delibdem",
              "v2x_egaldem"
            ]
          },
          "includeAllVariables": {
            "title": "Include all variables",
            "type": "boolean",
            "description": "Export every base indicator in the selected dataset. This produces very wide rows for the Core data and is mainly useful for research exports.",
            "default": false
          },
          "startYear": {
            "title": "Start year",
            "minimum": 1700,
            "maximum": 2200,
            "type": "integer",
            "description": "First year to include (inclusive). V-Dem historical series begin in 1789.",
            "default": 1789
          },
          "endYear": {
            "title": "End year",
            "minimum": 1700,
            "maximum": 2200,
            "type": "integer",
            "description": "Last year to include (inclusive). The v16 release ends in 2025.",
            "default": 2025
          },
          "onlyContemporary": {
            "title": "Contemporary coding only",
            "type": "boolean",
            "description": "Keep only rows from V-Dem's contemporary coding project (project = 0). This drops historical country-history rows before contemporary coding begins.",
            "default": false
          },
          "includeConfidenceBounds": {
            "title": "Include confidence bounds",
            "type": "boolean",
            "description": "Add the Bayesian lower and upper confidence bounds for each selected variable as <variable>_codelow and <variable>_codehigh.",
            "default": false
          },
          "includeStandardDeviation": {
            "title": "Include standard deviation",
            "type": "boolean",
            "description": "Add the posterior standard deviation for each selected variable as <variable>_sd.",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "wide",
              "long"
            ],
            "type": "string",
            "description": "Wide keeps one row per country-year with one column per variable. Long emits one row per country-year-variable and is convenient for databases and charting.",
            "default": "wide"
          },
          "dataset": {
            "title": "V-Dem release",
            "enum": [
              "core",
              "full"
            ],
            "type": "string",
            "description": "Core contains the democracy indices and their components. Full + Others contains all V-Dem indicators plus the external indicators.",
            "default": "core"
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many dataset items. Set to 0 for no limit. In long format each variable counts as one item.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}