Skip to content

ImageSearch API v1.1 (beta)

Daniel Gomes edited this page Apr 18, 2024 · 17 revisions

The ImageSearch API allows keyword to image search and access to preserved web content and related metadata.
The API returns a JSON object.
EndPoint: https://arquivo.pt/imagesearch

The source code of the image search system is available at https://github.com/arquivo/pwa-technologies/wiki/Arquivo.pt-image-search-repositories

Changelog

Note that API version changes are breaking. The API endpoint does not change, but only the latest version (currently 1.1) is available. Fields removed between version are not accessible anymore due to changes in our search backend.

1.1 (March 2021):

  • Improved search backend with 584+ million images referenced in 1800+ million pages;
  • Subdomain filtering using the siteSearch: parameter is not expanded by default, you must use wildcards to add subdomains to the filter. Check how to do this siteSearch: line of the Request Parameter section;
  • Added the imgCaption multivalued field;
  • imgAlt, imgTitle and collection fields are now multivalued;
  • Added additional image metadata fields (imageMetadataChanges, pageMetadataChanges, matchingImages, matchingPages);
  • Some secondary fields were removed (pageProtocol, imgThumbnailBase64, imgSrcURLDigest).

1.0:

  • Initial version, enabling search in 20+ million images

Request Parameters

Search for terms

Parameter Name Description Examples
q Query search terms.
The query can contain advanced search operators. Advanced search operators can be:
  • " " : search for items containing expression composed by search terms (e.g. phrase or named entity).
  • - : excludes items that contains the given terms.
q=Cristiano Ronaldo          
q="Antonio Costa"
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 image MIME types e.g. png, jpeg, gif, tiff, etc
type=png
size Size of the images on the response.
Default: size=all.
size=sm - small size, images up to 65536px²
size=md - medium size, images between 65537px² and 810000px².
size=lg - large size, images bigger than 810000px²
size=md
offset The position of the text indices where the search begins.
Default:0
offset=0
siteSearch Comma separated list of domains to limit search to. Use wildcards to support subdomain matching. siteSearch=publico.pt (match only publico.pt)
siteSearch=*.publico.pt (match only publico.pt subdomains: e.g. www.publico.pt, fugas.publico.pt, ....)
siteSearch=publico.pt,*.publico.pt (match publico.pt and all subdomains: e.g. publico.pt, www.publico.pt, fugas.publico.pt...)
safeSearch Request only images that were automatically classified as Safe for Work. Default: safeSearch=on safeSearch=on
maxItems Maximum number of items on the response.
Default: 50.
Max: 200
maxItems=50
fields Selector specifying a subset of fields to include in the response. Separated by ",".
Possible fields: imgSrc, imgMimeType, imgHeight, imgWidth, imgTstamp, imgTitle, imgAlt, imgCaption, imgLinkToArchive, pageURL, pageTstamp, pageLinkToArchive, pageTitle, collection, imgDigest, pageHost, pageImages, safe
fields=collection, imgSrc, imgMimeType, imgTstamp,imgLinkToArchive
callback Callback function.
  • For more information, see the partial request section in the REST from JavaScript.
  • Use for better performance.
callback=hndlr
prettyPrint Returns response with indentations and line breaks.
  • Returns the response in a human-readable format if true.
  • Default value: false.
  • Whenever false, it can reduce the response payload size, which might lead to better performance in some environments.
prettyPrint=true
collection Filter requested images by Arquivo.pt collection. A list of all the collections preserved by Arquivo.pt is publicly available collection=AWP10

Response fields

Response Header

Field Name Description Examples
serviceName           Service Name.     "serviceName": "Arquivo.pt - image search service."
linkToService URL for the service, in the case arquivo.pt image search "linkToService": "https://arquivo.pt/images.jsp"
nextPage URL for the next N items.
N = offset + limit.
(offset=0 and limit=50). Default=50
"nextPage":"https://arquivo.pt/imagesearch?q=test&maxItems=5&prettyPrint=true&offset=55"
previousPage URL for previous N items.
N = offset - limit.
(offset=0 and limit=50). Default=0
"previousPage":"https://arquivo.pt/imagesearch?q=sapo&maxItems=5&prettyPrint=true&offset=45"
totalItems Total number of items for the search, without paging. "totalItems": 554005
offset The position of the text indices where the search begins. "offset": 100
numberOfResponseItems Total number of response items "responseItems": 50

Response Items

Field Name Description Examples
responseItems Array of response item "responseItems": [...]

Response Item - default fields

Field Name Description Examples
imgSrc The src attribute of the preserved image "imgSrc": "www.hardwareboard.eu
/samsung_galaxy_s3_teaser.jpg"
imgWidth The width of the preserved image in pixels "imgWidth": 150
imgHeight The height of the preserved image in pixels "imgHeight": 132
imgTitle * List of title attributes of the preserved images "imgTitle": ["Cristiano Ronaldo"]
imgAlt * List of alt attributes of the preserved images "imgAlt": ["Photo of Cristiano Ronaldo in Manchester United", "Fotografia de Cristiano Ronaldo no Manchester United"]
imgCaption * List of image caption created using page text that is close to the image "imgCaption": ["Cristiano Ronaldo arrived at Manchester United in 2003...", "Cristiano Ronaldo"]
imgTstamp The timestamp of the preserved image "imgTstamp": "20141122045204"
imgMimeType The MIME type of the preserved image "imgMimeType": "image/jpeg"
imgLinkToArchive Link to archived image "imgLinkToArchive":
"https://arquivo.pt/wayback/20
141122045033/http://www.hardwareboard
.eu/cms/files/sandy_bridge_extreme_teaser.jpg"
pageURL The URL of the Web page that contained the preserved image "pageURL": "http://sapo.pt"
pageTstamp The timestamp of the preserved Web page that contained the preserved image "pageTstamp": "20141122045204"
pageTitle The title text of the Web page that contained the preserved image "pageTitle": "Desporto — SAPO"
collection List of names of the collections where the image and the archived page were retrieved "collection": ["AWP10", "AWP11"]

* These fields do not show up in the response if they do not exist for that image.

Response Item - hidden fields

OR

Field Name Description Examples
imgDigest Digest of the bytes of the preserved image.
Algorithm: MD5.
"imgDigest":"fa142b6ac1d...da421a"
pageHost The host of the preserved page that contains the image "pageHost":"www.sapo.pt"
pageImages The number of images found in the Web page that contained the preserved image "pageImages": 105
safe Automatic classification score of the image. Number between 0.000 and 1.000. If the score is less than 0.500 the image is considered Not Safe for Work "safe": 0.925
imageMetadataChanges The number of times image specific metadata changed over time "imageMetadataChanges": 5
pageMetadataChanges The number of times page specific metadata changed over time "pageMetadataChanges": 3
matchingImages The number of times the image was captured over time "matchingImages": 32
matchingPages The number of pages where the image is present over time "matchingPages": 41

Example Request - Image Search

Search for images related with the keyword sapo. Start in result 50, and show only 5 results.

https://arquivo.pt/imagesearch?q=sapo&offset=50&maxItems=5&prettyPrint=true

Example Response - Image Search

{
  "serviceName": "Arquivo.pt - image search service.",
  "linkToService": "https://arquivo.pt/images.jsp",
  "linkToDocumentation": "https://github.com/arquivo/pwa-technologies/wiki/ImageSearch-API-v1-(beta)",
  "linkToMoreFields": "https://arquivo.pt/imagesearch?q=sapo&offset=50&maxItems=5&prettyPrint=true&more=pageHost,matchingImages,safe",
  "nextPage": "https://arquivo.pt/imagesearch?q=sapo&maxItems=5&prettyPrint=true&offset=55",
  "previousPage": "https://arquivo.pt/imagesearch?q=sapo&maxItems=5&prettyPrint=true&offset=45",
  "totalItems": 15443161,
  "numberOfResponseItems": 5,
  "offset": 50,
  "responseItems": [
    {
      "pageTstamp": "20161106094703",
      "imgWidth": 250,
      "imgMimeType": "image/jpeg",
      "imgDigest": "3bd33657c260c2e52425c3bbee5605894d677ae58827740524a2a91c8ef1c914",
      "imgTstamp": "20161106094914",
      "imgSrc": "http://www.fitfiu.pt/store/97-home_default/abelhas.jpg",
      "pageURL": "http://www.fitfiu.pt/store/76-meias-com-aplicacao",
      "pageTitle": "Meias para bebé com aplicação - Fit Fiu",
      "imgHeight": 250,
      "imgCaption": [
        "4,50 € Disponível",
        "Sapos Meias para bebé, com aplicação tamanho único (0-9 meses) composição meia: 75% algodão; 22% poliamida; 3% elastano composição boneco: 95% algodão; 5% poliéster lavagem à mão"
      ],
      "imgAlt": [
        "Sapos"
      ],
      "imgTitle": [
        "Sapos"
      ],
      "collection": [
        "AWP22"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20161106094914im_/http://www.fitfiu.pt/store/97-home_default/abelhas.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20161106094703/http://www.fitfiu.pt/store/76-meias-com-aplicacao"
    },
    {
      "imgDigest": "e9748ca2c60434496dce9422870b2c29941fb3143c20daf18b8ac4c54ccbce26",
      "imgSrc": "http://www.homeweb.pt/2846-atmn_normal/cobertor-gofrado-amicor-sapo.jpg",
      "pageTitle": "Cobertor bordado Gatinhos",
      "imgHeight": 400,
      "imgWidth": 400,
      "imgMimeType": "image/jpeg",
      "pageURL": "http://www.homeweb.pt/cobertores-infantis/918-cobertor-bordado-gatinhos.html",
      "imgTstamp": "20170222094926",
      "pageTstamp": "20170222095853",
      "imgCaption": [
        "Cobertor Gofrado Amicor Sapo 25,00 €",
        "Novo",
        "Cobertor Gofrado Amicor Sapo Comprar Adicionar à Lista de desejos"
      ],
      "imgAlt": [
        "Cobertor Gofrado Amicor Sapo",
        "sapo"
      ],
      "imgTitle": [
        "sapo"
      ],
      "collection": [
        "AWP23",
        "AWP24",
        "AWP26",
        "AWP27"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20170222094926im_/http://www.homeweb.pt/2846-atmn_normal/cobertor-gofrado-amicor-sapo.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20170222095853/http://www.homeweb.pt/cobertores-infantis/918-cobertor-bordado-gatinhos.html"
    },
    {
      "imgDigest": "d0c856359aee22035e14640b3e310976f18aac8f5568bd5a1dbc0623d793a99a",
      "imgSrc": "http://jornaldiabo.com/wp-content/uploads/2017/04/sapo-700x315.jpg",
      "pageTitle": "BE e PCP cedem no Novo Banco",
      "imgHeight": 315,
      "imgWidth": 700,
      "imgMimeType": "image/jpeg",
      "pageURL": "http://jornaldiabo.com/destaque/novo-banco-pcp-be/",
      "imgTstamp": "20170403220834",
      "pageTstamp": "20170404180609",
      "imgCaption": [
        "BE e PCP cedem no Novo Banco Destaque Economia 3 Apr, 2017 0 1093 Eva Cabral A venda do Novo Banco aos americanos da Lone\nGoogle + Artigo anteriorEsquerda quer impor ideologia nas aulas Próximo anteriorEdição de 4 de Abril de 2017 Jornal O DIABO",
        "BE e PCP cedem no Novo Banco Destaque Economia 3 Apr, 2017 2 3913 Eva Cabral A venda do Novo Banco aos americanos da Lone\nGoogle + Previous articleEsquerda quer impor ideologia nas aulas Next articleEdição de 4 de Abril de 2017 Jornal O DIABO"
      ],
      "imgTitle": [
        "sapo"
      ],
      "collection": [
        "FAWP29",
        "FAWP30"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20170403220834im_/http://jornaldiabo.com/wp-content/uploads/2017/04/sapo-700x315.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20170404180609/http://jornaldiabo.com/destaque/novo-banco-pcp-be/"
    },
    {
      "imgDigest": "174e9c021cef6f8505a5fa6ba308a7689f217e39b151b498c06b73230216d9a0",
      "imgSrc": "http://bianca.pt/multimedia/caes_machos/S/sapo/Sapo4.jpg",
      "pageTitle": "Sapo - Reservado",
      "imgHeight": 386,
      "imgWidth": 500,
      "imgMimeType": "image/jpeg",
      "pageURL": "http://bianca.pt/index.php?view=article&catid=69%3Acaes-para-adocao-adultos-machos-peq&id=5364%3Asapo-novo&option=com_content&Itemid=187",
      "imgTstamp": "20181010224702",
      "pageTstamp": "20181010224640",
      "imgCaption": [
        "Também disponível para APADRINHAMENTO!\n< Anterior",
        "< Anterior Seguinte >"
      ],
      "imgAlt": [
        "sapo"
      ],
      "imgTitle": [
        "sapo"
      ],
      "collection": [
        "AWP28",
        "EAWP28"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20181010224702im_/http://bianca.pt/multimedia/caes_machos/S/sapo/Sapo4.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20181010224640/http://bianca.pt/index.php?view=article&catid=69%3Acaes-para-adocao-adultos-machos-peq&id=5364%3Asapo-novo&option=com_content&Itemid=187"
    },
    {
      "pageTstamp": "20190523064730",
      "imgWidth": 192,
      "imgMimeType": "image/jpeg",
      "imgDigest": "d5f6e148efc63881bce3401dd667e62cbb96dd1535b119ba6093b6eaa7e296ff",
      "imgTstamp": "20190523065257",
      "imgSrc": "https://www.regatadeportugal.pt/wp-content/uploads/2019/05/sapo.jpg",
      "pageURL": "https://www.regatadeportugal.pt/",
      "pageTitle": "Regata de Portugal 2019 em Lisboa",
      "imgHeight": 280,
      "imgCaption": [
        "Odile Van Aanholt",
        "Afrodite Zegers 4º lugar no Jogos Olímpicos Rio de Janeiro 2016"
      ],
      "imgAlt": [
        "sapo"
      ],
      "imgTitle": [
        "sapo"
      ],
      "collection": [
        "AWP30",
        "FAWP37"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20190523065257im_/https://www.regatadeportugal.pt/wp-content/uploads/2019/05/sapo.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20190523064730/https://www.regatadeportugal.pt/"
    }
  ]
}

Example Advanced Request - Image Search

Search for images related with the keyword Obama from the website nytimes.com. Return all response fields

https://arquivo.pt/imagesearch?q=Obama&siteSearch=nytimes.com&offset=0&maxItems=50&safeSearch=on&more=imgDigest,pageProtocol,pageHost,pageImages,safe&size=all&prettyPrint=true

Example Advanced Response - Image Search

{
  "serviceName": "Arquivo.pt - image search service.",
  "linkToService": "https://arquivo.pt/images.jsp",
  "linkToDocumentation": "https://github.com/arquivo/pwa-technologies/wiki/ImageSearch-API-v1-(beta)",
  "linkToMoreFields": "https://arquivo.pt/imagesearch?q=Obama&siteSearch=nytimes.com&offset=0&maxItems=50&safeSearch=on&size=all&prettyPrint=true&more=pageHost,matchingImages,safe",
  "nextPage": "https://arquivo.pt/imagesearch?q=Obama&siteSearch=nytimes.com&maxItems=50&safeSearch=on&more=imgDigest,pageProtocol,pageHost,pageImages,safe&size=all&prettyPrint=true&offset=10",
  "previousPage": "https://arquivo.pt/imagesearch?q=Obama&siteSearch=nytimes.com&maxItems=50&safeSearch=on&more=imgDigest,pageProtocol,pageHost,pageImages,safe&size=all&prettyPrint=true&offset=0",
  "totalItems": 10,
  "numberOfResponseItems": 10,
  "offset": 0,
  "responseItems": [
    {
      "pageImages": 95,
      "pageTstamp": "20091004042115",
      "safe": 0.99813277,
      "pageHost": "nytimes.com",
      "imgWidth": 336,
      "imgMimeType": "image/gif",
      "imgDigest": "dcd9938b79322426dbf498ce803505af71d179c86d1613b1ce18b7ee2e6d279b",
      "imgTstamp": "20091002204117",
      "imgSrc": "http://graphics8.nytimes.com/adx/images/ADS/20/98/ad.209878/NYTKN_FLM_FALL_336x79.gif",
      "pageURL": "http://nytimes.com/ref/arts/television/tv-upfronts-journal.html",
      "pageTitle": "The New York Times > Arts > Television > Upfronts Journal: Virginia Heffernan at the Television Upfronts",
      "imgHeight": 79,
      "imgCaption": [
        "Advertisement",
        "MOST POPULAR E-Mailed Blogged Searched Personal Health: From Birth, Engage Your Child With Talk Op-Ed Columnist: Where Did\n» september 4, 2009 polanski health care china obama modern love education iran william safire g20 Go to Complete List »",
        "More Articles in Arts » MOST POPULAR E-Mailed Blogged Searched When the Icing on the Cake Spells Disaster Op-Ed Contributor:\n1, 2009 health care obama china immigration education swine flu modern love krugman Go to Complete List » Advertisements"
      ],
      "collection": [
        "AWP5"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20091002204117im_/http://graphics8.nytimes.com/adx/images/ADS/20/98/ad.209878/NYTKN_FLM_FALL_336x79.gif",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20091004042115/http://nytimes.com/ref/arts/television/tv-upfronts-journal.html"
    },
    {
      "pageImages": 10,
      "pageTstamp": "20091004183625",
      "safe": 0.9885524,
      "pageHost": "nytimes.com",
      "imgWidth": 336,
      "imgMimeType": "image/jpeg",
      "imgDigest": "edc4d442d052bb76a59dff5b4ef75db1a7b4ba89f20966c0a027e838b31db79d",
      "imgTstamp": "20091002202227",
      "imgSrc": "http://graphics8.nytimes.com/adx/images/ADS/21/12/ad.211246/did_you_know_seattle_homeless.jpg",
      "pageURL": "http://nytimes.com/2004/02/22/international/middleeast/22LOUI.html?pagewanted=1",
      "pageTitle": "Mock Village Helps Troops Learn Skills for Iraq Duty - The New York Times",
      "imgHeight": 79,
      "imgCaption": [
        "MOST POPULAR E-Mailed Blogged Searched E. Coli Path Shows Flaws in Ground Beef Inspection Understanding the Anxious Mind\n» letterman china polanski health care modern love obama september 4, 2009 iran education swine flu Go to Complete List »",
        "MOST POPULAR E-Mailed Blogged Searched E. Coli Path Shows Flaws in Ground Beef Inspection Understanding the Anxious Mind 36\n» letterman china polanski health care modern love obama september 4, 2009 iran education swine flu Go to Complete List »",
        "MOST POPULAR E-Mailed Blogged Searched Personal Health: From Birth, Engage Your Child With Talk Op-Ed Columnist: Where Did\n» september 4, 2009 polanski health care china obama modern love education iran william safire g20 Go to Complete List »",
        "MOST POPULAR E-Mailed Blogged Searched Understanding the Anxious Mind Your Money: The High Price of Being a Gay Couple The\n» letterman china polanski health care obama modern love september 4, 2009 education iran immigration Go to Complete List »"
      ],
      "collection": [
        "AWP5"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20091002202227im_/http://graphics8.nytimes.com/adx/images/ADS/21/12/ad.211246/did_you_know_seattle_homeless.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20091004183625/http://nytimes.com/2004/02/22/international/middleeast/22LOUI.html?pagewanted=1"
    },
    {
      "pageImages": 13,
      "pageTstamp": "20090725044649",
      "safe": 0.9420964,
      "pageHost": "nytimes.com",
      "imgWidth": 336,
      "imgMimeType": "image/jpeg",
      "imgDigest": "8b860a905b265e2408821962837c367698247ec96725cda78d070f7a23478a97",
      "imgTstamp": "20090520192539",
      "imgSrc": "http://graphics8.nytimes.com/adx/images/ADS/20/00/ad.200037/Static_conversations_336x79.jpg",
      "pageURL": "http://nytimes.com/2004/01/08/business/08FUND.html?hp",
      "pageTitle": "I.M.F. Says U.S. Debts Threaten World Economy - The New York Times",
      "imgHeight": 79,
      "imgCaption": [
        "MOST POPULAR - BUSINESS E-Mailed Blogged Stock Traders Find Speed Pays, in Milliseconds Mom-and-Pop Operators Turn to Social\nProtection Big Estimate, Worth Little, on Bailout ESPN Aims to Be the Home Team, All Over America Go to Complete List »",
        "What kind of Dorothy will Ashanti be? Also in Theater » Nathan Lane in \"Waiting for Godot\" Summer theater festivals Advertisements Advertise on NYTimes.com Marketplace Learn online With The Times Knowledge Network Photos, fine art, books and more."
      ],
      "collection": [
        "AWP4"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20090520192539im_/http://graphics8.nytimes.com/adx/images/ADS/20/00/ad.200037/Static_conversations_336x79.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20090725044649/http://nytimes.com/2004/01/08/business/08FUND.html?hp"
    },
    {
      "pageImages": 11,
      "pageTstamp": "20091004153100",
      "safe": 0.98628074,
      "pageHost": "nytimes.com",
      "imgWidth": 336,
      "imgMimeType": "image/jpeg",
      "imgDigest": "c5453d4db2ec08b71aa8248f256abfd35d4b5822a794b7036eb8c448fd46608d",
      "imgTstamp": "20091002204148",
      "imgSrc": "http://graphics8.nytimes.com/adx/images/ADS/21/12/ad.211227/did_you_know_cooking_show.jpg",
      "pageURL": "http://nytimes.com/2004/07/13/business/13bias.html?hp=&pagewanted=2",
      "pageTitle": "Morgan Stanley Settles Bias Suit With $54 Million - The New York Times",
      "imgHeight": 79,
      "imgCaption": [
        "MOST POPULAR - BUSINESS E-Mailed Blogged Your Money: The High Price of Being a Gay Couple Letterman Extortion Raises\nRole Diminishing NBC Plans Special Week of Coverage on Women Penske Ends Talks to Buy Saturn From G.M. Go to Complete List »",
        "MOST POPULAR E-Mailed Blogged Searched Understanding the Anxious Mind Your Money: The High Price of Being a Gay Couple The\n» letterman china polanski health care obama modern love september 4, 2009 education iran immigration Go to Complete List »"
      ],
      "collection": [
        "AWP5"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20091002204148im_/http://graphics8.nytimes.com/adx/images/ADS/21/12/ad.211227/did_you_know_cooking_show.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20091004153100/http://nytimes.com/2004/07/13/business/13bias.html?hp=&pagewanted=2"
    },
    {
      "imgDigest": "fc195b5031e0f8590d40769ad1d3299d6b6dabf11f66533f9b34b95eb0a1c49f",
      "imgSrc": "http://graphics8.nytimes.com/adx/images/ADS/19/60/ad.196085/HEALTH_about_final_336x79.jpg",
      "pageTitle": "Many Feeling Pinch After Newest Surge in U.S. Fuel Prices - The New York Times",
      "imgHeight": 79,
      "imgWidth": 336,
      "imgMimeType": "image/jpeg",
      "pageHost": "nytimes.com",
      "pageURL": "http://nytimes.com/2004/06/01/business/01PUMP.html?hp=&pagewanted=1",
      "safe": 0.9536382,
      "pageImages": 10,
      "imgTstamp": "20091002202603",
      "pageTstamp": "20091004181139",
      "imgCaption": [
        "MOST POPULAR - BUSINESS E-Mailed Blogged Your Money: The High Price of Being a Gay Couple Hollywood Hotels Are Hubs for Deal\nDenies Report on a Deal to Buy NBC Universal Serena Williams's Ad Deals Survive Her Outburst on Court Go to Complete List »",
        "MOST POPULAR - TECHNOLOGY E-Mailed Blogged ‘Clear’ Security Service May Return at Airports 5 Easy Steps to Stay Safe (and\nBack Market Share E- Records Get a Big Endorsement A Wi-Fi Alternative When the Network Gets Clogged Go to Complete List »",
        "More Articles in Books » MOST POPULAR E-Mailed Blogged Searched When the Icing on the Cake Spells Disaster Op-Ed\n1, 2009 health care obama china immigration education swine flu modern love krugman Go to Complete List » Advertisements",
        "Pogue & Friends Holiday Gifts Also in Video » Tech gadget gifts for the kitchen Tech gear for the traveler Advertisements Advertise on NYTimes.com Marketplace Donate to the Neediest Cases today. Photos, fine art, books and more."
      ],
      "collection": [
        "AWP5",
        "AWP6"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20091002202603im_/http://graphics8.nytimes.com/adx/images/ADS/19/60/ad.196085/HEALTH_about_final_336x79.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20091004181139/http://nytimes.com/2004/06/01/business/01PUMP.html?hp=&pagewanted=1"
    },
    {
      "pageImages": 11,
      "pageTstamp": "20091004190113",
      "safe": 0.99863535,
      "pageHost": "nytimes.com",
      "imgWidth": 336,
      "imgMimeType": "image/gif",
      "imgDigest": "175246805dc1b7bccebd39122c7de31082a17ec517b4bb28f4567cdaa589793b",
      "imgTstamp": "20091003065149",
      "imgSrc": "http://graphics8.nytimes.com/adx/images/ADS/20/97/ad.209787/NYTKN_JRN_FALL_336x79.gif",
      "pageURL": "http://nytimes.com/2004/07/13/business/13bias.html?hp=&pagewanted=1",
      "pageTitle": "Morgan Stanley Settles Bias Suit With $54 Million - The New York Times",
      "imgHeight": 79,
      "imgCaption": [
        "MOST POPULAR - BUSINESS E-Mailed Blogged Your Money: The High Price of Being a Gay Couple Hollywood Hotels Are Hubs for Deal\non Women Penske Ends Talks to Buy Saturn From G.M. Lewis Is Said to Be Leaving Bank of America Go to Complete List »"
      ],
      "collection": [
        "AWP5"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20091003065149im_/http://graphics8.nytimes.com/adx/images/ADS/20/97/ad.209787/NYTKN_JRN_FALL_336x79.gif",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20091004190113/http://nytimes.com/2004/07/13/business/13bias.html?hp=&pagewanted=1"
    },
    {
      "pageImages": 12,
      "pageTstamp": "20091004153436",
      "safe": 0.98248714,
      "pageHost": "nytimes.com",
      "imgWidth": 336,
      "imgMimeType": "image/jpeg",
      "imgDigest": "8713b5db9a849fd93013161c4bcd781debd06db80b1c1beafb1983f932e37b31",
      "imgTstamp": "20091002204035",
      "imgSrc": "http://graphics8.nytimes.com/adx/images/ADS/21/12/ad.211236/did_you_know_highline.jpg",
      "pageURL": "http://nytimes.com/2004/07/21/business/21military.html?hp=&pagewanted=4",
      "pageTitle": "Insurers Rely on Congress to Keep Access to G.I.'s - The New York Times",
      "imgHeight": 79,
      "imgCaption": [
        "MOST POPULAR - BUSINESS E-Mailed Blogged Your Money: The High Price of Being a Gay Couple Letterman Extortion Raises\nRole Diminishing NBC Plans Special Week of Coverage on Women Penske Ends Talks to Buy Saturn From G.M. Go to Complete List »"
      ],
      "collection": [
        "AWP5"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20091002204035im_/http://graphics8.nytimes.com/adx/images/ADS/21/12/ad.211236/did_you_know_highline.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20091004153436/http://nytimes.com/2004/07/21/business/21military.html?hp=&pagewanted=4"
    },
    {
      "pageImages": 12,
      "pageTstamp": "20091004131930",
      "safe": 0.9972118,
      "pageHost": "nytimes.com",
      "imgWidth": 336,
      "imgMimeType": "image/jpeg",
      "imgDigest": "1f8d25f4da8f66daeab40f66cc784fde5a68a2151c01d7516f7c3c19acff00be",
      "imgTstamp": "20091002204136",
      "imgSrc": "http://graphics8.nytimes.com/adx/images/ADS/21/12/ad.211222/did_you_know_3_year_college.jpg",
      "pageURL": "http://nytimes.com/2004/04/15/business/media/15real.html?hp=&pagewanted=all",
      "pageTitle": "RealNetworks Seeks a Musical Alliance With Apple - The New York Times",
      "imgHeight": 79,
      "imgCaption": [
        "MOST POPULAR E-Mailed Blogged Searched Understanding the Anxious Mind Your Money: The High Price of Being a Gay Couple Op-Ed\n» letterman china polanski health care obama modern love september 4, 2009 education iran immigration Go to Complete List »"
      ],
      "collection": [
        "AWP5"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20091002204136im_/http://graphics8.nytimes.com/adx/images/ADS/21/12/ad.211222/did_you_know_3_year_college.jpg",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20091004131930/http://nytimes.com/2004/04/15/business/media/15real.html?hp=&pagewanted=all"
    },
    {
      "pageImages": 140,
      "pageTstamp": "20091004041053",
      "safe": 0.9983499,
      "pageHost": "nytimes.com",
      "imgWidth": 336,
      "imgMimeType": "image/gif",
      "imgDigest": "3b265b19b29cf64319be992b02b61e04f732aa3084efe427535a7faca81385e4",
      "imgTstamp": "20091002203951",
      "imgSrc": "http://graphics8.nytimes.com/adx/images/ADS/20/81/ad.208132/IHT2918_336x79_oil.gif",
      "pageURL": "http://nytimes.com/ref/arts/television/20030319talks-obrien.html?8hpib",
      "pageTitle": "A TimesTalks Event: Conan O'Brien",
      "imgHeight": 79,
      "imgCaption": [
        "In Five Years, a Nobody Becomes Somebody (September 26, 1998) Review/Television: A Self-Mocking Newcomer to Late-Night\nIs He? (April 28, 1993) Track news that interests you. Create Your Own | Manage Alerts Take a Tour Sign Up for Newsletters",
        "MOST POPULAR - BUSINESS E-Mailed Blogged Your Money: The High Price of Being a Gay Couple Hollywood Hotels Are Hubs for Deal\nDenies Report on a Deal to Buy NBC Universal Serena Williams's Ad Deals Survive Her Outburst on Court Go to Complete List »"
      ],
      "collection": [
        "AWP5"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20091002203951im_/http://graphics8.nytimes.com/adx/images/ADS/20/81/ad.208132/IHT2918_336x79_oil.gif",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20091004041053/http://nytimes.com/ref/arts/television/20030319talks-obrien.html?8hpib"
    },
    {
      "imgDigest": "8933865c8d168c93b2dc7c7e89a593a97d8922280af014bb8db7a8eca526a4ca",
      "imgSrc": "http://graphics8.nytimes.com/adx/images/ADS/20/67/ad.206741/090975TR_quotes_120x90.gif",
      "pageTitle": "Arts - Art & Design - The New York Times",
      "imgHeight": 90,
      "imgWidth": 120,
      "imgMimeType": "image/gif",
      "pageHost": "nytimes.com",
      "pageURL": "http://nytimes.com/pages/arts/design/index.html",
      "safe": 0.9932687,
      "pageImages": 72,
      "imgTstamp": "20091002171324",
      "pageTstamp": "20091004034352",
      "imgCaption": [
        "Auctions: How Beverly Sills Lived, Report Cards to Minks October 2, 2009 Ransom Note Found After Millions in Artwork Stolen\nA Special Section » Opinion Abstract City The illustrator Christoph Niemann gives his visual take on the city he calls home.",
        "Help Books F.A.Q."
      ],
      "collection": [
        "AWP5",
        "AWP6"
      ],
      "imgLinkToArchive": "https://arquivo.pt/wayback/20091002171324im_/http://graphics8.nytimes.com/adx/images/ADS/20/67/ad.206741/090975TR_quotes_120x90.gif",
      "pageLinkToArchive": "https://arquivo.pt/wayback/20091004034352/http://nytimes.com/pages/arts/design/index.html"
    }
  ]
}

REST from JavaScript

You can invoke the JSON ImageSearch 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 10 results for the query 'Lionel Messi':

<html>
  <head>
    <title>JSON ImageSearch API Example</title>
  </head>
  <body>
    <div id="content"></div>
    <script>
    function hndlr(response) {
      	for (var i = 0; i < response.responseItems.length; i++) {

        	var item = response.responseItems[i];
        	document.getElementById("content").innerHTML += "<a  class=\"center\" href=\""+item.pageLinkToArchive+"\">"+
          "<img class=\"center\" src=\""+item.imgLinkToArchive+"\"/></a>"+
          "<p class=\"center\"> "+item.imgTstamp.toString().substr(0,4)+"</p><br/>";

      	}
    }
    </script>
    <script src="https://arquivo.pt/imagesearch?q=Lionel%20Messi&from=19960101000000&to=20171022163016&maxItems=10&offset=0&callback=hndlr">
    </script>
  </body>
<style>
.center{
  width: 200px;
  display: block;
  margin-left: auto;
  margin-right: auto;  
  text-align: center
}
</style>  
</html>