# getFacilityContext

**Identifier:** `gdelt_getFacilityContext`

**Provider:** [GDELT](https://kirha.com/providers/gdelt.md)

Get recent news events and stories about the owner (and parent company) of an industrial facility. Events concern the owner, not necessarily the site itself; empty when the owner is unresolved.

## Run it with the CLI

```bash
kirha tools run gdelt_getFacilityContext \
  --input '{
    "facilityId": "<facilityId>"
  }'
```

`--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": "gdelt_getFacilityContext",
  "input": {
    "facilityId": "<facilityId>"
  }
}'
```

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,
      "maximum": 30,
      "minimum": 1,
      "type": "number"
    },
    "facilityId": {
      "description": "s_... or f_..., from searchFacilities",
      "type": "string"
    },
    "limit": {
      "default": 10,
      "maximum": 20,
      "minimum": 1,
      "type": "number"
    }
  },
  "required": [
    "facilityId"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "country": {
      "type": "string"
    },
    "coveredEntities": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "ownershipPct": {
            "type": "number"
          },
          "via": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "eventIds": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "facilityName": {
      "type": "string"
    },
    "ownerEntityId": {
      "type": "string"
    },
    "ownerEvents": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "actors": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "entityId": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "articleCount": {
            "type": "number"
          },
          "category": {
            "type": "string"
          },
          "eventDate": {
            "type": "string"
          },
          "fatalities": {
            "type": "number"
          },
          "goldsteinScale": {
            "description": "-10 conflict to +10 cooperation",
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "significance": {
            "type": "number"
          },
          "storyIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "subcategory": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "actors",
          "storyIds"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "ownerName": {
      "type": "string"
    },
    "ownerStories": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "articleCount": {
            "type": "number"
          },
          "category": {
            "type": "string"
          },
          "entities": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "entityId": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "entityId"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "eventIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "fatalities": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "outletCount": {
            "type": "number"
          },
          "significance": {
            "type": "number"
          },
          "storyDate": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "topArticleUrl": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "entities",
          "eventIds"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "storyIds": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "coveredEntities",
    "ownerEvents",
    "ownerStories",
    "eventIds",
    "storyIds"
  ],
  "type": "object"
}
```

## Related tools

Other GDELT tools that this tool refers to, or that refer to it.

- [`searchFacilities`](https://kirha.com/providers/gdelt/searchFacilities.md)

-----

[All GDELT tools](https://kirha.com/providers/gdelt.md) · [< Back to tools list](https://kirha.com/tools.md)