integrations.sh
← all integrations

Spinitron v2 API

OpenAPI apis-guru media

Notes

Tutorial demo using this API is at . For web integration using iframes and/or JavaScript instead of an API, see .

Your API key is found in the Spinitron web app. Log in to Spinitron and go to Automation & API in the Admin menu.

Authenticate by presenting your API key using either HTTP Bearer Authorization (preferred)

curl -H 'Authorization: Bearer YOURAPIKEY' 'https://spinitron.com/api/spins'

or in the query parameter access-token (less secure owing to webserver log files)

curl 'https://spinitron.com/api/spins?access-token=YOURAPIKEY'

Limit per page of results is 20 by default and miximally 200.

Try it out below works to generate example cURL requests but not to get responses from Spinitron. We do not accept queries sent from web browsers. Copy-paste the cURL commands and run them from your computer.

Cache the data you get from the API if you are using it in web or mobile integration. It's not ok to query the API on every page request you serve. The shows how easy it can be to implement a file cache.

An extension to this API with access to all stations for partner applications is available. Contact us.

Homepage
https://api.apis.guru/v2/specs/spinitron.com/1.0.0.json
Provider
spinitron.com
OpenAPI version
3.0.0
Spec (JSON)
https://api.apis.guru/v2/specs/spinitron.com/1.0.0/openapi.json
Spec (YAML)
https://api.apis.guru/v2/specs/spinitron.com/1.0.0/openapi.yaml

Tools (11)

Extracted live via the executor SDK.

  • persona.getPersonas

    Get Personas

  • persona.getPersonasId

    Get Persona by id

  • playlist.getPlaylists

    Get Playlists optionally filtered by a datetime range. Only past Playlists will be returned (with allowed tolerance equals 1 hour in future).

    Ordered chronologically from newest to oldest.

  • playlist.getPlaylistsId

    The response object represents the playlist specified by {id}.

    Status 404 is returned if a playlist with {id} does not exist or if it does but starts in the future (with allowed tolerance equals 1 hour in future).

  • show.getShows

    Terminology: Spinitron defines a show as a radio program. A show can have one or more schedules, each of which may specify either an occurence or a repetition, which represents a set of occurences. Thus scheduled shows have occurences that, for example, may be displayed in a calendar.

    In the response, items is an array of objects representing occurences of scheduled shows.

    You may optionally filter items to a datetime range by including in the request {start} and/or {end} parameters, both of which must be no more than one hour in the past. An occurence starting at {end} is included in the reponse.

    itmes can include occurences that begin or end within the filter range. A show that goes on air before {start} appears in items if it ends after but not at {start}. An occurence starting at or before {end} is included.

    If the request omits the {start} parameter, the server sets its value to the current time so that the filter range's start is always defined. If the request specifies {end} then the requested range is bounded, otherwise it is unbounded.

    For a bounded request, items includes every occurence of all shows occuring in the range. The only difference between objects in items representing a given show will be the start field value.

    For an unbounded request, items includes only one occurence per show, specifically, the next occurrence after {start} of all shows occuring after {start}.

    Use an unbounded request to get a straight list all shows. Use a bounded request to get a calendar/agenda of shows expanded into occurrences by thir shedules and repetitions.

    Objects in items are ordered first by datetime and then by id.

  • show.getShowsId

    The response object represents the next occurence of the show specified by {id}.

    Status 404 is returned if a show with {id} does not exist or if it does but all its scheduled occurences elapsed in the past.

  • spin.getSpins

    Get Spins optionally filtered by a datetime range. Only past Spins will be returned.

  • spin.getSpinsId

    Get a Spin by id

  • spin.postSpins

    An endpoint for automation systems to log spins into the spin table.

  • openapi.previewSpec

    Preview an OpenAPI document before adding it as a source

  • openapi.addSource

    Add an OpenAPI source and register its operations as tools