Skip to Main Content

API FOR DEVELOPERS. QUICK START GUIDE

Operational Data Storage (ODS) for Obtaining FOSS data using Web Services (WS)

Currently, FOSS data from the Landings, Foreign Trade, US Coast Guard (USCG) Vessels and the Alaska Fisheries Science Center (AFSC) groundfish survey pages are available for download in Java Script Object Notation (JSON) format. Web Services (WS) can be used in the following automated downloads:

Landings data API.
US Trade in Fishery Products API.
Vessel data API.
AFSC Survey data API.

Additional FOSS data such as the current Taxonomic Serial Number (TSN) for each species, and the history of any changes to TSN, are available. See the whole list of available data in the following application:
Metadata catalog.

Pagination is controlled by two URL parameters: offset and limit. The limit option defines the number of rows returned from a query and defaults to 1,000 records per request. Offset omits a specified number of rows before the beginning of the
result set. Using both limit and offset skips rows as well as limit the rows returned. When combined with an aggregation via a group; limit is applied after the aggregation. Users can adjust offset and limit parameters to fit their requirements.

By default, data are unfiltered and loaded 25 items per page.

The Offset parameter indicates JSON and starts with 1000 items and the page will have 100 items. For example:
https://apps-st.fisheries.noaa.gov/ods/foss/landings/?offset=0&limit=100


The Data can be filtered in many ways.

1. Filter by Year: Show all the data greater than the year 2010,
https://apps-st.fisheries.noaa.gov/ods/foss/trade_data/?q={"year":{"$gt": 2010}}

2. Filter by Species name: Show all the data where the product name contains POLLOCK. Please note that here the word POLLOCK is case sensitive.
https://apps-st.fisheries.noaa.gov/ods/foss/trade_data/?q={"name":{"$like":"%25POLLOCK%25"}}
The notation for finding a string is to use % around it. Since % is a reserved character in a URL, you have to replace % with %25

3. Combination of year and name filters: Show all the data where years > 2010 and the product name contains POLLOCK
https://apps-st.fisheries.noaa.gov/ods/foss/trade_data/?q={"year":{"$gt": 2010},"name":{"$like":"%25POLLOCK%25"}}

4. Combination of year, country, month: Show all the data where year=1989, country name is CANADA and month is not equal to 12
https://apps-st.fisheries.noaa.gov/ods/foss/trade_data/?q={"year":"1989","cntry_name": "CANADA","month":{"$ne": "12"}}

In addition, users can also refer to this Oracle Documentation for other syntaxes to filter data differently by searching for Oracle REST Data Services 22.3 documentation.