sbJSONΒΆ
The ScienceBase catalog uses a custom JSON schema known as sbJSON to document and manage catalog items. This schema includes metadata on the originators and stewards of the archive, as well as resources for programmatic connections. You can use the sbjson command to return sbJSON info for matching assessments in the PWFDF collection. Under the hood, the assessments, download, and metadata commands all work by calling sbjson, and then using the output sbJSON objects to implement their functionality.
Tip
If you are interested in the scientific metadata associated with an assessment, we recommend using the metadata command over sbjson, as the sbJSON is more focused on the organization of data within the overall ScienceBase catalog.
You can call the command with any of the search filters discussed in the search guide and low level search sections. For example:
pwfdf sbjson --extent California --start-date 2025
You can also use the --fields option to request specific fields in the sbJSON response:
pwfdf sbjson --fields id title summary
The supported fields are documented in the sbJSON item model.
Tip
You can save the output JSON to file using standard shell redirects. For example:
pwfdf sbjson --extent California > my-file.json
The ScienceBase catalog uses a custom JSON schema known as sbJSON to document and manage catalog items. This schema includes metadata on the originators and stewards of the archive, as well as resources for programmatic connections. You can use the sbjson command to search the collection and return sbJSON info for matching assessments. The command returns a list of dicts, where each dict holds the sbJSON info for a particular asssessment. Under the hood, the assessments, download, and metadata commands all work by calling sbjson, and then using the output sbJSON objects to implement their functionality.
Tip
If you are interested in the scientific metadata associated with an assessment, we recommend using the metadata command over sbjson, as the sbJSON is more focused on the organization of data within the overall ScienceBase catalog.
You can call the command with any of the search filters discussed in the search guide and low level search sections. For example:
from pwfdf_api import sbjson
info = sbjson(extent="California", start_date=2025)
You can also use the --fields option to request specific fields in the sbJSON response:
info = sbjson(fields=["id", "title", "summary"])
The supported fields are documented in the sbJSON item model.