# Get worldwide stats for a time period with gear type filter (/docs/examples/stats/stats-example2)



**Query parameters**

| Parameter     | Value                                           | Description                         |
| ------------- | ----------------------------------------------- | ----------------------------------- |
| `datasets[0]` | `public-global-fishing-effort:latest`           | AIS apparent fishing effort dataset |
| `fields`      | `FLAGS,VESSEL-IDS,ACTIVITY-HOURS`               | Fields to include in the response   |
| `date-range`  | `2022-10-22,2023-01-22`                         | Filter to this time period          |
| `filters[0]`  | `geartype in ("tuna_purse_seines","driftnets")` | Filter by gear type                 |

**Request**

<Tabs items="['cURL', 'JavaScript']">
  <Tab value="cURL">
    ```shell
    # Make sure to replace [TOKEN] with your API Access Token.
    curl --location -g --request GET 'https://gateway.api.globalfishingwatch.org/v3/4wings/stats/?datasets[0]=public-global-fishing-effort:latest&fields=FLAGS,VESSEL-IDS,ACTIVITY-HOURS&date-range=2022-10-22,2023-01-22&filters[0]=geartype%20in%20(%22tuna_purse_seines%22,%22driftnets%22)' \
      -H 'Authorization: Bearer {access-token}'
    ```
  </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/4wings/stats/?datasets[0]=public-global-fishing-effort:latest&fields=FLAGS,VESSEL-IDS,ACTIVITY-HOURS&date-range=2022-10-22,2023-01-22&filters[0]=geartype%20in%20(%22tuna_purse_seines%22,%22driftnets%22)',
      { headers: { Authorization: 'Bearer {access-token}' } }
    )
    const data = await res.json()
    ```
  </Tab>
</Tabs>

**Response**

```json
[
  {
    "activityHours": 90972.49606000002,
    "flags": 62,
    "maxLat": null,
    "maxLon": null,
    "minLat": null,
    "minLon": null,
    "vesselIds": 592
  }
]
```
