My Opera APIs

My Opera APIs can be used for blogging and embedding content.

We currently support two APIs: OEMbed and Movable Type API. You can read more about these APIs below. Keep checking this page for new articles and updates.

What is an API? Wikipedia writes:

An application programming interface (API) is a set of routines, data structures, object classes and/or protocols provided by libraries and/or operating system services in order to support the building of applications.


Share

You can add a 'Share' button on your external sites to let your visitors share your content on My Opera.

Choose your button layout

OEmbed

You can embed photos and other My Opera content like avatars from external sites using OEmbed.

The API uses "JSON" (or XML) as an interchange format. The request and response types are fairly simple and straightforward. An OEmbed request has the following structure:

http://my.opera.com/service/oembed?url=<some_url>&format=json

The format is JSON by default and can be omitted. A sample request to fetch information about a photo album on My Opera looks like this:

http://my.opera.com/service/oembed/?url=http%3A%2F%2Fmy.opera.com%2Fcstrep%2Falbums%2Fshow.dml?id%3D504322

This is one of of the My Opera team members photo album. The output is:

{
  "author_name" : "cstrep",
  "provider_name" : "My Opera Community",
  "images" : {
      "image" : [
        "http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964560",
        "http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964559",
        "http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964556",
        "http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964558",
        "http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964531",
        "http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964554",
        "http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964557",
        "http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964555"
      ]
  },
  "author_url" : "http://my.opera.com/cstrep/",
  "provider_url" : "http://my.opera.com/",
  "version" : "1.0",
  "type" : "link",
  "title" : "Italian Day"
}

If you have problems displaying JSON code and you're faced with a download instead try to instruct your browser to open application/json mimetype directly. In Opera, go to ToolsPreferences. Click on the Advanced tab → then Downloads to the left. You will now see all the special mimetypes. Click on "Add", and insert "application/json" as mimetype and tell Opera to open it directly.

You can also recursively request information about a single picture, using:

http://my.opera.com/service/oembed?url=http%3A%2F%2Fmy.opera.com%2Fcstrep%2Falbums%2Fshowpic.dml%3Falbum%3D504322%26picture%3D6964560

The result is:

{
  "width" : "2080",
  "author_name" : "cstrep",
  "provider_name" : "My Opera Community",
  "author_url" : "http://my.opera.com/cstrep/",
  "provider_url" : "http://my.opera.com/",
  "version" : "1.0",
  "height" : "1544",
  "url" : "http://files.myopera.com/cstrep/albums/504322/100_2450.jpg",
  "title" : "Giardinelli Beach. Sardinia.",
  "type" : "photo"
}

The implementation of OEmbed is generic and open.

http://my.opera.com/service/oembed?url=http%3A%2F%2Fmy.opera.com%2Fcstrep%2Favatar.pl

If you prefer the format in xml instead, you can append the format=xml argument to the URL, like in the following example:

http://my.opera.com/service/oembed?format=xml&url=http%3A%2F%2Fmy.opera.com%2Fcstrep%2Favatar.pl

Note: Not everything is accessible. Private photo albums will still remain private. The idea with using OEmbed is to share content, just like a social networking service should be.


Movable Type API

Not everyone prefers to write their blog in a Web browser, and quite a few specialised clients have been made to post content to blogs, using one or more of the APIs that exist for the purpose.

My Opera supports most of the Movable Type API, which also includes elements from the Blogger API and the MetaWeblog API. To aid tools in figuring out that we have this support, we also support the Really Simple Discovery specification.

To get an overview of the URL to use for the API, after your username add:

/xml/rsd

The URL to use for the API is:

http://my.opera.com/<username>/blog/api/

This feature may be a little rough around the edges, but we think it will get the job done, so feel free to experiment and have fun with it.

Download Opera - Surf the Web with lightning speed, using the fastest browser ever.