# getGermanPollAverage

**Identifier:** `dawum_getGermanPollAverage`

**Provider:** [DAWUM German Polls](https://kirha.com/providers/dawum.md)

Current German voting intention for the Bundestag or a Land parliament: the average of each polling institute's latest poll, party by party, with the polls used. Use it for where German parties stand now (AfD, CDU/CSU, SPD, Grüne, Linke, BSW, FDP).

## Run it with the CLI

```bash
kirha tools run dawum_getGermanPollAverage \
  --input '{}'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "dawum_getGermanPollAverage",
  "input": {}
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "days": {
      "default": 30,
      "description": "Window of polls considered",
      "maximum": 1825,
      "minimum": 7,
      "type": "integer"
    },
    "parliament": {
      "default": "Bundestag",
      "description": "Bundestag or a Land, e.g., Bayern, Berlin, NRW",
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "average": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "party": {
            "type": "string"
          },
          "polls": {
            "type": "number"
          },
          "share": {
            "type": "number"
          }
        },
        "required": [
          "party",
          "share",
          "polls"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "context": {
      "type": "string"
    },
    "parliament": {
      "type": "string"
    },
    "polls": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "date": {
            "type": "string"
          },
          "institute": {
            "type": "string"
          },
          "results": {
            "additionalProperties": {
              "type": "number"
            },
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "sampleSize": {
            "type": "number"
          }
        },
        "required": [
          "date",
          "institute",
          "results"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "updatedAt": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "parliament",
    "average",
    "polls"
  ],
  "type": "object"
}
```

-----

[All DAWUM German Polls tools](https://kirha.com/providers/dawum.md) · [< Back to tools list](https://kirha.com/tools.md)