Page MenuHomePhabricator

Ghostarchive.org availability API
Open, MediumPublicBUG REPORT

Description

If IABot wants to poll Ghostarchive.org "availability API" its a simple header check. http://ghostarchive.org/archive/1/https://example.com . "1" being the
date closest to the archive you are looking for. Example headers below.

Archive exists:

mintbox:[/home/adminuser/wmnim/wm2] ./header 'https://ghostarchive.org/archive/1/https://www.youtube.com/watch?v=hltKrT_5q08'

HTTP/1.1 302 Found
Server: nginx/1.16.1
Date: Wed, 21 Sep 2022 04:01:34 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 43
Connection: keep-alive
Cache-control: no-store
Access-Control-Allow-Origin: *
Location: /varchive/hltKrT_5q08
Vary: Accept
X-Cache-Status: MISS
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Wed, 21 Sep 2022 04:01:34 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 5260
Connection: keep-alive
Cache-control: no-store
Access-Control-Allow-Origin: *
Link: <https://ghostarchive.org/oembed?url=https://ghostarchive.org/varchive/hltKrT_5q08&format=json>; rel="alternate"; type="application/json+oembed"; title="Video embed info"
Link: <https://ghostarchive.org/oembed?url=https://ghostarchive.org/varchive/hltKrT_5q08&format=xml>; rel="alternate"; type="application/xml+oembed"; title="Video embed info"
ETag: W/"148c-eA8EI2llhXze1bnyNbEmDcyiqj8"
X-Cache-Status: MISS

Archive not exist:

mintbox:[/home/adminuser/wmnim/wm2] ./header 'https://ghostarchive.org/archive/1/https://www.youtube.com/watch?v=hltKrT_5q09'

HTTP/1.1 302 Found
Server: nginx/1.16.1
Date: Wed, 21 Sep 2022 04:04:45 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 43
Connection: keep-alive
Cache-control: no-store
Access-Control-Allow-Origin: *
Location: /varchive/hltKrT_5q09
Vary: Accept
X-Cache-Status: MISS
HTTP/1.1 404 Not Found
Server: nginx/1.16.1
Date: Wed, 21 Sep 2022 04:04:45 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-control: no-store
Access-Control-Allow-Origin: *