Skip to content
Thomas Egense edited this page Apr 14, 2026 · 147 revisions

SolrWayback API with examples

Overview

This documentation covers the REST API endpoints provided by the SolrWaybackResource and SolrWaybackResourceWeb classes in the dk.kb.netarchivesuite.solrwayback.service package. The classes serves as a JAX-RS resource for interacting with archived web content, search results, exports, and related functionalities in the SolrWayback system.

SolrWayback has two different webservice endpoints. (here with default local Tomcat port 8080 installation)

The /services endpoint the primary backend for playback,export data etc.

The /services/frontend has most of the methods used by the VUE frontend for searching and tools used in the GUI.

Methods under each endpoints will be listed in the two tables below. Clicking the method will jump to a detailed description with examples for that method.

Service methods for /services

Method Description Payload
/warc/header/ Load the WARC-header and HTTP header for a record text
/web/{path:.+} Playback Playback
/lenient/web/{path:.+} Lenient playback (fuzzy match) Playback
/statistics/domain Various collection statistics for a domain JSON
/image Load image from warc file and scale (for thumbnail etc.) PNG
/downloadRaw Returns the binary payload Original MIME type
/export/linkgraph Export linkgraph for query CSV (Gephi format)
/export/warc Export all records from a query to warc-file warc/warc.gz
/export/warcExpanded Export all records from a query to warc-file include HTML page resources warc/warc.gz
/image/pagepreview Generate a screenshot for a webpage PNG
/export/fields Export fields from a query to CVS file CSV/CVS.gz
/export/zip Export records from a query to a ZIP archive file. ZIP multifile
/getContentType Get content encoding for a record String (UTF-8) etc.

Examples

Warc header

Service path: services/warc-header

Example url:

http://localhost:8080/solrwayback/services/warc/header/?source_file_path=/warcs/test.warc.gz&offset=301937

Response:

WARC/1.0
WARC-Type: response
WARC-Target-URI: https://www.dr.dk/
WARC-Date: 2026-03-06T05:36:55Z
WARC-IP-Address: 2.23.172.130
WARC-Payload-Digest: sha1:YMNFVNV7KZSLYQVLWUN2XK32FUFKRC6Q
WARC-Record-ID: <urn:uuid:2dd9603a-3df5-4401-aec3-47847e34ba94>
Content-Type: application/http; msgtype=response
Content-Length: 1186938

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xxs-protection: 1; mode=block
Content-Security-Policy: default-src 'self';script-src 'self' 'unsafe-inline' 'unsafe-eval' https:;style-src 'self' 'unsafe-inline' https:;img-src 'self' data: https: android-webview-video-poster:;font-src 'self' data: https:;connect-src 'self' https: wss: blob: android-webview-video-poster:;manifest-src 'self' blob:;media-src 'self' data: https: blob:;object-src 'none';child-src 'self' https: data: blob:;form-action 'self' https:
ETag: "149yn558f0hpdt7"
Cache-Control: public, max-age=19
Date: Fri, 06 Mar 2026 05:36:55 GMT
Transfer-Encoding:  chunked
Connection: close
Connection: Transfer-Encoding
x-dr-appname: HYDRA
Strict-Transport-Security: max-age=31536000 ; preload

Playback

Service path: /web

Example url:

http://localhost:8080/service/web/20251029070506/https://archive.org/

Lenient playback

Service path: /lenient/web

Example url:

http://localhost:8080/services/lenient/web/20251029070506/https://archive.org/

Domain statistics

Service path: /services/statistics/domain/

Example url:

 http://localhost:8080/solrwayback/services/statistics/domain/?domain=archive.org&startdate=2010-01-01&enddate=2011-01-01&scale=YEAR
[
  {
    "date": "2010-01-01",
    "ingoingLinks": 3117,
    "sizeInKb": 12519,
    "domain": "archive.org",
    "contentTextLength": 19896,
    "totalPages": 264
  },
  {
    "date": "2011-01-01",
    "ingoingLinks": 3468,
    "sizeInKb": 27034,
    "domain": "archive.org",
    "contentTextLength": 9913,
    "totalPages": 1058
  }
]

Image

Service path: /services/image

Example url:

https://localhost:8080/solrwayback/services/image?source_file_path=/warcs/test.warc.gz&offset=914346010&height=200&width=200

Download raw

Service path: /services/downloadRaw

Example url:

http://localhost:8080/solrwayback/services/downloadRaw?source_file_path=/warcs/test.warc.gz&offset=914346010

Export linkgraph

Service path: /export/linkgraph

Example url:

http://localhost:8080/solrwayback/services/export/linkgraph?query=cats AND dogs

Export warc

ServicePath: /export/warc

Example url:

http://localhost:8080/solrwayback/services/export/warc?query=cats AND dogs AND funny

Export warc expanded

ServicePath: /export/warcExpanded

Example url:

https://localhost:8080/solrwayback/services/exportExpanded/warc?query=cats AND dogs AND funny

Image Pagepreview

ServicePath: /image/pagepreview

Example url:

http://localhost:8080/solrwayback/services/image/pagepreview?source_file_path=/warcs/test.warc.gz&offset=914346010

Export fields

ServicePath: /export/fields Example url:

http://localhost:8080/solrwayback/services/export/fields?query=cats AND dogs AND funny&fields=id,index_time,author,description,keywords,description,license_url,content,content_encoding&flatten=false&format=csv&gzip=false

Export zip

ServicePath: /export/zip Example url:

https://solrwb-liveqa.kb.dk:4000/solrwayback/services/export/zip?query=cats AND dogs AND funny

Get content type

ServicePath: /getContentType Example url:

http://localhost:8080/solrwayback/services/image/getEncoding?source_file_path=/warcs/test.warc.gz&offset=914346010

Clone this wiki locally