We’re happy to announce that the Groupon Public API has come out of beta and available to anybody with a Groupon user account.
All you have to do is grab an API key and agree to the terms of use. As long as you’ve been playing by the rules we’ll honor requests using that API key. We’ll also throttle the number of requests per minute, currently to 200, but we may change that.
Enough about the rules already, what you can do with the API?
First of all, the public API is used by our iPhone app, as well as some partners who have built dynamic widgets in Javascript and Flash.
Here’s what one such widget looks like, this one was built in Flash:

You may know that we offer a reward for all first-time purchases that come through a link you posted. You could use the API to put fresh deal content on your site(s), Facebook App, Smart Phone app, Social Game, kiosk, etc., tag the deal links with your referral code and watch the referral rewards roll in.
We also have a growing affiliate program, if you’re interested in applying. Another way to get the Groupon word out and earn a little money.
Of course, you may just want share a deal with your site visitors or great local content for your audience, and we’ve got plenty of that every day.
We’re excited to see what creative things people will build with the API, so if you’ve got an idea or you’ve built something cool, let us know.
We’ll also be building some more tools to help out, as well as some examples of widgets and plug-ins that use our API.
Everything you need to get started is here, but here’s the skinny:
We follow REST conventions and also allow you to choose your preferred response format by adding a suffix to the URL – .xml for XML and .json for… you guessed it: JSON. Choose your flavor.
The developer docs cover the details, but here’s an overview of the sort of things you can do with the API:
Get a list of all the divisions – cities where Groupon is currently running deals
The division list includes the name, identifier, latitude, longitude and timemzone for each one.
This is handy for creating a list for a user to choose from, or plotting the cities on the map, for example. Given a division identifier, you can then grab the deals on offer now.
Get a list of deals on offer for a given division.
Each deal has full detail about price, savings, number sold so far, expiration date… everything you see on Groupon. It also includes URLs for deal images of different sizes, URLs to link back to the deal.
Deals are listed in priority order, and the first one is the one that’s currently featured on the site in its division.
If you don’t want to code for a specific division, but want us to figure out the nearest one, we can do that, too – you have two choices:
Don’t specify a division in the request path and we’ll geo locate the nearest division based on the IP address of the caller.
This is handy if you want to render a widget, for example, that shows the deal closest to the user viewing your site. We have sites with a national presence using this now to dynamically choose the deal to show based on the current visitor’s location.
Add lat/lng parameters to the request, and we’ll find the nearest division to that location on the map and return the deals on offer there.
This can be useful if you know the location by GPS on a smart phone, for example. Our iPhone application does exactly that to show you the city that’s closest to you when you first launch it.
We’ll continue to make additions to the API over time as we add new features to Groupon, and we’ll try hard to stay backward-compatible. If we find that we have to make changes that will break current use, we have a simple provision for creating a new version and sunset old versions after a grace period.
So, let us know what you think – we look forward to your feedback and seeing what you built.
Tags: api, developers

Patrick Algrim
onApril 1, 2010 3:14 pm
Rock on Ken! I’m no developer, but I’m also really interested to see what kind of creative idea’s people may want to build out. A fantastic step forward for Groupon.
Erika Lambert
onApril 7, 2010 10:38 pm
Check out our RedCritter Groupon App for Microsoft Outlook 2007 and 2010.
http://www.redcritter.com/app.aspx?i=57