# Library of Congress Scraper - Photos & Collections (`logiover/loc-digital-collections-scraper`) Actor

Scrape Library of Congress digital collections in bulk. Extract item title, date, description, subjects, image URL, format, collection, language and access status from any search to CSV/JSON. No API key.

- **URL**: https://apify.com/logiover/loc-digital-collections-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Library of Congress Scraper - Photos & Collections

![Apify Actor](https://img.shields.io/badge/Apify-Actor-00A67E?logo=apify\&logoColor=white) ![No API key](https://img.shields.io/badge/No%20API%20key-required-2ea44f) ![Pay per result](https://img.shields.io/badge/Pricing-Pay%20per%20result-1C7ED6) ![Export](https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel-F59E0B)

**Scrape Library of Congress digital collections in bulk. Extract item title, date, description, subjects, image URL, format, collection, language and access status from any search to CSV/JSON. No API key.**

***

### What does the Library of Congress Scraper do?

This Actor turns any Library of Congress search into a structured dataset. You give it photos or another section, it walks the result pages one after another, and it writes one clean row per item into your dataset — ready to export as JSON, CSV or Excel, or to pull straight from the Apify API.

The Library of Congress exposes its catalogue as JSON by appending `fo=json` to any search URL, and the Actor uses that. Image URLs come back on the record, so an export is a downloadable manifest rather than a list of references. Pagination is followed automatically until it runs out of results, hits your page limit or hits your **Max items** cap, whichever comes first. Every row is de-duplicated across the whole run, so you are never billed twice for the same item.

There is **no API key, no login and no browser** involved. That keeps runs fast and cheap, and it means you can schedule the Actor without worrying about credentials expiring.

### Who is it for?

- **AI and ML teams** sourcing historical imagery with provenance.
- **Publishers and documentary researchers** finding archival material.
- **Educators** assembling primary-source collections.
- **Digital humanities researchers** analysing an archive at scale.
- **Developers** building discovery tools over public archives.

### Use cases

- Export every photograph matching a topic with its image URL.
- Analyse how an archive's holdings are distributed by date.
- Filter to unrestricted items for reuse.
- Build a labelled historical image dataset.
- Survey a named collection end to end.

### Why use this Library of Congress Scraper?

- 🔑 **Keyless** — no account, no API token, no cookies to paste.
- 📦 **16 fields per item** — everything the result page exposes, already typed.
- 📄 **Real pagination** — it walks page after page instead of returning the first screen.
- 🎯 **Precise caps** — **Max items** stops the run exactly where you want it, so the bill is predictable.
- 📊 **Export anywhere** — JSON, CSV, Excel or HTML, plus the Apify API and integrations.
- 💸 **Pay per result** — you pay for rows you actually receive, with no platform fees to calculate.

### What data can you extract?

Every run produces one row per item, with these fields:

| Field | Type | Description |
|-------|------|-------------|
| `itemId` | string | Library of Congress item URL used as the identifier |
| `title` | string | Item title |
| `itemUrl` | string | Catalogue page for the item |
| `date` | string | Date as published by the catalogue |
| `description` | string | Description text, separated by a pipe when multiple |
| `imageUrl` | string | Image URL supplied by the catalogue |
| `originalFormat` | string | Original format, e.g. photo, print, drawing |
| `onlineFormat` | string | Online format, e.g. image or pdf |
| `subjects` | string | Subjects, separated by a pipe |
| `language` | string | Languages, separated by a pipe |
| `partOf` | string | Collections the item belongs to, separated by a pipe |
| `isDigitized` | boolean | Whether the item is digitised |
| `accessRestricted` | boolean | Whether access is restricted |
| `query` | string | Search term this row came from |
| `page` | number | Result page the item appeared on |
| `scrapedAt` | string | ISO timestamp of extraction |

#### Output example

```json
{
  "accessRestricted": true,
  "date": "1895-01-01",
  "description": "1 photographic print. | Menai Bridge Village, Wales.",
  "imageUrl": "https://tile.loc.gov/storage-services/service/pnp/cph/3c00000/3c01000/3c01200/3c01204_150px.jpg",
  "isDigitized": true,
  "itemId": "http://www.loc.gov/item/90710744/",
  "itemUrl": "https://www.loc.gov/item/90710744/",
  "language": "english",
  "onlineFormat": "image",
  "originalFormat": "photo, print, drawing",
  "page": 1,
  "partOf": "prints and photographs division | prints & photographs online catalog (library of congress) | miscellaneous items in high demand | lot 4491 | catalog",
  "query": "bridge",
  "scrapedAt": "2026-09-17T08:45:06.083Z",
  "subjects": "menai bridge | photographic prints | bridges | wales",
  "title": "Britannia Bridge"
}
```

### How to use

#### Option A — photos

```json
{
  "maxItems": 1000,
  "maxPagesPerSearch": 10,
  "searchTerms": [
    "bridge"
  ],
  "section": "photos"
}
```

1. Open the Actor and fill in the photos field.
2. Set **Max pages per search** and **Max items** to bound the run.
3. Click **Start**, then export from the **Output** tab.

#### Option B — another section

```json
{
  "maxItems": 500,
  "maxPagesPerSearch": 10,
  "searchTerms": [
    "railroad"
  ],
  "section": "maps"
}
```

Paste one or more Library of Congress URLs into **Start URLs** and the Actor paginates each of them independently.

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchTerms` | array | `–` | What to search the archive for, e. |
| `section` | string | `photos` | Which part of the archive to search. |
| `maxPagesPerSearch` | integer | `3` | How many result pages to walk for each search. |
| `maxItems` | integer | `100` | Stop after this many items. |
| `maxConcurrency` | integer | `2` | Parallel requests. |
| `proxyConfiguration` | object | `{"useApifyProxy": true}` | Proxy used to fetch pages. |

### Tips for best results

- Pick the section that matches your need: photos, maps, newspapers, audio or the whole catalogue.
- The API returns up to 100 items per page, so exports need few calls.
- `accessRestricted` false is the quickest filter when you intend to reuse material.
- `imageUrl` is supplied at catalogue resolution; open the item page for the highest-resolution master.
- `partOf` names the collection, which is the most useful way to slice the archive.
- Dates in this archive are historical and often approximate — treat them as labels, not timestamps.
- `subjects` is pipe-separated so the column survives a CSV round trip.
- Always keep the item URL with any image you republish, for attribution.
- Keep concurrency low — this is a public institution's free service.
- Pair with the Art Institute and Cleveland Museum scrapers for a wider open-collection set.

### Integrations

Send results straight into the tools you already use: **Google Sheets**, **Slack**, **Zapier**, **Make**, **Airtable** or any **Webhook**. You can also **schedule** the Actor to run hourly, daily or weekly and have each run append to the same dataset, which is how you build a price or availability history rather than a one-off snapshot.

### API usage

Run the Actor and collect results from any language. Replace `<YOUR_TOKEN>` with your Apify API token.

**cURL**

```bash
curl -X POST "https://api.apify.com/v2/acts/logiover~loc-digital-collections-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"maxItems": 1000, "maxPagesPerSearch": 10, "searchTerms": ["bridge"], "section": "photos"}'
```

**Node.js**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_TOKEN>' });
const run = await client.actor('logiover/loc-digital-collections-scraper').call({"maxItems": 1000, "maxPagesPerSearch": 10, "searchTerms": ["bridge"], "section": "photos"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient('<YOUR_TOKEN>')
run = client.actor('logiover/loc-digital-collections-scraper').call(run_input={"maxItems": 1000, "maxPagesPerSearch": 10, "searchTerms": ["bridge"], "section": "photos"})
for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

### Use with AI agents (MCP)

This Actor is available through the Apify MCP server, so an AI agent can call it as a tool. Point your agent at `https://mcp.apify.com` and it can run the Library of Congress Scraper on demand — for example: *"Pull the first 500 items from Library of Congress and summarise the price distribution."* The agent receives the same structured rows you would get from the UI.

### FAQ

#### Do I need a Library of Congress account or API key?

No. The Actor reads publicly available pages only. There is nothing to authenticate and no credentials to rotate.

#### How many items can I get in one run?

As many as the search exposes. Raise **Max pages per search** and **Max items** together; the run stops at whichever limit it reaches first.

#### Why did I get fewer rows than I asked for?

The search ran out of items. That is normal for narrow queries — broaden the search or add more searches to one run.

#### Are results de-duplicated?

Yes. Each item is emitted once per run, even when it appears on several pages, so you are never billed twice for the same record.

#### Why are some fields empty?

Library of Congress does not publish every attribute for every item. Empty means the source did not show it, not that extraction failed.

#### What export formats are supported?

JSON, CSV, Excel, HTML and RSS from the **Output** tab, plus the Apify API and any integration you connect.

#### How fast is it?

It is pure HTTP with no browser, so a page of results typically takes a second or two. Raise **Max concurrency** carefully — the source rate-limits aggressive crawling.

#### Can I schedule it?

Yes. Use the Apify scheduler to run it on any interval and append each run to the same dataset for time-series analysis.

#### Does it work behind a proxy?

It uses Apify Proxy automatically. You can switch groups or supply your own proxies in **Proxy configuration**.

#### How often does the data change?

Library of Congress updates continuously. Re-run whenever you need current data; the Actor always reads the live pages, never a cache.

#### Is the output schema stable?

Yes. Field names and types are fixed, so downstream pipelines will not break between runs.

#### What if the site changes its layout?

Open an issue on the **Issues** tab and it gets fixed. The Actor is actively maintained.

### Is it legal?

This Actor reads only publicly available pages on Library of Congress — the same content any visitor sees without logging in. It does not bypass authentication, does not collect private data and does not attempt to defeat access controls. You are responsible for how you use the output: respect the source's terms of service, applicable copyright, and data-protection law such as GDPR where personal data is involved. Scraping public data is generally lawful in the EU and the US, but the responsibility for the downstream use of that data sits with you.

### Related scrapers

- [Art Institute Scraper](https://apify.com/logiover/artic-artwork-scraper) — Open-access artworks
- [Cleveland Museum Scraper](https://apify.com/logiover/cleveland-art-scraper) — CC0 collection
- [Internet Archive Scraper](https://apify.com/logiover/internet-archive-metadata-scraper) — Archive metadata
- [Openverse Scraper](https://apify.com/logiover/openverse-scraper) — Openly licensed media

# Actor input Schema

## `searchTerms` (type: `array`):

What to search the archive for, e.g. bridge, railroad, portrait.

## `section` (type: `string`):

Which part of the archive to search.

## `maxPagesPerSearch` (type: `integer`):

How many result pages to walk for each search. Set 0 for no limit.

## `maxItems` (type: `integer`):

Stop after this many items. Set 0 for no limit.

## `maxConcurrency` (type: `integer`):

Parallel requests. Lower this if the site rate-limits you.

## `proxyConfiguration` (type: `object`):

Proxy used to fetch pages. Defaults to Apify Proxy (automatic). You usually do not need to change this.

## Actor input object example

```json
{
  "searchTerms": [
    "bridge"
  ],
  "section": "photos",
  "maxPagesPerSearch": 3,
  "maxItems": 100,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All items extracted in this run.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "bridge"
    ],
    "maxPagesPerSearch": 3,
    "maxItems": 100,
    "maxConcurrency": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/loc-digital-collections-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerms": ["bridge"],
    "maxPagesPerSearch": 3,
    "maxItems": 100,
    "maxConcurrency": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/loc-digital-collections-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "bridge"
  ],
  "maxPagesPerSearch": 3,
  "maxItems": 100,
  "maxConcurrency": 2
}' |
apify call logiover/loc-digital-collections-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,logiover/loc-digital-collections-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/740WxP4gA04Txtzmi/builds/yU5eB8xecxXd7BCL7/openapi.json
