WelshGigs APIs

WelshGigs has launched APIs to get data from the WG-DB. They will include gigs, bands, venues and practice rooms. Data will be supplied in JSON format. You will need to sign up to the site to access the data.

Gigs

A gigs API request is an HTTP URL of the following form:
http://www.welshgigs.com/api/getgigs.php?parameters

Request Parameters

Certain parameters are required while others are optional. As is standard in URLs, all parameters are separated using the ampersand (&) character. The list of parameters and their possible values are enumerated below.

The Directions API defines a directions request using the following URL parameters:

userId (required) Your user ID - This can be found at myWG
userPass (required) Your password used to sign in to WelshGigs
startDate (required) The date (in YYYY-MM-DD format) where you would like to start calling gigs (inclusive). Use CURDATE to start from today
endDate (optional) The date (in YYYY-MM-DD format) to stop calling gigs (inclusive). Leave blank to list all gigs
limit (optional) Limit the number of gigs called
bandId (optional) Return only the gigs that contain a specific band
type (optional) Default is JSON. But use type=xml to use as an RSS feed

Examples

To show all gigs from today (CURDATE) with no end:
http://www.welshgigs.com/api/getgigs.php?userId=xxx&userPass=xxx&startDate=CURDATE
To show all gigs between 1 Jan 2010 and 30 Feb 2010 :
http://www.welshgigs.com/api/getgigs.php?userId=xxx&userPass=xxx&startDate=2010-01-01&endDate=2010-02-30
To show the next 10 gigs from today:
http://www.welshgigs.com/api/getgigs.php?userId=xxx&userPass=xxx&startDate=CURDATE&limit=10
The JSON output will look like the example below. When decoded you will have a 2 level array starting [0] to the number of events found. inside the top array you wil have the data as described below:

Venues

A gigs API request is an HTTP URL of the following form:
http://www.welshgigs.com/api/getvenues.php?parameters

Request Parameters

Certain parameters are required while others are optional. As is standard in URLs, all parameters are separated using the ampersand (&) character. The list of parameters and their possible values are enumerated below.

The Directions API defines a directions request using the following URL parameters:

userId (required) Your user ID - This can be found at myWG
userPass (required) Your password used to sign in to WelshGigs
venueId (optional) The unique venue id (can be found on the url of the WG venue page)
venueName (optional) Venue name (or part name)
venueCounty (optional) Venue county (ie. cardiff)
venuePostcode (optional) Venue postcode (or part). ie. you can use CF1 to search all of CF1 to CF19
limit (optional) Limit the number of venues called

Examples

To show a single venue using the unique id:
http://www.welshgigs.com/api/getvenues.php?userId=xxx&userPass=xxx&venueId=1
To show all venues with a CF1 postcode:
http://www.welshgigs.com/api/getvenues.php?userId=xxx&userPass=xxx&venuePostcode=cf1
To show all venues with bar in the name:
http://www.welshgigs.com/api/getvenues.php?userId=xxx&userPass=xxx&venueName=bar
The JSON output will look like the example below. When decoded you will have a 2 level array starting [0] to the number of events found. inside the top array you wil have the data as described below:

Other APIs

More APIs will be added over the next few weeks. including bands and practice room URLs. Please get in touch with any problems or suggestions.
WelshGigs on Twitter WelshGigs on Facebook
gigs| bands| guides| djs| venues| rooms| promoters| news| myWG| api| photos| sound hire| silent disco

WelshGigs: Supporting live music in Wales helping bands, promoters, venues and everyone intrested in the Welsh music scene. Welsh music news stories taken from the BBC Wales Music blog. We do not take responsibility for the information on this site. Please always check before you travel!

log in here   |   sign up here