Dynamic Examples
Dynamic examples of using the JSON/YAML API for loc.gov
Dynamic Examples
This page can be used to see what loc.gov API queries and their responses will look like in real time. The examples are pre-populated with common search terms, but feel free to try other search terms that interest you.
If you are confused by what you see, use the Understanding API Responses page as a guide to the structure and meaning of the API response.
/search/
Parameter
Description
Output format
q
The search term
URL:
/collections/{name of collection}/
Parameter
Description
Output format
name of collection
The title of the LOC collection in slug form
URL:
/{format}/
Parameter
Description
Output format
format
returns items which have a specified original format
URL:
/item/{id}/
Parameter
Description
Output format
id
the identifier for an item
URL:
/resource/{id}/
Parameter
Description
Output format
id
the identifier for an item
URL: