---
date: "2013-07-03T17:00:00Z"
title: Magic Seaweed's Awesome New API
description: "Making use of the Magic Seaweed web API for surf data"
tags: [project, android, technology]
---

Back in March, I emailed [Magic Seaweed](http://magicseaweed.com) to ask them if they had a public API for their surf forecast data. They responded that they didn't at the time, but that it was certainly on their to-do list. I am interested in the marine data for my [Gower Tides](https://play.google.com/store/apps/details?id=net.willwebberley.gowertides) application.

Yesterday, I visited their website to have a look at the surf reports and some photos, when I noticed the presence of a [Developer](http://magicseaweed.com/developer/api) link in the footer of the site. It linked to pages about their new API, with an overview describing exactly what I wanted.

Since the API is currently in beta, I emailed them requesting a key, which they were quick to respond with and helpfully included some further example request usages. They currently do not have any strict rate limits in place, but instead have a few [fair practice terms](http://magicseaweed.com/developer/terms-and-conditions) to discourage developers from going a bit trigger happy on API requests. They also request that you use a hyperlinked logo to accredit the data back to them. Due to caching, I will not have to make too many requests (since the application will preserve 'stale' data for 30 minutes before refreshing from Magic Seaweed, when requested), so hopefully that will keep the app's footprint down.

I have written the app's new [backend support](https://github.com/willwebberley/GowerTidesBackend) for handling and caching the surf data ready for incorporating into the Android app soon. So far, the experience has been really good, with the API responding with lots of detailed information - almost matching the data behind their own [surf forecasts](http://magicseaweed.com/Llangennith-Rhossili-Surf-Report/32/). Hopefully they won't remove any of the features when they properly release it!
