-
Notifications
You must be signed in to change notification settings - Fork 7
Arquivo.pt API
The Arquivo.pt API allows full-text search and access preserved web content and related metadata. It is also possible to search by URL, accessing all versions of preserved web content.
API returns a JSON object.
EndPoint: https://arquivo.pt/textsearch
Note: a text search query returns a maximum of 500 response results
Parameter Name | Description | Examples |
---|---|---|
q | Query search terms. The query can contain advanced search operators. Advanced search operators can be:
|
q=James Davis q="Antonio Costa" q=Albert -Einstein |
from | Set an initial date for the time span of the search. Format: YYYYMMDDHHMMSS, also accepts a shorter date fotmat, e.g. (YYYY). Default: 1996 |
from=19960101000000 |
to | Set a end date for the time span of the search. Format: YYYYMMDDHHMMSS, also accepts a shorter date format, for example (YYYY). Default: Current Year-1 |
to=20151022163016 |
type | Specify accepted formats for the response items. Subtype of the MIME types (e.g. pdf, ps, html, xls, ppt, doc, rtf, etc). |
type=pdf |
offset | The position of the text indices where the search begins. Default:0 |
offset=0 |
siteSearch | Limit search within a given site. | siteSearch=http://www.publico.pt |
collection | Limit search within a given collection. Only results from the specified collections are return. A list of all the collections preserved by Arquivo.pt is publicly available | collection=EAWP13,EAWP21 |
maxItems | Maximum number of items on the response. Default: 50. Max: 500 |
maxItems=50 |
itemsPerSite (deprecated) | Maximum number of items per each site. (site) Default: itemsPerSite = 2 This parameter is deprecated by the dedupValue parameter |
itemsPerSite=5 |
dedupValue | Maximum number of items per dedupField. (The default dedupField used is "site") | dedupValue=5 |
dedupField | Result field where the deduplication will be performed. (ex. site, url) | dedupField=site |
fields | Selector specifying a subset of fields to include in the response. Separated by ",". Possible fields: title, originalURL, linkToArchive, tstamp, contentLength, digest, mimeType, linkToScreenshot, date, encoding, linkToNoFrame, linkToOriginalFile, collection, snippet, linkToExtractedText |
fields=title, originalURL, linkToArchive, tstamp |
callback | Callback function.
|
callback=hndlr |
prettyPrint | Returns response with indentations and line breaks.
|
prettyPrint=true |
Search by URL, allows automatic access to all preserved versions of a respective preserved URL. The items are returned from the most recent to the old one.
Parameter name | Description | Examples |
---|---|---|
versionHistory | The only parameter required for URL search. It will return a list of the preserved versions for the URL that was required. The URL may or may not contain the protocol, eg. http. Being strongly advised to define the url with the respective protocol. You must encode the originalURL with the percent-encoding (URL encoding). |
versionHistory=publico.pt OR versionHistory=http%3A%2F%2Fwww.imooty.pt/ %2FOpiniao.php%3Fsort/ %3Dlanguage%26action%3Dsort |
Type of Search | Field Name | Description | Examples |
---|---|---|---|
Full-text, URL, Metadata | serviceName | Service Name. | "serviceName": "Arquivo.pt - the Portuguese web-archive" |
Full-text, URL, Metadata | linkToService | URL for the service, in the case arquivo.pt | "linkToService": "https://arquivo.pt" |
Full-text, URL, Metadata | request_parameters | field with all request parameters. | "request_parameters": { "q": "Albert Einstein", "offset": 10, "limit": 5, "itemsPerSite": 2, "prettyPrint": "true" } |
Full-text, URL | next_page | URL for the next N items. N = offset + limit. (offset=0 and limit=50). Default=50 |
"next_page":"http://arquivo.pt/textsearch?q=hello%20world&offset=50" |
Full-text, URL | previous_page | URL for previous N items. N = offset - limit. (offset=0 and limit=50). Default=0. |
"previous_page":"http://arquivo.pt/text search?q=hello%20world&offset=0" |
Full-text, URL | estimated_nr_results | Estimated total number of items for the search, without paging. | "estimated_nr_results": "8654051" |
URL | total_items | Total number of items for the search, without paging. | "total_number" : "900" |
Full-text, URL, Metadata | title* | Attribute of the HTML <title> tag of the original version. | "title": "Antonio Costa" |
Full-text, URL, Metadata | originalURL* | Version URL of the preserved version content. | "originalURL": "http://zeca.uminho.pt/~costa/" |
Full-text, URL, Metadata | linkToArchive* | URL of the preserved version in Arquivo.pt. | "linkToArchive": "http://arquivo.pt/wayback /19961013191640/http://zeca.umi nho.pt/~costa/" |
Full-text, URL, Metadata | tstamp* | UTC timestamp of when the page was crawled - NOT the timestamp of when it was published YYYY MM DD HH MM SS |
"tstamp": "19961013191640" |
Full-text, URL, Metadata | contentLength* | Size in bytes of the preserved version. | "contentLength": "1023" |
Full-text, URL, Metadata | digest* | Version hash preserved. Algorithm: MD5. |
"digest": "5e8de36a1d6a76677a262e3e71d5c53d" |
Full-text, URL, Metadata | mimeType* | MIME type of the character set. | "mimeType": "text" |
Full-text, URL, Metadata | encoding* | Encoding of the content. This field can return empty. |
"encoding": "windows-1252" |
Full-text, URL, Metadata | date* | Date of crawl of the version. Format: epoch |
"date": "0845224210" |
Full-text, URL, Metadata | linkToScreenshot* | URL to download in image format. | "linkToScreenshot": "http://arquivo.pt/screenshot/? url=http%3A%2F%2Farquivo.pt%2Fno Frame%2Freplay%2F199610 13191640%2Fhttp%3A%2F%2Fzeca. uminho.pt%2F%7Ecosta%2F" |
Full-text, URL, Metadata | linkToNoFrame* | Link to the reproduction of the item, without the identifying sidebars of the Arquivo.pt. | "linkToNoFrame": "https://arquivo.pt/noFrame/rep lay/20010919060531/http://www.ex presso.pt/" |
Full-text, URL, Metadata | linkToOriginalFile* | Link to the original HTML of the preserved version. | "linkToOriginalFile": "https://arquivo.pt/noFrame/rep lay/20010919060531id_/http://www.ex presso.pt/" |
Full-text, URL, Metadata | linkToExtractedText* | URL for file download with filtered text extracted from preserved version. This field can return empty. |
"linkToExtractedText": "https://arquivo.pt/texte xtracted?m=http%3A%2F%2Fwww.exp resso.pt%2F%2F20010628221949" |
Full-text, URL | linkToMetadata* | Link to web document metadata. | "linkToMetadata": "https://arquivo.pt/textse arch?metadata=http%3A%2F%2Fsapo.p t%2Fhomepages%2Fm%2Fmarcelo %2Findex.html%2F19991023104844" |
Full-text | snippet* | Snippet is a block of text extracted from preserved web content that contains matches with search terms. HTML format, same as snippet displayed on Arquivo.pt search page. | "snippet": "<em>Antonio</em> <em>Costa</em> António <em>Costa</em> Pe rsonal Information Position: Lecturer, Computer Communications Group <span class="ellipsis"> ... </span> Address: <em>costa</em>@uminho.pt X.500 Information Ent ry . Curriculum vitae Antón io <em>Costa</em> , Page last modified: Fri Ju n 16 19:16:13 MET DST 1995 Internet URL- http:/zeca.umi nho.pt:80/~<em>costa</em>/<span cla ss="ellipsis"> ... </s pan>" |
URL, Metadata | statusCode* | Crawl request HTTP status-code to the preserved version. | "statusCode": "200" |
Full-text, URL, Metadata | collection* | The crawlings of the preserved Web in Arquivo.pt are divided by collections. This field returns the collection identifier of the preserved version. This field can return empty. |
"collection": "AWP3" |
Metadata | filename | Name of the ARC file where the item was extracted. This field can return empty. |
"filename": "IAH-20110425150147-00016-p12.arquivo.pt.arc.gz" |
Metadata | offset | The position of the CDX indices where the item is. This field can return empty. |
"offset": "9537529" |
*Response fields are repeated N times. Where N is the number of response items.
Full-text Search for the terms Albert and Einstein, with a limit of 5 results, with the offset to 10. Finally, returns the results with formatting.
https://arquivo.pt/textsearch?q=Albert%20Einstein&maxItems=5&prettyPrint=true
{
"serviceName": "Arquivo.pt - the Portuguese web-archive",
"linkToService": "https://arquivo.pt",
"next_page": "https://arquivo.pt/textsearch?q=Albert%20Einstein&maxItems=5&prettyPrint=true&offset=5",
"previous_page": "https://arquivo.pt/textsearch?q=Albert%20Einstein&maxItems=5&prettyPrint=true&offset=0",
"request_parameters": {
"q": "Albert Einstein",
"maxItems": "5",
"prettyPrint": "true"
},
"response_items": [
{
"title": "Albert Einstein ? Wikipédia, a enciclopédia livre",
"originalURL": "http://pt.wikipedia.org/wiki/Albert_Einstein",
"linkToArchive": "https://arquivo.pt/wayback/20150408223215/http://pt.wikipedia.org/wiki/Albert_Einstein",
"tstamp": "20150408223215",
"contentLength": "513829",
"digest": "3bf5a50a6ec8adddc5225569d360123b",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=https%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20150408223215%2Fhttp%3A%2F%2Fpt.wikipedia.org%2Fwiki%2FAlbert_Einstein",
"date": "1428532335",
"encoding": "UTF-8",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20150408223215/http://pt.wikipedia.org/wiki/Albert_Einstein",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20150408223215id_/http://pt.wikipedia.org/wiki/Albert_Einstein",
"snippet": "<em>Albert</em> <em>Einstein</em> – Wikipédia, a enciclopédia livre <em>Albert</em> <em>Einstein</em> Origem: Wikipédia, a enciclopédia livre. Ir para: navegação , pesquisa Nota: Para outras acepções do nome ver <em>Albert</em> <em>Einstein</em> (desambiguação) e <em>Einstein</em> (desambiguação) . <em>Albert</em> <em>Einstein</em> Física <em>Albert</em> <em>Einstein</em> em 1921 Dados gerais<span class=\"ellipsis\"> ... </span>",
"collection": "AWP17",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Fpt.wikipedia.org%2Fwiki%2FAlbert_Einstein%2F20150408223215",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fpt.wikipedia.org%2Fwiki%2FAlbert_Einstein%2F20150408223215"
},
{
"title": "Albert Einstein - Wikipedia, the free encyclopedia",
"originalURL": "http://en.wikipedia.org/wiki/Albert_Einstein",
"linkToArchive": "https://arquivo.pt/wayback/20150409010320/http://en.wikipedia.org/wiki/Albert_Einstein",
"tstamp": "20150409010320",
"contentLength": "498243",
"digest": "140922258a89e6d639189f10ffaf5f1a",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=https%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20150409010320%2Fhttp%3A%2F%2Fen.wikipedia.org%2Fwiki%2FAlbert_Einstein",
"date": "1428541400",
"encoding": "UTF-8",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20150409010320/http://en.wikipedia.org/wiki/Albert_Einstein",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20150409010320id_/http://en.wikipedia.org/wiki/Albert_Einstein",
"snippet": "<em>Albert</em> <em>Einstein</em> - Wikipedia, the free encyclopedia <em>Albert</em> <em>Einstein</em> From Wikipedia, the free encyclopedia Jump to: navigation , search "<em>Einstein</em>" redirects here. For other uses, see <em>Albert</em> <em>Einstein</em> (disambiguation) and <em>Einstein</em> (disambiguation) . <em>Albert</em> <em>Einstein</em> <em>Albert</em> <em>Einstein</em> in 1921 Born ( 1879<span class=\"ellipsis\"> ... </span>",
"collection": "AWP17",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FAlbert_Einstein%2F20150409010320",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FAlbert_Einstein%2F20150409010320"
},
{
"title": "Albert Einstein ? Wikipédia, a enciclopédia livre",
"originalURL": "http://pt.wikipedia.org/wiki/Albert_Einstein",
"linkToArchive": "https://arquivo.pt/wayback/20120122174556/http://pt.wikipedia.org/wiki/Albert_Einstein",
"tstamp": "20120122174556",
"contentLength": "323194",
"digest": "a57bdfdb64905ce26c777f59a20b04b0",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=https%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20120122174556%2Fhttp%3A%2F%2Fpt.wikipedia.org%2Fwiki%2FAlbert_Einstein",
"date": "1327254356",
"encoding": "UTF-8",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20120122174556/http://pt.wikipedia.org/wiki/Albert_Einstein",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20120122174556id_/http://pt.wikipedia.org/wiki/Albert_Einstein",
"snippet": "<em>Albert</em> <em>Einstein</em> – Wikipédia, a enciclopédia livre <em>Albert</em> <em>Einstein</em> Origem: Wikipédia, a enciclopédia livre. Ir para: navegação , pesquisa Nota: Para outros significados, veja <em>Albert</em> <em>Einstein</em><span class=\"ellipsis\"> ... </span> <em>Einstein</em> (desambiguação) . <em>Albert</em> <em>Einstein</em> Física <em>Albert</em> <em>Einstein</em>, em 1921 Nacionalidade Alemã (1879<span class=\"ellipsis\"> ... </span>",
"collection": "AWP12",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Fpt.wikipedia.org%2Fwiki%2FAlbert_Einstein%2F20120122174556",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fpt.wikipedia.org%2Fwiki%2FAlbert_Einstein%2F20120122174556"
},
{
"title": "Albert Einstein Online",
"originalURL": "http://www.westegg.com/einstein/",
"linkToArchive": "https://arquivo.pt/wayback/20090714011510/http://www.westegg.com/einstein/",
"tstamp": "20090714011510",
"contentLength": "17447",
"digest": "6a6378ae90fe70a685a85a4b293c260c",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=https%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20090714011510%2Fhttp%3A%2F%2Fwww.westegg.com%2Feinstein%2F",
"date": "1247534110",
"encoding": "windows-1252",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20090714011510/http://www.westegg.com/einstein/",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20090714011510id_/http://www.westegg.com/einstein/",
"snippet": "<em>Albert</em> <em>Einstein</em> Online [Overviews] Ten Obscure Factoids Concerning <em>Albert</em> <em>Einstein</em> <em>Albert</em> <em>Einstein</em> Biography <em>Albert</em> <em>Einstein</em> Biography , Nobelprize.org <em>Einstein</em>-Image and Impact . AIP History Center exhibit <em>Albert</em> <em>Einstein</em>'s Scientific Works Time Line of <em>Einstein</em>'s Life <em>Einstein</em>'s Big idea , Nova<span class=\"ellipsis\"> ... </span>",
"collection": "AWP4",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Fwww.westegg.com%2Feinstein%2F%2F20090714011510",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fwww.westegg.com%2Feinstein%2F%2F20090714011510"
},
{
"title": "Albert Einstein",
"originalURL": "http://alberteinsteinemc2.blogspot.com/",
"linkToArchive": "https://arquivo.pt/wayback/20091005062521/http://alberteinsteinemc2.blogspot.com/",
"tstamp": "20091005062521",
"contentLength": "122399",
"digest": "146b4c57771907283fb3222efbea3ac7",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=https%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20091005062521%2Fhttp%3A%2F%2Falberteinsteinemc2.blogspot.com%2F",
"date": "1254723921",
"encoding": "UTF-8",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20091005062521/http://alberteinsteinemc2.blogspot.com/",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20091005062521id_/http://alberteinsteinemc2.blogspot.com/",
"snippet": "<em>Albert</em> <em>Einstein</em> skip to main | skip to sidebar <em>Albert</em> <em>Einstein</em> <em>ALBERT</em> <em>EINSTEIN</em>, BIBLIGRAFIA, CARTAS, HISTÓRIA E TEORIAS <em>ALBERT</em> <em>EINSTEIN</em> - ANIMAÇÃO <em>Albert</em> <em>Einstein</em>, Textos: Video <em>ALBERT</em> <em>EINSTEIN</em> - BIOGRAFIA <em>Albert</em> <em>Einstein</em> (Ulm, 14 de Março de 1879 - Princeton, 18 de Abril de 1955) foi um físico<span class=\"ellipsis\"> ... </span>",
"collection": "AWP5",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Falberteinsteinemc2.blogspot.com%2F%2F20091005062521",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Falberteinsteinemc2.blogspot.com%2F%2F20091005062521"
}
]
}
URL Search for the expresso.pt versions, with a limit of 5 results. Finally, returns the results with formatting.
https://arquivo.pt/textsearch?prettyPrint=true&versionHistory=expresso.pt&maxItems=5
{
"serviceName": "Arquivo.pt - the Portuguese web-archive",
"linkToService": "https://arquivo.pt",
"next_page": "https://arquivo.pt/textsearch?prettyPrint=true&versionHistory=expresso.pt&maxItems=5&offset=5",
"previous_page": "https://arquivo.pt/textsearch?prettyPrint=true&versionHistory=expresso.pt&maxItems=5&offset=0",
"request_parameters": {
"maxItems": "5",
"from": "19960101000000",
"to": "20181231235959",
"prettyPrint": "true"
},
"response_items": [
{
"title": "302 Found",
"originalURL": "http://www.expresso.pt/",
"linkToArchive": "https://arquivo.pt/wayback/20160719170305/http://www.expresso.pt/",
"tstamp": "20160719170305",
"contentLength": "318",
"digest": "POPLDWWERZ2PUX2BRPCFNS2BB6ELQHMY",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=https%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20160719170305%2Fhttp%3A%2F%2Fwww.expresso.pt%2F",
"date": "1468947785",
"encoding": "iso-8859-1",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20160719170305/http://www.expresso.pt/",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20160719170305id_/http://www.expresso.pt/",
"status": "302",
"collection": "FAWP2620160719",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Fwww.expresso.pt%2F%2F20160719170305",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fwww.expresso.pt%2F%2F20160719170305"
},
{
"title": "302 Found",
"originalURL": "http://www.expresso.pt/",
"linkToArchive": "https://arquivo.pt/wayback/20160718170306/http://www.expresso.pt/",
"tstamp": "20160718170306",
"contentLength": "316",
"digest": "POPLDWWERZ2PUX2BRPCFNS2BB6ELQHMY",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=https%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20160718170306%2Fhttp%3A%2F%2Fwww.expresso.pt%2F",
"date": "1468861386",
"encoding": "iso-8859-1",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20160718170306/http://www.expresso.pt/",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20160718170306id_/http://www.expresso.pt/",
"status": "302",
"collection": "FAWP2620160718",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Fwww.expresso.pt%2F%2F20160718170306",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fwww.expresso.pt%2F%2F20160718170306"
},
{
"title": "302 Found",
"originalURL": "http://www.expresso.pt/",
"linkToArchive": "https://arquivo.pt/wayback/20160717170308/http://www.expresso.pt/",
"tstamp": "20160717170308",
"contentLength": "318",
"digest": "POPLDWWERZ2PUX2BRPCFNS2BB6ELQHMY",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=https%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20160717170308%2Fhttp%3A%2F%2Fwww.expresso.pt%2F",
"date": "1468774988",
"encoding": "iso-8859-1",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20160717170308/http://www.expresso.pt/",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20160717170308id_/http://www.expresso.pt/",
"status": "302",
"collection": "FAWP2620160717",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Fwww.expresso.pt%2F%2F20160717170308",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fwww.expresso.pt%2F%2F20160717170308"
},
{
"title": "302 Found",
"originalURL": "http://www.expresso.pt/",
"linkToArchive": "https://arquivo.pt/wayback/20160716170306/http://www.expresso.pt/",
"tstamp": "20160716170306",
"contentLength": "317",
"digest": "POPLDWWERZ2PUX2BRPCFNS2BB6ELQHMY",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=https%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20160716170306%2Fhttp%3A%2F%2Fwww.expresso.pt%2F",
"date": "1468688586",
"encoding": "iso-8859-1",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20160716170306/http://www.expresso.pt/",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20160716170306id_/http://www.expresso.pt/",
"status": "302",
"collection": "FAWP2620160716",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Fwww.expresso.pt%2F%2F20160716170306",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fwww.expresso.pt%2F%2F20160716170306"
},
{
"title": "302 Found",
"originalURL": "http://www.expresso.pt/",
"linkToArchive": "https://arquivo.pt/wayback/20160715170308/http://www.expresso.pt/",
"tstamp": "20160715170308",
"contentLength": "317",
"digest": "POPLDWWERZ2PUX2BRPCFNS2BB6ELQHMY",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=https%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20160715170308%2Fhttp%3A%2F%2Fwww.expresso.pt%2F",
"date": "1468602188",
"encoding": "iso-8859-1",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20160715170308/http://www.expresso.pt/",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20160715170308id_/http://www.expresso.pt/",
"status": "302",
"collection": "FAWP2620160715",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Fwww.expresso.pt%2F%2F20160715170308",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fwww.expresso.pt%2F%2F20160715170308"
}
]
}
Metadata search for the expresso.pt version, with 20000302151731 timestamp. Finally, returns the results with formatting.
Metadata Link: https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fwww.expresso.pt%2F%2F20000302151731&prettyPrint=true
{
"serviceName": "Arquivo.pt - the Portuguese web-archive",
"linkToService": "https://arquivo.pt",
"request_parameters": {
"prettyPrint": "true"
},
"response_items": [
{
"title": "EXPRESSO",
"originalURL": "http://www.expresso.pt/",
"linkToArchive": "https://arquivo.pt/wayback/20000302151731/http://www.expresso.pt/",
"tstamp": "20000302151731",
"contentLength": "33905",
"digest": "IGLEXSO4SFEQJD5NGIZZTQVLXHEPM5GS",
"mimeType": "text/html",
"linkToScreenshot": "https://arquivo.pt/screenshot/?url=http%3A%2F%2Farquivo.pt%2FnoFrame%2Freplay%2F20000302151731%2Fhttp%3A%2F%2Fwww.expresso.pt%2F",
"date": "0952010251",
"encoding": "windows-1252",
"linkToNoFrame": "https://arquivo.pt/noFrame/replay/20000302151731/http://www.expresso.pt/",
"linkToOriginalFile": "https://arquivo.pt/noFrame/replay/20000302151731id_/http://www.expresso.pt/",
"status": "200",
"collection": "IA20000302",
"linkToExtractedText": "https://arquivo.pt/textextracted?m=http%3A%2F%2Fwww.expresso.pt%2F%2F20000302151731",
"linkToMetadata": "https://arquivo.pt/textsearch?metadata=http%3A%2F%2Fwww.expresso.pt%2F%2F20000302151731",
"filename": "PT-HISTORICAL-2000-GROUP-ALV-20100830000000-00000.arc.gz",
"offset": "11319239"
}
]
}
You can invoke the JSON TextSearch API using REST from JavaScript, using the callback query parameter and a callback function. This allows you to write rich applications that display Custom Search data without writing any server side code.
The following example uses this approach to display the first page of search results for the query Simone de Beauvoir:
<html>
<head>
<title>JSON TextSearch API Example</title>
</head>
<body>
<div id="content"></div>
<script>
function hndlr(response) {
for (var i = 0; i < response.response_items.length; i++) {
var item = response.response_items[i];
// in production code, item.htmlTitle should have the HTML entities escaped.
document.getElementById("content").innerHTML += "<br>" + "<strong>Page Title</strong>: " + item.title + " <strong>URL</strong>: " + item.linkToArchive;
}
}
</script>
<script src="https://arquivo.pt/textsearch?q=simone%20de%20beauvoir&from=19960101000000&to=20001022163016&maxItems=10&offset=0&callback=hndlr">
</script>
</body>
</html>