ryan says

Hi everyone!

OK, well, I guess I better introduce you all to the Marketplace API .

The purpose of the API is to enable third party developers (that’s you!) to develop applications using real-time, individualised marketplace data, in a manner that doesn’t require users to compromise their accounts.

Fwoar, that’s a mouthful. So what does that mean?

Every Account now has an API Key.

The API key (which you can find by clicking on ‘Account’, then ‘Edit’ and expanding the ‘API Key’ thing), is a long, long, long and random, long password-like key. It’s what users can provide as an alternative to their password to access API data.

Users can regenerate their API key, but they can’t make up their own (we make up one with the power of computers).

The API provides various ‘sets’ of data in either JSON or XML .

We figured developers would either prefer JSON or XML , so we support these two formats. If you’re a JS or AS developer and don’t know what JSON is, it’s data that is returned as a Object Literal or a Hash. This means you can eval() the response and access it like a Hash or Object and not have to do any parsing of XML . How cool is that!

Sets of data are not locked down, and we expect to collaborate with the community on what kind of data you’d want to work with. We’ll provide some initial sets, some suggestions and go from there. This is a topic for another thread, so more on that later.

The API is ‘versioned’.

We’ve the ability to ‘version’ our API , so you’ll be able to write an application to a particular version, and be able to sleep at night knowing that it wont break 12 months down the track.

How we’re going to manage this is again, a topic for another thread, which I’ll write in like, soon!

A quick example.

The API is provided over HTTP , so it’s very easy to test and work with. The format of the API URL is the following:

http://marketplace.envato.com/api/version/username/api-key/set.format

Version the the version label, there will eventually be version 1, version 2, etc. There’ll always be an ‘edge’ version that we chop and change every so often (with the community’s feedback, of course!), and eventually freeze as a new version.

Username and API key are pretty straight forward :)

The set is the label of the particular data set you want back, and format is what data format you’d like it back in (either json or xml), so let’s have a look at my account’s vitals shall we?

Example

That is a real, working API url. You can click it, and you’ll see the JSON response in the browser. Here it is in XML format:

Example

Neat huh? Now its’ OK. I don’t mind if you can see my balance :) The API is perfectly safe and separate to the account log in process, and I’m not a real author so I have no secrets to keep :P

Here’s another example of a set (that has an array):

Example

As you can see, I’ve made a few sales of my controversial song, ‘The Clinton is a Clintonhead Song’.

Combining Sets to reduce HTTP roundtrips.

One of the coolest features of our API is the arbitrary combination of sets to reduce HTTP roundtrips. We expect we might have 30 sets of data you can ask for, and you can ask for them all in one go! We’ve only got ‘vitals’ and ‘recent-sales’ deployed right now, so lets combine them and see what we get:

Example

As you can see, we combine them with a +. And as you can see in the result, you’ve got both sets of data back in that one object literal! The same thing in XML :

Example

Where to from here?

We’ll pre-empt you and add a few more sets of data, then create another thread asking for feedback and make some suggestions of other bits of data you might want.

We’ll also start a thread documenting how you should handle errors that the API may send back to you.

So there you go! Stay tuned for the next round!

Posted 11 months ago VIA ActiveDen | Report | Permalink
6 posts
Beta Tester Bought between 1 and 9 items
dirt_burger says

What is an API ?

Posted 11 months ago VIA ActiveDen | Report | Permalink
93 posts
Exclusive Author Author was Featured Referred at least one person Sold between 10 000 and 50 000 dollars Bought between 1 and 9 items China
shuhankuang says

Cool!

Posted 11 months ago VIA ActiveDen | Report | Permalink
Japh says

Great work, Ryan! I’m really looking forward to having a play around with this and seeing what can be done…

Thanks! :)

Posted 11 months ago VIA ActiveDen | Report | Permalink
burningstonecold

burningstonecold Recent Posts
Threads Started

124 posts
Won a Competition Exclusive Author Sold between 1 and 100 dollars Bought between 10 and 49 items Australia
burningstonecold says

Excellent work Ryan and the Envato Dev team!

Would eventually be good to see a documentation site on the API .

Posted 11 months ago VIA ActiveDen | Report | Permalink
23 posts
Exclusive Author Referred at least one person Sold between 100 and 1 000 dollars Bought between 1 and 9 items Finland
Lahdekorpi says

Uuh, I can’t wait to get developing :)

Posted 11 months ago VIA ThemeForest | Report | Permalink
23 posts
Exclusive Author Referred at least one person Sold between 100 and 1 000 dollars Bought between 1 and 9 items Finland
Lahdekorpi says

Is this still disabled, mine just outputs “not_authenticated Username and/or API Key invalid.” when using my username and the generated API (tried regenerating it too)?

Posted 11 months ago VIA ThemeForest | Report | Permalink
23 posts
Exclusive Author Referred at least one person Sold between 100 and 1 000 dollars Bought between 1 and 9 items Finland
Lahdekorpi says

Hmm, and now it works with the same url, oh well…

Posted 11 months ago VIA ThemeForest | Report | Permalink
468 posts
Exclusive Author Author was Featured Referred at least one person Sold between 10 000 and 50 000 dollars Bought between 1 and 9 items India
iceonflames says

This is really awesome. Can’t wait to see all the data sets! :)

Posted 11 months ago VIA ActiveDen | Report | Permalink
144 posts
Exclusive Author Sold between 1 and 100 dollars Bought between 10 and 49 items United States
Fandomfilms says

when I click on the links it tries to download a file instead of show me the example in IE 7 .

Posted 11 months ago VIA GraphicRiver | Report | Permalink

Active Threads

Tell me what I need 1 replies, last by _freshface 34 minutes ago
Cufons and line-height 11 replies, last by _freshface 48 minutes ago
Free font list 21 replies, last by ipad 53 minutes ago
Do you plan? 8 replies, last by spencerscreative 1 hour ago
Template, H1 and google 2 replies, last by jremick 2 hours ago
Stolen HTML Template 11 replies, last by jremick 2 hours ago