{"openapi":"3.1.0","info":{"title":"Wayback Machine (archive.org) API (Bowmark)","version":"e833508f87ff","description":"The Wayback Machine — is a site or page archived, every capture it holds, and the page itself as it was captured, so a caller can see what a site published before it was changed or removed.\n\nEvery function Bowmark has for Wayback Machine (archive.org) (archive.org) as one HTTP call. Each runs on Bowmark's infrastructure with the same billing, rules and response envelope as `POST /v1/run`. The whole API: https://api.bowmark.ai/openapi.json. Guide: https://bowmark.ai/docs/api.","contact":{"email":"support@bowmark.ai","url":"https://bowmark.ai/docs/api"}},"servers":[{"url":"https://api.bowmark.ai"}],"security":[{"bearer":[]},{"apiKeyHeader":[]}],"paths":{"/v1/sites/archive_org/listSnapshots":{"post":{"operationId":"listSnapshots","summary":"Lists what the Wayback Machine has captured, newest first.","description":"Lists what the Wayback Machine has captured, newest first. A bare domain (\"humanlayer.dev\") returns the newest capture of every distinct page under it — narrow it with `pathContains: [\"about\", \"team\", \"contact\"]`. A url with a path returns every distinct VERSION of that one page, which is the axis that answers \"was this ever on the page\". Each row carries the capture timestamp, the original url and its browsable archive url. Use getSnapshot to read one.\n\nCalls `bowmark.providers.archive_org.listSnapshots`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<archive_orgSnapshotList>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","description":"TypeScript: `string`"},"opts":{"$ref":"#/components/schemas/archive_orgSnapshotOptions","description":"TypeScript: `archive_orgSnapshotOptions`"}},"required":["site"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/archive_org/getSnapshot":{"post":{"operationId":"getSnapshot","summary":"Reads one archived page as it was captured — the original HTML, without the archive's toolbar or rewritten links — for a url and a `YYYYMMDDhhmmss` timestamp from listSnapshots (a nearby timestamp is ","description":"Reads one archived page as it was captured — the original HTML, without the archive's toolbar or rewritten links — for a url and a `YYYYMMDDhhmmss` timestamp from listSnapshots (a nearby timestamp is redirected to the closest capture). Use it to find something a page carried in the past and has since removed.\n\nCalls `bowmark.providers.archive_org.getSnapshot`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<archive_orgSnapshotPage>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"TypeScript: `string`"},"timestamp":{"type":"string","description":"TypeScript: `string`"}},"required":["url","timestamp"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/archive_org/checkAvailability":{"post":{"operationId":"checkAvailability","summary":"Checks the Wayback Machine's own public availability endpoint for one site or page — a bare domain (\"carpetlandusa.net\"), a domain plus path (\"carpetlandusa.net/schedule-pre-measure/\"), or a full URL.","description":"Checks the Wayback Machine's own public availability endpoint for one site or page — a bare domain (\"carpetlandusa.net\"), a domain plus path (\"carpetlandusa.net/schedule-pre-measure/\"), or a full URL. Returns whether ANY capture exists, and — when one does — its own browsable `archivedUrl`, its `archivedTimestamp` (`YYYYMMDDhhmmss`) and the original page's `archivedStatus` at capture time. `timestamp` (`YYYYMMDDhhmmss`, or a shorter prefix like `20260615`) asks for the capture CLOSEST to that moment; omit it for the most recent capture. This is the availability check only — it does not fetch the archived page's own content.\n\nCalls `bowmark.providers.archive_org.checkAvailability`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<archive_orgAvailability>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","description":"TypeScript: `string`"},"timestamp":{"type":"string","description":"TypeScript: `string`"}},"required":["site"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/archive_org/searchItems":{"post":{"operationId":"searchItems","summary":"Searches the Internet Archive's library of books, films, audio, software and more through its Solr search API — free text or a Solr query string (`'title:(pride and prejudice) AND mediatype:texts'`).","description":"Searches the Internet Archive's library of books, films, audio, software and more through its Solr search API — free text or a Solr query string (`'title:(pride and prejudice) AND mediatype:texts'`). Narrow with `mediatype` (\"texts\", \"audio\", \"movies\", \"software\", \"image\") and order with `sort` (\"relevance\" default, \"downloads\" for most-borrowed/most-played, \"date\"). Each result carries the `identifier` to pass to getItem, checkLendingAvailability or downloadFile. `totalFound` is the Solr match count, which is usually far larger than the page returned.\n\nCalls `bowmark.providers.archive_org.searchItems`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<archive_orgSearchResults>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"TypeScript: `string`"},"opts":{"$ref":"#/components/schemas/archive_orgSearchOptions","description":"TypeScript: `archive_orgSearchOptions`"}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/archive_org/searchScholar":{"post":{"operationId":"searchScholar","summary":"Searches IA Scholar (scholar.archive.org) — the Internet Archive's full-text index of open-access research papers, journal articles and preprints.","description":"Searches IA Scholar (scholar.archive.org) — the Internet Archive's full-text index of open-access research papers, journal articles and preprints. Returns 20 results a page, each with title, authors, year, venue, a full-text snippet, its DOI and other ids, and a link to the archived PDF. Page on with `page` while `hasNextPage` is true.\n\nCalls `bowmark.providers.archive_org.searchScholar`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<archive_orgScholarResults>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"TypeScript: `string`"},"opts":{"$ref":"#/components/schemas/archive_orgScholarOptions","description":"TypeScript: `archive_orgScholarOptions`"}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/archive_org/getItem":{"post":{"operationId":"getItem","summary":"Fetches one item's full metadata — title, creator, description, date, mediatype, collection — and its complete file list, each file carrying a ready-to-fetch `downloadUrl`.","description":"Fetches one item's full metadata — title, creator, description, date, mediatype, collection — and its complete file list, each file carrying a ready-to-fetch `downloadUrl`. Takes the `identifier` from searchItems, or the last path segment of an archive.org/details/<identifier> url. Throws when no item exists at that identifier.\n\nCalls `bowmark.providers.archive_org.getItem`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<archive_orgItem>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","description":"TypeScript: `string`"}},"required":["identifier"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/archive_org/downloadFile":{"post":{"operationId":"downloadFile","summary":"Builds a download URL for one file within an item — a book PDF, an audio file, a video, or any other archived file — ready to pass to a file fetch.","description":"Builds a download URL for one file within an item — a book PDF, an audio file, a video, or any other archived file — ready to pass to a file fetch. Takes the `identifier` from searchItems (or the last path segment of an archive.org/details/<identifier> url) and a `filename` from getItem's files list. Throws when no item exists at that identifier.\n\nCalls `bowmark.providers.archive_org.downloadFile`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<archive_orgDownloadUrl>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","description":"TypeScript: `string`"},"filename":{"type":"string","description":"TypeScript: `string`"}},"required":["identifier","filename"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/archive_org/checkLendingAvailability":{"post":{"operationId":"checkLendingAvailability","summary":"Checks whether a book item is available to borrow from the Internet Archive right now.","description":"Checks whether a book item is available to borrow from the Internet Archive right now. `isLendable` is false for a public-domain item nothing controls lending on (it is simply readable). `availableToBorrow` is false either when the item is not lendable at all, or when every copy is currently checked out — `waitlistSize` tells the two apart. Takes the `identifier` from searchItems, or the last path segment of an archive.org/details/<identifier> url. Throws when no item exists at that identifier.\n\nCalls `bowmark.providers.archive_org.checkLendingAvailability`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<archive_orgLendingAvailability>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","description":"TypeScript: `string`"}},"required":["identifier"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your Bowmark API key."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Bowmark-Key"}},"responses":{"NotFound":{"description":"No such site or function.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}},"schemas":{"RunEnvelope":{"type":"object","description":"What a run returns. `status` says whether the SCRIPT succeeded. A script that threw or paused for a login is still HTTP 200. Branch on `status`, not on the HTTP code.","required":["ok","status","result","logs","error","ms"],"properties":{"runId":{"type":"string","description":"Stable id for this run. Quote it in a support or `report` message."},"ok":{"type":"boolean","description":"False only when the run produced nothing usable."},"status":{"type":"string","enum":["ok","error","partial","needs_user"],"description":"`partial`: the result is real but some calls failed (see `incomplete`); `ok` stays true. `needs_user`: a person must sign in to a site first. Relay `meta.handoff.url` to them, then run again."},"egress":{"type":"string","enum":["default","link"],"description":"The egress the run was given, present only when the request asked for one. `link`: every request went through the caller's own Chrome (Bowmark Buddy)."},"result":{"description":"Whatever the script `return`ed. Any JSON value."},"logs":{"type":"array","items":{"type":"string"},"description":"Lines the script wrote with `log(...)`."},"error":{"type":["string","null"],"description":"Why the run failed, in plain words. Null on success."},"ms":{"type":"integer","description":"How long the script itself ran, in milliseconds."},"queuedMs":{"type":"integer","description":"How long the run waited for a worker before starting. Present only when it was a second or more."},"needs":{"type":"array","description":"The sign-ins this script is waiting on. Present when `status` is `needs_user`.","items":{"type":"object","required":["capability","provider","providerTitle","kind"],"properties":{"capability":{"type":"string"},"provider":{"type":"string"},"providerTitle":{"type":"string","description":"The site's name, to show a person."},"kind":{"type":"string"}}}},"incomplete":{"type":"object","description":"Present only when `status` is `partial`: which calls did not answer.","properties":{"summary":{"type":"string"},"totalCalls":{"type":"integer"}},"additionalProperties":true},"emptyHanded":{"type":"object","description":"Present when the script returned nothing while its calls returned rows, usually a filter that matched none of the site's own labels. Lists the label values the calls actually returned.","additionalProperties":true},"notes":{"type":"array","description":"Caveats a call attached to a complete answer. Never changes `status`.","items":{"type":"object","properties":{"path":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}}}},"meta":{"type":"object","properties":{"handoff":{"type":"object","description":"A single-use sign-in link for a person to open. Expires at `expiresAt`.","properties":{"ref":{"type":"string"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}}},"concurrency":{"type":"object","description":"On a 429: how many runs are in flight and when to retry.","properties":{"limit":{"type":"integer"},"inFlight":{"type":"integer"},"retryAfterSeconds":{"type":"integer"}}}},"additionalProperties":true},"notice":{"type":"object","description":"Set when the account owner has not accepted the current Terms. Relay it to them.","additionalProperties":true}}},"archive_orgScholarOptions":{"type":"object","properties":{"page":{"type":"number"}},"additionalProperties":true},"archive_orgSearchOptions":{"type":"object","properties":{"mediatype":{"type":"string"},"sort":{"anyOf":[{"const":"relevance"},{"const":"downloads"},{"const":"date"}]},"limit":{"type":"number"}},"additionalProperties":true},"archive_orgSnapshotOptions":{"type":"object","properties":{"scope":{"anyOf":[{"const":"exact"},{"const":"prefix"}]},"limit":{"type":"number"},"pathContains":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}}}}