# Get insights for a vessel related to AIS off events (/docs/examples/insights/insights-example2)



**Request body**

| Field                  | Value                                   | Description                                   |
| ---------------------- | --------------------------------------- | --------------------------------------------- |
| `includes`             | `["GAP"]`                               | Insight type to include: AIS off events       |
| `confidences`          | `[]`                                    | Confidence levels to filter AIS off events by |
| `startDate`            | `2022-07-11`                            | Start of the period to analyze                |
| `endDate`              | `2023-07-11`                            | End of the period to analyze                  |
| `vessels[0].datasetId` | `public-global-vessel-identity:latest`  | Vessel identity dataset                       |
| `vessels[0].vesselId`  | `2339c52c3-3a84-1603-f968-d8890f23e1ed` | Vessel id to get insights for                 |

**Request**

<Tabs items="['cURL', 'Python', 'JavaScript']">
  <Tab value="cURL">
    ```shell
    # Make sure to replace [TOKEN] with your API Access Token.
    curl --location --request POST 'https://gateway.api.globalfishingwatch.org/v3/insights/vessels' \
    --header 'Authorization: Bearer [TOKEN]' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "includes": [ "GAP"],
        "confidences": [],
        "startDate": "2022-07-11",
        "endDate": "2023-07-11",
        "vessels": [
        {"datasetId":"public-global-vessel-identity:latest","vesselId":"2339c52c3-3a84-1603-f968-d8890f23e1ed"}
        ]
    }'
    ```
  </Tab>

  <Tab value="Python">
    ```python
    result = await gfw_client.insights.get_vessel_insights(
        includes=["GAP"],
        start_date="2022-07-11",
        end_date="2023-07-11",
        vessels=[
            {
                "datasetId": "public-global-vessel-identity:latest",
                "vesselId": "2339c52c3-3a84-1603-f968-d8890f23e1ed",
            }
        ],
    )
    ```
  </Tab>

  <Tab value="JavaScript">
    ```js
    // Make sure to replace [TOKEN] with your API Access Token.
    const res = await fetch('https://gateway.api.globalfishingwatch.org/v3/insights/vessels', {
      method: 'POST',
      headers: {
        Authorization: 'Bearer [TOKEN]',
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        includes: ['GAP'],
        confidences: [],
        startDate: '2022-07-11',
        endDate: '2023-07-11',
        vessels: [
          {
            datasetId: 'public-global-vessel-identity:latest',
            vesselId: '2339c52c3-3a84-1603-f968-d8890f23e1ed',
          },
        ],
      }),
    })
    const data = await res.json()
    ```
  </Tab>
</Tabs>

**Response**

```json
{
  "period": {
    "startDate": "2022-07-11",
    "endDate": "2023-07-11"
  },
  "gap": {
    "datasets": ["public-global-gaps-events:v3.0"],
    "historicalCounters": {
      "events": 1,
      "eventsGapOff": 1
    },
    "periodSelectedCounters": {
      "events": 1,
      "eventsGapOff": 1
    },
    "aisOff": ["9ce75aa2a483a06f41155132b83dc744"]
  }
}
```
