Library of Congress Search Scraper avatar

Library of Congress Search Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Library of Congress Search Scraper

Library of Congress Search Scraper

Searches the Library of Congress digital collections (loc.gov) - millions of digitized books, photos, maps, manuscripts. Free, no API key.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Share

Search and retrieve items from the Library of Congress digital collections (loc.gov) — millions of digitized books, photographs, maps, manuscripts, audio recordings, and more. Free, no API key required.

What does this actor do?

This actor lets you:

  • Search across all LOC digital collections by keyword with optional format and date filters.
  • Browse a specific collection (maps, photos, manuscripts, books, newspapers, etc.).
  • Fetch specific items by their LOC item IDs for detailed metadata.

Data Source

All data is retrieved from the Library of Congress public JSON API:

  • Search API: https://www.loc.gov/search/?q={query}&fo=json
  • Collection API: https://www.loc.gov/collections/{collection}/?fo=json
  • Item API: https://www.loc.gov/item/{id}/?fo=json

All endpoints are freely accessible without authentication.

Input

FieldTypeDescription
modeSelectsearch, browseCollection, or byIds
queryStringSearch keywords (e.g. "american history photographs", "civil war maps")
collectionSelectCollection to browse: maps, photos, manuscripts, books, newspapers, audio, films, etc.
onlineFormatSelectFilter by format: image, audio, video, pdf, online-text, web-page, map
dateFromIntegerFilter from this year (e.g. 1800)
dateToIntegerFilter to this year (e.g. 1950)
itemIdsArraySpecific LOC item IDs (for byIds mode)
maxItemsIntegerMax items to return (default: 50, max: 2000)

Example Inputs

Search for Civil War photographs:

{
"mode": "search",
"query": "civil war photographs",
"onlineFormat": "image",
"dateFrom": 1861,
"dateTo": 1865,
"maxItems": 50
}

Browse the maps collection:

{
"mode": "browseCollection",
"collection": "maps",
"dateFrom": 1800,
"dateTo": 1900,
"maxItems": 100
}

Fetch specific items by ID:

{
"mode": "byIds",
"itemIds": ["2002719523", "2017769894"],
"maxItems": 10
}

Output

Each item in the dataset contains:

FieldDescription
idLOC item identifier
urlDirect URL to the item page
titleItem title
descriptionDescription or summary
subjectSubject terms (up to 10)
creatorPrimary creator or author
contributorAdditional contributors (up to 5)
dateCreation or publication date
languageLanguage code(s)
typeItem type (map, photograph, book, etc.)
formatFile format(s) (up to 5)
rightsRights and access information
image_urlThumbnail or primary image URL
online_formatsAvailable online formats
collection_nameName of the collection it belongs to
locationGeographic location(s) (up to 3)
coordinatesGeographic coordinates (if available)
scrapedAtISO 8601 timestamp of when data was scraped

Example Output

{
"id": "2002719523",
"url": "https://www.loc.gov/item/2002719523/",
"title": "Map of Washington DC, 1861",
"description": "Detailed topographical map of the nation's capital during the Civil War",
"subject": ["maps", "Washington DC", "Civil War", "1861"],
"creator": "U.S. Army Corps of Engineers",
"date": "1861",
"language": ["eng"],
"type": "map",
"format": ["image/jpeg"],
"rights": "Public Domain",
"image_url": "https://tile.loc.gov/image-services/iiif/map.jpg",
"online_formats": ["image"],
"collection_name": "Maps Collection",
"location": ["Washington DC"],
"coordinates": "38.89511,-77.03637",
"scrapedAt": "2026-01-15T10:30:00+00:00"
}

Frequently Asked Questions

Is this free to use? Yes. The Library of Congress provides a completely free JSON API with no authentication required.

What collections can I browse? Maps, Photos, Manuscripts, Books, Notated Music, Newspapers, Audio Recordings, Films & Videos, Legislation, Prints & Photographs, American Memory, and the general LOC Collection.

How many items can I retrieve? Up to 2,000 items per run using the maxItems parameter.

Can I filter by date? Yes — use dateFrom and dateTo with year values (e.g. 1800, 1950).

Can I filter by format? Yes — use the onlineFormat filter to narrow to images, audio, video, PDFs, web pages, or maps.

What are item IDs? Every LOC item has a unique identifier visible in its URL (e.g. loc.gov/item/2002719523/). Use these IDs in byIds mode to retrieve specific items.

Does this work for newspaper searches? Yes — browse the newspapers collection or search with relevant keywords. For full newspaper content, consider using the Chronicling America API.

Use Cases

  • Digital humanities research on LOC collections
  • Building photo/map databases from historical records
  • Tracking legislative documents and bill records
  • Academic research using primary source materials
  • Finding digitized manuscripts and rare books
  • Geographic research using historical maps with coordinates
  • Building educational datasets from public domain materials