Skip to content

ZXInfo API v3 documentation

Thomas Heckmann edited this page Feb 9, 2021 · 8 revisions

Common parameters

The following parameters are shared by several endpoints: mode, size, offset and sort.

If not supplied, they defaults to the following:

  • mode = 'compact'
  • offset = 0
  • size = 25
  • sort = 'rel_desc'

The 'offset' parameter

Use 'offset' to specify from which offset (or page) the API should return items. First page is always offset=0. If the special input 'random' is used, a set of random items from the overall search result are returned. Use 'size' to control number of random items to return. Not all endpoint supports random - check documentation.

The 'size' parameter

Use 'size' to specify how many items pr. page, the API will then return up to this number of items. Using 'size' and 'offset' together can be used to implement paging or endless scrolling.

The 'sort' parameter

Use 'sort' to specify how the returned items should be sorted, using one of the following values:

  • 'title_asc' or 'title_desc' (sort by title)
  • 'date_asc' or 'date_desc' (sort by release date)
  • 'rel_asc' or 'rel_desc' (sort by relevance score)

The 'mode' parameter

Use 'mode' to specify the detail level for the output, using one of the following values:

  • 'full' - full JSON output
  • 'compact' - subset, suitable for creating overview pages
  • 'tiny' - small subset

The 'output' parameter

Use 'output' parameter to specify special output:

  • 'simple' - simple {id, title} output
  • 'flat' - flatten output

Special constants

Some constants can be used to simplify the request URL, instead of multiple &param=val1&param=val2&param=val3

machinetype

The following constants are available:

  • ZXSPECTRUM - All ZX Spectrum variants
  • ZX81 - All ZX81 variants
  • PENTAGON - All Pentagon/Scorpion

genretype

The following constants are available:

  • GAMES - All genres classified as games