Over the years, users have requested bulk access to FRASER’s materials, and we’re pleased to announce that this feature is now available with FRASER’s new RESTful API. With the API, users can directly access text and PDF files, search across records, retrieve records related to a particular author or subject, access themes and timelines, and much more. For the specifics, see the API documentation.
Getting Started
- Get your API key
- Explore the resources
- Retrieve a resource
Basic API Functions
Search and Discovery
Metadata records describe FRASER content and can be used for navigating our vast collections. Use the API to search across records using simple or complex queries.
Retrieving Metadata
It is also possible to get a specific record or set of records by the title, author, subject, theme, and/or timeline endpoints. By default, metadata records return in JSON, but you can also request XML.
Retrieving PDFs and Full Text
Rich in text, FRASER collections aid research of economic history and the Federal Reserve System. With the API, users can quickly access PDF and plain text documents without navigating through the user interface[1]:
- Request an item record(s)
- Extract URL(s) from response
- Request the file URL[2]
Request Endpoint
https://fraser.stlouisfed.org/api/item/{id}
Response Body
How Will You Use the FRASER API?
The FRASER team has learned that users have started using FRASER documents for new modes of research including text mining, topic modeling, document clustering, sentiment analysis, and more.
Text mining enables researchers to extract textual information from a large set of documents to explore trends using computational methods. With topic modeling,[3] users can reveal topical trends across a subset of FRASER collections, such as frequently used words in the Paul A. Volcker correspondence or content related to women in the economy. Similar to topic modeling, document clustering uses topics to group related documents.[4]Sentiment analysis steps beyond identifying explicit information to “[analyzing] text and [providing] a positive, negative, or neutral sentiment score based on the wording used.”[5]
The FRASER team hopes that the beta release of the FRASER API will open the doors to new uses of our collections. Now that you’re equipped with this resource, how will you explore FRASER?
Call for Beta Users
Just as FRASER offers information for learning, we love to learn from our users! With the beta launch of our RESTful API, we invite you to share your use cases, ideas for improvement, and feedback. Whether a formally structured essay or Monday morning ramblings, we want to hear from you. We’re interested in what you’re working on, what you want to do, or what you hope to see accomplished. Your feedback will inform the future of the API and may inspire other users.
Please share your thoughts with us in our survey. Contact the FRASER team with any questions or comments.
[1] FRASER uses optical character recognition (OCR) to extract textual information from digitized documents. The extraction process isn’t perfect, however, and inaccurate textual recognition is possible, especially for historic documents that are poor quality. If you find a document difficult to read, machines will experience even more challenges reading the text. For more information, see “Technical Information” on the About FRASER page.
[2] Tools such as Python can be used for automating API calls and extracting and transforming metadata from the API response.
[3] For additional resources on topic modeling in economics, see the following: Angela Ambrosino, Mario Cedrini, John B. Davis, Stefano Fiori, Marco Guerzoni, and Massimiliano Nuccio. “What Topic Modeling Could Reveal About the Evolution of Economics.” Journal of Economic Methodology, 2018, 25(4): 329-348. Lino Wehreheim. “Economic History Goes Digital: Topic Modeling the Journal of Economic History.” Cliometrica, 2019, 13: 83-125.
[4] For more on this, see Larisa Adamyan, Kirill Efimov, Cathy Y. Chen, and Wolfgang K. Härdle. “Adaptive Weights Clustering of Research Papers.” Digit Finance, 2019, 2: 169-187.
[5] For an exploratory use of sentiment analysis using FRASER collections, see Matthew Krc. “Dismal Facts: ‘Reading’ the Economic Report of the President at a Glance Using Sentiment Analysis.” Inside FRASER Blog.
© 2021, Federal Reserve Bank of St. Louis. The views expressed are those of the author(s) and do not necessarily reflect official positions of the Federal Reserve Bank of St. Louis or the Federal Reserve System.