Eranio
Color theme

SpigotMC / Spiget API

Base: https://api.spiget.org/v2

SpigotMC is the oldest and largest plugin site for Bukkit-based servers, and Spiget is the free REST interface that makes its resources searchable. The plugin lists the most downloaded resources, searches by keyword, reads the versions of a resource and checks whether a direct download is possible. No API key is needed. The calls go to api.spiget.org/v2 with a timeout of at least 15 seconds.

Handler: SpigotProvider
GET /resources

List resources

Lists SpigotMC resources, sorted by downloads. This is the list the plugin shows when you open the Spigot tab without a keyword.

Parameters

Name Type Required Description
size integer No Results per page. The plugin uses the plugins-per-page setting (default 20).
page integer No Page number.
sort string No Sort field, a leading minus means descending. The plugin sends -downloads.

Response Example

[{"id":1,"name":"EssentialsX","tag":"The essential plugin","downloads":5000000,"rating":{"average":4.5},"icon":{"url":"data/resource_icons/1/1.jpg"}}]

cURL

curl "https://api.spiget.org/v2/resources?size=5&sort=-downloads"
The plugin sends sort=-downloads, size (plugins per page, default 20) and page. The minus sign in front of the field name means descending. Each item provides id, name, tag (shown as the summary), author, downloads, icon and updateDate. The update date arrives in milliseconds and is converted to a normal date. The icon path is relative and is completed with https://www.spigotmc.org/. The total number comes from the X-Total response header; if the header is missing, only the number of items on the page is known.

Internal Behavior

The timeout for Spiget is the larger of your setting PLUGINS_REQUEST_TIMEOUT (default 10 seconds) and 15 seconds. If Spiget does not answer in time, or the answer is not a JSON array, the plugin returns an empty list and the tab shows no hits. Entries without an id are dropped.
GET /search/resources/{query}

Search resources

Full-text search across SpigotMC resources by name. The keyword is part of the path.

Parameters

Name Type Required Description
query string Yes Search keyword as a path segment.
size integer No Results per page.
page integer No Page number.

Response Example

[{"id":9089,"name":"EssentialsX","tag":"The essential plugin suite","downloads":12000000,"updateDate":1700000000}]

cURL

curl "https://api.spiget.org/v2/search/resources/essentials?size=5"
The plugin trims the keyword, encodes it for the URL and appends it to /search/resources/. It sends the same size and page parameters as the list. The result has the same fields as the plain list, so the browser shows both alike. An empty result list can also mean that Spiget was too slow, check the panel log in that case.

Internal Behavior

Search results are cached for a short time by the plugin browser, so repeating the same search is quick. The Spiget version entries carry no game versions in the plugin (game_versions stays empty), so a game version filter cannot narrow the Spigot list.
GET /resources/{resourceId}

Get resource

Returns the details of a single SpigotMC resource: name, tag line, author, downloads, rating and links.

Parameters

Name Type Required Description
resourceId integer Yes Numeric SpigotMC resource ID, for example 9089.

Response Example

{"id":9089,"name":"EssentialsX","tag":"The essential plugin suite","downloads":12000000,"rating":{"average":4.8},"versions":[{"id":500000}],"premium":false}

cURL

curl "https://api.spiget.org/v2/resources/9089"
The Minecraft Plugins installer does not call this endpoint itself. It already has name, tag, author and downloads from the list or the search. The endpoint belongs to the public Spiget API and is listed here so you can look up a resource ID, for example the one stored as plugin_id in the installed plugin list. For the download the plugin uses a different route, /resources/{id}/download, which it first checks with a HEAD request.

Internal Behavior

When you install a Spigot plugin, the plugin sends a HEAD request to https://api.spiget.org/v2/resources/{id}/download. Only if the answer is successful and its Content-Type contains application/java or application/octet-stream does the plugin treat the download as direct and save the file as plugin-{id}.jar. In every other case it records that no direct download exists and points to the resource page on spigotmc.org, where you download the file by hand and upload it to the server.
GET /resources/{resourceId}/versions

Get resource versions

Lists the published versions of a SpigotMC resource, newest first.

Parameters

Name Type Required Description
resourceId integer Yes Numeric SpigotMC resource ID.
size integer No Number of versions. The plugin sends 100.

Response Example

[{"id":500000,"uuid":"abc123","name":"2.20.1","releaseDate":1700000000,"downloads":50000}]

cURL

curl "https://api.spiget.org/v2/resources/9089/versions?size=5"
The plugin requests up to 100 versions (size=100) sorted by release date descending. Each version supplies id, name and releaseDate in milliseconds. The version name is used as the version number. Spiget does not report which Minecraft versions a file supports, so the game versions of Spigot entries stay empty and no version filter can be applied. Check the resource page if you are unsure whether the newest file fits your server version.

Internal Behavior

The version list is cached by the plugin for up to one hour and the browser loads the lists of the visible plugins in parallel. Dependencies are not resolved for Spiget: the plugin returns an empty dependency list for it, so a plugin that needs another plugin has to be supplemented by hand.