{"openapi":"3.2.0","info":{"title":"Wayback Machine API","description":"Archived web pages from the Internet Archive's Wayback Machine: a URL's content at any moment, its captures, and capture history.","version":"1.0.0"},"servers":[{"url":"https://waybackmachine.jojapi.net"}],"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"Wayback Machine"}],"x-agent-commerce":{"catalog_url":"https://waybackmachine.jojapi.net/_jojapi/agent/plans","discovery_url":"https://waybackmachine.jojapi.net/.well-known/x402","directory_url":"https://agents.jojapi.net/apis/wayback-machine-internet-archive","docs":"https://docs.jojapi.com/consumers/agents"},"paths":{"/v1/content":{"get":{"operationId":"get_v1_content","summary":"Archived content","description":"The archived copy of a URL closest to the given moment, as the Wayback Machine stored it. On success the HTTP status is 200 and the archived page's own HTTP status when it was crawled is `status_code` in the body (for example 200, or 403 for a page that was forbidden at crawl time); `date` and `location` name the capture that was returned, and binary files come back as text with one character per byte. When the URL has no capture the status is 404 (`not_archived`); when the URL is excluded from the Wayback Machine it is 403 (`url_excluded`); when the archive cannot be reached it is 503.","tags":["Wayback Machine"],"responses":{"200":{"description":"The archived content. `status_code` is the archived page's own HTTP status.","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"The archived page's own HTTP status when it was crawled (e.g. 200, or 403 if it was forbidden at crawl time)."},"content_type":{"type":"string","nullable":true,"description":"Content type of the archived response."},"location":{"type":"string","description":"Wayback Machine URL of the returned capture."},"date":{"type":"string","description":"Moment of the returned capture, `YYYY-MM-DD HH:MM:SS`."},"content":{"type":"string","description":"The archived content, exactly as the Wayback Machine stored it."}}},"example":{"status_code":200,"content_type":"text/html; charset=UTF-8","location":"https://web.archive.org/web/20230531235908im_/http://www.example.com/","date":"2023-05-31 23:59:08","content":"<!doctype html>\n<html>\n<head>\n    <title>Example Domain</title>…"}}}},"400":{"description":"A required parameter is missing or has the wrong format.","content":{"application/json":{"examples":{"missing":{"value":{"status":"missing_required_parameters","required_parameters":[{"key":"date","type":"string"}]}},"format":{"value":{"error":{"message":"Date must be in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format","code":400}}}}}}},"403":{"description":"The URL has been excluded from the Wayback Machine.","content":{"application/json":{"example":{"error":{"message":"This URL has been excluded from the Wayback Machine.","code":"url_excluded"}}}}},"404":{"description":"The Wayback Machine has no capture of this URL.","content":{"application/json":{"example":{"error":{"message":"The Wayback Machine has no capture of this URL.","code":"not_archived"}}}}},"503":{"description":"The Wayback Machine did not answer; not billed. Retry later.","content":{"application/json":{"example":{"error":{"message":"The Wayback Machine did not answer. Please retry.","code":"service_unavailable"}}}}}},"parameters":[{"name":"url","in":"query","description":"The page or file to look up, with or without the scheme.","required":true,"schema":{"type":"string","example":"example.com"}},{"name":"date","in":"query","description":"The moment to look for, `YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS` (UTC). The capture closest to it is returned.","required":true,"schema":{"type":"string","example":"2023-06-01"}}]}},"/v1/captures":{"get":{"operationId":"get_v1_captures","summary":"Captures of a day","description":"Every capture of a URL on one day, with its time, the status the page answered and the collections it belongs to.","tags":["Wayback Machine"],"responses":{"200":{"description":"The captures of the day.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Moment of the capture, `YYYY-MM-DD HH:MM:SS`."},"status_code":{"description":"Status the page answered; `-` when it is not known."},"collected_by":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Collections the capture belongs to."}}}}}},"example":{"items":[{"date":"2023-05-31 00:07:03","status_code":200,"collected_by":["archiveteam","archiveteam_urls"]}]}}}},"400":{"description":"A required parameter is missing or has the wrong format.","content":{"application/json":{"examples":{"missing":{"value":{"status":"missing_required_parameters","required_parameters":[{"key":"date","type":"string"}]}},"format":{"value":{"error":{"message":"Date must be in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format","code":400}}}}}}},"503":{"description":"The Wayback Machine did not answer; not billed. Retry later.","content":{"application/json":{"example":{"error":{"message":"The Wayback Machine did not answer. Please retry.","code":"service_unavailable"}}}}}},"parameters":[{"name":"url","in":"query","description":"The page or file to look up, with or without the scheme.","required":true,"schema":{"type":"string","example":"example.com"}},{"name":"date","in":"query","description":"The day, `YYYY-MM-DD`.","required":true,"schema":{"type":"string","example":"2023-05-31"}}]}},"/v1/calendar":{"get":{"operationId":"get_v1_calendar","summary":"Captures per day","description":"The number of captures of a URL on each day of a year or a month, with the status the page answered.","tags":["Wayback Machine"],"responses":{"200":{"description":"Captures per day.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"The day, `YYYY-MM-DD`."},"status_code":{"description":"Status the page answered; `-` when it is not known."},"snapshots":{"type":"integer","description":"Captures that day."}}}},"date":{"type":"string","description":"The year or month asked for."}}},"example":{"items":[{"date":"2023-05-01","status_code":200,"snapshots":243}],"date":"2023-05"}}}},"400":{"description":"A required parameter is missing or has the wrong format.","content":{"application/json":{"examples":{"missing":{"value":{"status":"missing_required_parameters","required_parameters":[{"key":"date","type":"string"}]}},"format":{"value":{"error":{"message":"Date must be in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format","code":400}}}}}}},"503":{"description":"The Wayback Machine did not answer; not billed. Retry later.","content":{"application/json":{"example":{"error":{"message":"The Wayback Machine did not answer. Please retry.","code":"service_unavailable"}}}}}},"parameters":[{"name":"url","in":"query","description":"The page or file to look up, with or without the scheme.","required":true,"schema":{"type":"string","example":"example.com"}},{"name":"date","in":"query","description":"A year (`YYYY`) or a month (`YYYY-MM`). For one day, use `/v1/captures`.","required":true,"schema":{"type":"string","example":"2023-05"}}]}},"/v1/sparkline":{"get":{"operationId":"get_v1_sparkline","summary":"Captures per year","description":"Monthly capture counts of a URL for every year it was archived, with its first and last capture.","tags":["Wayback Machine"],"responses":{"200":{"description":"Capture counts.","content":{"application/json":{"schema":{"type":"object","properties":{"years":{"type":"object","additionalProperties":{"type":"array","items":{"type":"integer"}},"description":"Twelve monthly counts per year."},"first_ts":{"type":"string","nullable":true,"description":"First capture, `YYYY-MM-DD HH:MM:SS`."},"last_ts":{"type":"string","nullable":true,"description":"Last capture, `YYYY-MM-DD HH:MM:SS`."}}},"example":{"years":{"2023":[6384,7700,7408,7655,8245,6385,6599,8977,7984,7878,7659,11061]},"first_ts":"2002-01-20 14:25:10","last_ts":"2026-10-08 03:02:27"}}}},"400":{"description":"A required parameter is missing or has the wrong format.","content":{"application/json":{"examples":{"missing":{"value":{"status":"missing_required_parameters","required_parameters":[{"key":"date","type":"string"}]}},"format":{"value":{"error":{"message":"Date must be in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format","code":400}}}}}}},"503":{"description":"The Wayback Machine did not answer; not billed. Retry later.","content":{"application/json":{"example":{"error":{"message":"The Wayback Machine did not answer. Please retry.","code":"service_unavailable"}}}}}},"parameters":[{"name":"url","in":"query","description":"The page or file to look up, with or without the scheme.","required":true,"schema":{"type":"string","example":"example.com"}}]}},"/v1/search":{"get":{"operationId":"get_v1_search","summary":"Search hosts","description":"Hosts the Wayback Machine has archived that match a query.","tags":["Wayback Machine"],"responses":{"200":{"description":"Matching hosts.","content":{"application/json":{"schema":{"type":"object","properties":{"isUrl":{"type":"boolean"},"hosts":{"type":"array","items":{"type":"object","properties":{"display_name":{"type":"string"}}}}}},"example":{"isUrl":false,"hosts":[{"display_name":"www.example.net"}]}}}},"400":{"description":"A required parameter is missing or has the wrong format.","content":{"application/json":{"examples":{"missing":{"value":{"status":"missing_required_parameters","required_parameters":[{"key":"date","type":"string"}]}},"format":{"value":{"error":{"message":"Date must be in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format","code":400}}}}}}},"503":{"description":"The Wayback Machine did not answer; not billed. Retry later.","content":{"application/json":{"example":{"error":{"message":"The Wayback Machine did not answer. Please retry.","code":"service_unavailable"}}}}}},"parameters":[{"name":"q","in":"query","description":"A host name or part of one.","required":true,"schema":{"type":"string","example":"example"}}]}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-JoJAPI-Key","description":"Your JoJ API key."}}}}