# getGermanPartyTrend

**Identifier:** `dawum_getGermanPartyTrend`

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

Month-by-month average poll share of German parties for the Bundestag or a Land parliament, back to 2017. Use it to see how a party such as AfD, CDU/CSU, SPD or Grüne has risen or fallen over time.

## Run it with the CLI

```bash
kirha tools run dawum_getGermanPartyTrend \
  --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_getGermanPartyTrend",
  "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": {
    "months": {
      "default": 12,
      "maximum": 120,
      "minimum": 2,
      "type": "integer"
    },
    "parliament": {
      "default": "Bundestag",
      "type": "string"
    },
    "parties": {
      "description": "Party shortcuts, e.g., AfD, CDU/CSU, SPD; omit for all",
      "items": {
        "type": "string"
      },
      "maxItems": 10,
      "type": "array"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "months": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "month": {
            "type": "string"
          },
          "polls": {
            "type": "number"
          },
          "shares": {
            "additionalProperties": {
              "type": "number"
            },
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "month",
          "polls",
          "shares"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "parliament": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "parliament",
    "months"
  ],
  "type": "object"
}
```

-----

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