The Quaddicted API v1

The database is now powered by a read-only solr API, which you are also invited to use, at https://www.quaddicted.com/api/v1/

It is not optimized yet and will probably go through at least some changes over the time. Your input is highly appreciated if anything is weird, suboptimal, unreliable etc. Currently it is probably full of mistakes and bugs :grimacing:

If you have great ideas for specific tools but this API does not cut it, let’s collaborate?

Usage

Any tools, engines, etc. that used the old Quake Injector XML file or the recent api.quaddicted.com endpoint should switch to this API. The old endpoints will receive no updates and will most likely disappear at some point in the future (unless someone volunteers to maintain them).

Any third-party thing build on this must credit Quaddicted prominently so that there can be zero confusion for users on the provenience of the data. If this is an issue for you, just ask and we’ll find a solution! Just don’t be a grifting leecher.

Technical information

Some parameters to tune the response are passed straight to solr:

  • q: The query. Make sure you URL encode the payload. I think there are still some bugs around encoding, so if you get stuck, get into contact sooner than later!

  • fl: A comma-separated list of fields to return, e.g. fl=sha256,tags,install. This allows to ignore the huge amount of data transferred when files is included. By default sha256,tags,urls,notes,bytes,description,install,files are returned. Please try to restrict this to just the fields you need.

  • rows: The number of rows to fetch, e.g. rows=100. By default all rows are returned.

  • start: The start index of the first row to return, e.g. start=234. By default it starts at 0. Can be combined with rows to get pagination.

  • sort: The field and order to sort by, e.g. sort=sha256+ASC or sort=release_date_dt+DESC. By default results are sorted by release date, newest first.

You can combine + (currently needs to be encoded as %2B…) and -:

Some fields from the tags are promoted to ā€œtop-levelā€ keys, so you can search e.g. for authors like this:

Another promoted tag is the release date:

  • release_date is a solr.DateRangeField field that is not returned but can be used for querying.
  • release_date_dt is a solr.DatePointField field that is not returned but can be used for querying and sorting.

With that you can do stuff like:

To get everything:

But you should probably filter to +game=quake, +game_mode=singleplayer at least, unless you want surprises in the future.

I have to document the fields which are available for querying in solr but not returned in the response some time later.

There is no indicator on the total number of available results yet, so pagination is guesswork. Suggestions how to integrate that into the JSON are welcome!


Massive thanks to @JohnNy_cz and @rj for some great collaboration around this in the past weeks.

If you find any security issues with this, mail me and you will get a sweet reward.

3 Likes

Just a heads up, don’t have version numbers in your API if you’re going to break things. You’ve made a couple breaking changes, which make it hard to support Quaddicted.

I accidentally changed the files data without bumping the API, sorry about that. :\ Anything else I missed? Best follow the beta test forum closely if you rely on anything on the site.

It looks like zipbasedir was removed across the board, or at least I can’t find any packages that have it included.

Edit: I found it on an AD map, but it does seem like it’s been removed from some packages.

1 Like

That info is going to be removed completely soon as it is only works for well packaged maps/mods.

Currently the future is supposed to be the install -> extractmapping data where any file moves, renames or skips can be defined.

Sorry for breaking things without much notice! But there was virtually no interest by others in better data structures for many years and now that we got some momentum, I want to keep going as fast as possible towards a good system.

Be aware that the tags are meant to be really quite dynamic and in the hands of the community.

Can the enumeration of pak file contents be re-added? It’s important for map discovery when there’s not a startmap defined in the tags.

Oh definitely! I forgot I had all that data extracted originally. The detour with the changed files format was a mistake.
Will add the data back tonight or tomorrow. Thanks for the reminder!

They should be back via this PR!

Planned upcoming changes are:

  • Removing the unneeded {base} prefixes from install->extract/extractmapping entries
  • Dropping the zipbasedir tag because it is superseded by install->extract

I do not plan to bump the API version for those, unless people tell me it would be necessary.

I have now disabled updates to the database that powers api.quaddicted.com so there will be no updates anymore.

That old API will be shut down soon. Make sure to use the new API introduced above in this thread.