ZXDB for Spectrum Next

This is an extremely simple API service for use with the ZX Spectrum Next. If offers ZXDB search and download functionality.

This service is intentionally non-SSL to allow for the ZX Spectrum Next to process the requests.

API

All requests are GET based.

If processing on a Spectrum Next, you will need to pass the HTTP response headers, you can either wait for a blank line (as per HTTP specification to represent the start of the body) or curl and count the headers you need to skip. Current this code is hosted on Heroku so the headers shouldn't change in the foreseeable future - but this is not a given.

GET /?s=SEARCHTERM

Searches for an entity based on a starts with query. Returns a list of encoded results.

Note on spaces: if the search term includes spaces, to reduce encoding requirements, spaces are represented with a * character. So "manic miner" is manic*miner.

URL structure

http://zxdb.remysharp.com/?s=manic*miner

Example of result

18838^Manic Miner^ManicMiner.tzx^1983
18839^Manic Miner^ManicMiner(different).tzx^1983
18840^Manic Miner^ManicMiner.tap^1983
18841^Manic Miner^ManicMiner(MastertronicAddedDimension).tzx^1983
18842^Manic Miner^ManicMiner(SoftwareProjectsLtd).tzx^1983
18843^Manic Miner^ManicMiner(SoftwareProjectsLtd).tap^1983
18844^Manic Miner^ManicMiner(Ventamatic).tzx^1984
18864^Manic Miner 2^ManicMiner2.tzx^1985
18865^Manic Miner 2^ManicMiner2.tap^1985
18868^Manic Miner 3: Tales from a Parallel Universe^ManicMiner3-TalesFromAParallelUniverse.tzx^1996

Data structure explained

The fields are separated by the ^ character and rows are terminated by \n

The fields are:

The id is needed to download a file.

GET /get/ID

Returns a binary stream with Transfer-Encoding: chunked for the given file id. The file format will be the type associated with the particular ID.

URL structure

http://zxdb.remysharp.com/get/18840

Open source and built by Remy Sharp