# Internet Archive API
> The Internet Archive as an API — the non-profit digital library of over 40 million freely accessible items: books and texts, audio and live-music concerts, films and video, software, images and archived web pages. Search the entire archive by keyword with full Lucene field syntax (by creator, title, subject, collection and more), filter by media type (texts, audio, movies, image, software, web, live concerts) and sort by downloads, date or trending popularity, getting each item's identifier, title, creator, media type, year, download count and collections; read an item's full metadata including its description, creators, subjects, language, collections, publisher, license, dates and total size; list an item's downloadable files with their format, size, length and a direct download URL; and look up the closest Wayback Machine snapshot of any web page — the archived flag, the snapshot date and HTTP status, and the web.archive.org link, optionally near a target timestamp. Ideal for research, digital preservation, media discovery, dataset building, link-rot recovery and apps that surface public-domain and openly-licensed culture. Data from the Internet Archive (archive.org).

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/archive-api/..."
```

## Pricing
- **Free** (Free) — 600 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 22,000 calls/Mo, 6 req/s
- **Pro** ($23/Mo) — 98,000 calls/Mo, 15 req/s
- **Mega** ($64/Mo) — 420,000 calls/Mo, 40 req/s

## Endpoints

### Library

#### `GET /v1/files` — An item's downloadable files

**Parameters:**
- `id` (query, required, string) — Internet Archive identifier Example: `TheAdventuresOfTomSawyer`
- `limit` (query, optional, string) — Max files (1-200)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/archive-api/v1/files?id=TheAdventuresOfTomSawyer"
```

**Response:**
```json
{
    "data": {
        "item": "TheAdventuresOfTomSawyer",
        "count": 4,
        "files": [
            {
                "name": "ItunesLibrary.itl",
                "format": "Unknown",
                "length": null,
                "source": "original",
                "download": "https://archive.org/download/TheAdventuresOfTomSawyer/ItunesLibrary.itl",
                "size_bytes": 118602
            },
            {
                "name": "TheAdventuresOfTomSawyer_archive.torrent",
                "format": "Archive BitTorrent",
                "length": null,
                "source": "metadata",
                "download": "https://archive.org/download/TheAdventuresOfTomSawyer/TheAdventuresOfTomSawyer_archive.torrent",
                "size_bytes": 1567
            },
            {
                "name": "TheAdventuresOfTomSawyer_files.xml",
                "format": "Metadata",
                "length": null,
                "source": "metadata",
                "download": "https://archive.org/download/TheAdventuresOfTomSawyer/TheAdventuresOfTomSawyer_files.xml",
                "size_bytes": null
            },
            {
                "name": "TheAdventuresOfTomSawyer_meta.xml",
                "format": "Metadata",
                "length": null,
                "source": "metadata",
                "download": "https://archive.org/download/TheAdventuresOfTomSawyer/TheAdventuresOfTomSawyer_meta.xml",
                "size_bytes": 832
            }

…(truncated, see openapi.json for full schema)
```

#### `GET /v1/item` — An item's full metadata

**Parameters:**
- `id` (query, required, string) — Internet Archive identifier Example: `TheAdventuresOfTomSawyer`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/archive-api/v1/item?id=TheAdventuresOfTomSawyer"
```

**Response:**
```json
{
    "data": {
        "item": {
            "url": "https://archive.org/details/TheAdventuresOfTomSawyer",
            "date": null,
            "year": null,
            "added": "2011-10-17 01:49:12",
            "title": "The Adventures of Tom Sawyer",
            "creator": [
                "Mark Twain"
            ],
            "language": [],
            "subjects": [
                "For school; Mark Twain"
            ],
            "downloads": null,
            "mediatype": "audio",
            "published": "2011-10-17 01:52:55",
            "publisher": null,
            "file_count": 4,
            "identifier": "TheAdventuresOfTomSawyer",
            "collections": [
                "opensource_audio",
                "community"
            ],
            "description": "book",
            "license_url": null,
            "num_reviews": null,
            "total_bytes": 121001
        }
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:25.226Z",
        "request_id": "6299cb84-bed6-4216-8830-0313b10010a5"
    },
    "status": "ok",
    "message": "Item retrieved",
    "success": true
}
```

#### `GET /v1/search` — Search the archive

**Parameters:**
- `q` (query, required, string) — Search text; Lucene field syntax allowed Example: `jazz`
- `mediatype` (query, optional, string) — texts|audio|movies|image|software|web|etree
- `sort` (query, optional, string) — downloads|newest|oldest|trending|relevance
- `page` (query, optional, string) — Page (1-based)
- `limit` (query, optional, string) — Max results (1-100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/archive-api/v1/search?q=jazz"
```

**Response:**
```json
{
    "data": {
        "page": 1,
        "count": 20,
        "query": "jazz",
        "total": 219637,
        "results": [
            {
                "url": "https://archive.org/details/opensource_audio",
                "year": null,
                "title": "Community Audio",
                "creator": "Community Audio",
                "downloads": 7263604381,
                "mediatype": "collection",
                "identifier": "opensource_audio",
                "collections": [
                    "audio",
                    "community",
                    "fav--123movie-watch-toy-story-4-online-free-full-hd",
                    "fav-0",
                    "fav-0910dlc"
                ]
            },
            {
                "url": "https://archive.org/details/78rpm_bostonpubliclibrary",
                "year": null,
                "title": "Boston Public Library 78rpm Collection",
                "creator": null,
                "downloads": 18679459,
                "mediatype": "collection",
                "identifier": "78rpm_bostonpubliclibrary",
                "collections": [
                    "78rpm",
                    "audio_music",
                    "audio",
                    "fav-0",
                    "fav-888punk"
                ]
            },
            {
                "url": "https://archive.org/details/clinicalarchives",
                "year": null,
                "title": "Clinical Archives",
                "cre
…(truncated, see openapi.json for full schema)
```

### Wayback

#### `GET /v1/wayback` — Closest Wayback Machine snapshot

**Parameters:**
- `url` (query, required, string) — Web address, e.g. example.com Example: `example.com`
- `timestamp` (query, optional, string) — Target date, 8-14 digits, e.g. 20100101

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/archive-api/v1/wayback?url=example.com"
```

**Response:**
```json
{
    "data": {
        "url": "example.com",
        "archived": true,
        "snapshot": {
            "url": "http://web.archive.org/web/20260601030900/https://example.com/",
            "date": "2026-06-01",
            "status": "200",
            "timestamp": "20260601030900"
        },
        "query_timestamp": null
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:26.994Z",
        "request_id": "aa8cb120-b6b6-4719-8d43-e73c6208e48d"
    },
    "status": "ok",
    "message": "Wayback snapshot retrieved",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Usage notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/archive-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "The Internet Archive — a non-profit digital library of 40 million+ items. /v1/search?q=jazz = search everything (filter mediatype=texts|audio|movies|image|software|web|etree (live concerts); sort=downloads|newest|oldest|trending|relevance) returning each item's identifier, title, creator, mediatype, year, download count and collections; supports Lucene field syntax, e.g. q=creator:(Mark Twain) AND mediatype:texts. /v1/item?id=TheAdventuresOfTomSawyer = an item's full metadata (title, creators, description, subjects, language, collections, publisher, license, date, downloads, file count & total size). /v1/files?id=... = the item's downloadable files with format, size and a direct download URL. /v1/wayback?url=example.com (optional timestamp=20100101) = the closest Wayback Machine snapshot of a web page (archived flag, snapshot date, HTTP status and the web.archive.org URL). Identifiers come from search results. Data from the Internet Archive. For modern book catalogue data see the Books API (Open Library).",
        "source": "Internet Archive (archive.org)",
        "endpoints": [
            "/v1/search",
            "/v1/item",
            "/v1/files",
            "/v1/wayback",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:27.068Z",
        "request_id": "c3398619-d86d-45a7-a49a-369247610e70"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/archive-api
OpenAPI spec: https://www.oanor.com/api/archive-api/openapi.json
