{
  "id": "internetarchive",
  "name": "Internet Archive",
  "homepage": "https://internetarchive.readthedocs.io/en/stable/",
  "description": "A Python and Command-Line Interface to Archive.org.",
  "executables": [
    "ia"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.config/ia.ini",
      "~/.ia"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Internet Archive",
    "description": "Download items from archive.org and search for items. Upload, metadata edits, deletion and tasks are outside this form.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "download"
        ],
        "label": "Download an item",
        "description": "Download a whole item or selected files from archive.org.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://internetarchive.readthedocs.io/en/stable/cli.html",
            "revision": "2026-10-27",
            "evidence": "$ ia download TripDown1905\n$ ia download TripDown1905 TripDown1905_512kb.mp4 TripDown1905.ogv\n$ ia download TripDown1905 --glob=\"*.mp4\"\n$ ia download TripDown1905 --glob=\"*.mp4\" --exclude \"*512kb*\"\n$ ia download TripDown1905 --format='512Kb MPEG4'\n$ ia download --search 'collection:glasgowschoolofart'\n$ ia download --itemlist itemlist.txt\n"
          }
        ],
        "field": [
          {
            "id": "identifier",
            "label": "Item identifier",
            "type": "string",
            "position": 0,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "files",
            "label": "Specific files",
            "description": "Leave empty to download the whole item.",
            "type": "string",
            "position": 1,
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "glob",
            "label": "Glob pattern",
            "type": "string",
            "option": [
              "--glob"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "exclude",
            "label": "Exclude pattern",
            "description": "Only valid together with a glob pattern.",
            "type": "string",
            "option": [
              "--exclude"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "format",
            "label": "File format",
            "type": "string",
            "option": [
              "--format"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "search",
            "label": "Download search results",
            "type": "string",
            "option": [
              "--search"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "itemlist",
            "label": "Item list file",
            "type": "path",
            "path": {
              "kind": "file",
              "role": "input"
            },
            "option": [
              "--itemlist"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "item",
            "label": "Download a whole item",
            "fields": [
              "identifier"
            ],
            "required": [
              "identifier"
            ]
          },
          {
            "id": "glob_files",
            "label": "Download files by glob",
            "fields": [
              "identifier",
              "glob",
              "exclude"
            ],
            "required": [
              "identifier",
              "glob"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "identifier",
              "files",
              "glob",
              "exclude"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "format",
              "search",
              "itemlist"
            ]
          }
        ]
      },
      {
        "path": [
          "search"
        ],
        "label": "Search items",
        "description": "Search archive.org and print results as JSON.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://internetarchive.readthedocs.io/en/stable/cli.html",
            "revision": "2026-10-27",
            "evidence": "$ ia search 'subject:\"market street\" collection:prelinger'\n$ ia search --parameters=\"page=1&rows=20\" \"dogs\"\n$ ia search 'collection:glasgowschoolofart' --itemlist > itemlist.txt\n"
          }
        ],
        "field": [
          {
            "id": "query",
            "label": "Query",
            "type": "string",
            "position": 0,
            "min": 1,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "parameters",
            "label": "Extra parameters",
            "description": "For example page=1&rows=20.",
            "type": "string",
            "option": [
              "--parameters"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "itemlist",
            "label": "Print identifiers only",
            "type": "boolean",
            "option": [
              "--itemlist"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "top20",
            "label": "Top 20 results",
            "fields": [
              "query",
              "parameters"
            ],
            "required": [
              "query"
            ],
            "set": {
              "parameters": [
                "page=1&rows=20"
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "query",
              "parameters",
              "itemlist"
            ]
          }
        ]
      }
    ]
  }
}
