Skip to main content

Global Fishing Watch API Python Client

ci codecov pypi - version pypi - python versions license DOI

pre-commit action pre-commit mypy ruff code style: black conventional commits

Python package for accessing data from Global Fishing Watch (GFW) APIs.

Important: The gfw-api-python-client version 1 directly corresponds to Global Fishing Watch API version 3. As of April 30th, 2024, API version 3 is the standard. For the most recent API updates, refer to our API release notes.

Introduction

The gfw-api-python-client simplifies access to Global Fishing Watch (GFW) data through our APIs. It offers straightforward functions for retrieving GFW data. For R users, we also provide the gfwr package; learn more here

The Global Fishing Watch Python package currently works with the following APIs:

  • Map Visualization (4Wings API): Access AIS apparent fishing effort, AIS vessel presence, and SAR vessel detections between 2017 to ~5 days ago.

  • Vessels API: Search and retrieve vessel identity based on AIS self-reported data, combined with authorization and registry data from regional and national registries.

  • Events API: Retrieve vessel activity events such as encounters, loitering, port visits, fishing events, and AIS off (aka GAPs).

  • Insights API: Access vessel insights that combine AIS activity, vessel identity, and public authorizations. Designed to support risk-based decision-making, operational planning, and due diligence—particularly for assessing risks of IUU (Illegal, Unreported, or Unregulated) fishing.

  • Datasets API: Retrieve fixed offshore infrastructure detections (e.g., oil platforms, wind farms) from Sentinel-1 and Sentinel-2 satellite imagery, from 2017 up to 3 months ago, classified using deep learning.

  • Bulk Download API: Efficiently access and download large-scale datasets to integrate with big data platforms and tools used by data engineers and researchers. Unlike our other APIs (Map Visualization (4Wings API), Datasets API etc.), these datasets may include some noisy that are not filtered out.

  • References API: Access metadata for EEZs, MPAs, and RFMOs to use in Events API and Map Visualization (4Wings API) requests and analyses.

Note: See the Datasets, Data Caveats, and Terms of Use pages in the GFW API documentation for details on GFW data, API licenses, and rate limits.

Requirements

Installation

You can install gfw-api-python-client using pip:

pip install gfw-api-python-client

For detailed instructions—including how to set up a virtual environment—refer to the Installation Guide in the documentation.

Usage

After installation, you can start using gfw-api-python-client by importing it into your Python code:

import gfwapiclient as gfw

gfw_client = gfw.Client(
    access_token="<PASTE_YOUR_GFW_API_ACCESS_TOKEN_HERE>",
)

For step-by-step instructions and examples, see the Getting Started, Usage Guides, and Workflow Guides in the documentation.

Documentation

The full project documentation is available at globalfishingwatch.github.io/gfw-api-python-client.

To get started with the basics, head over to the Getting Started guide.

For detailed instructions and examples on interacting with the various APIs offered by Global Fishing Watch, explore the Usage Guides, and Workflow Guides sections.

For a complete reference of all available classes, methods, and modules, see the API Reference section.

Contributing

We welcome and appreciate contributions of all kinds to help improve this package!

Before getting started, please take a moment to review the following guides:

  • Contribution Guide – Learn how to propose changes, submit pull requests, and understand our development process.

  • Setup Guide – Get your development environment up and running.

  • Git Workflow – Understand our branching strategy and commit conventions.

If you have questions, ideas, or run into issues, feel free to open an issue or reach out — we’d love to hear from you!

Metadata

Release files for gfw-api-python-client 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gfw-api-python-client 1.4.0
File Size Uploaded
gfw_api_python_client-1.4.0.tar.gz 179.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gfw-api-python-client 1.4.0
File Interpreter ABI Platform
gfw_api_python_client-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 315.0 kB

Release files / gfw_api_python_client-1.4.0.tar.gz

Download URL gfw_api_python_client-1.4.0.tar.gz
Size 179.4 kB
Tags Source
SHA-256 checksum
How to use checksums
38fd67fe4751972acf18e048942cb3cc00971f7ee72e4d5e1d14b3fd5fbae96c
BLAKE2b-256 checksum
How to use checksums
4850a82defa806cd3d8f98c9a18d28df0f0f5bbf0d2e71f9a21c9064a2570ca4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / gfw_api_python_client-1.4.0-py3-none-any.whl

Download URL gfw_api_python_client-1.4.0-py3-none-any.whl
Size 135.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6f446e3f371e47be9cb567ac502595db03ce97545f3a160ad59dce4ebc8386c
BLAKE2b-256 checksum
How to use checksums
2dd50d457489605a9a374619df8b29eb5234aca4c8d080809dc5e4e7c186d6c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page