Lomography API
This is our API. It is still beta (but tested), only available for non-commercial use and you need an API key to access it – to get one, please write us an email.
Authentication
You need a key to access our API.
$ curl http://api.lomography.com/v1/photos/recent?api_key=XXXXXX
Pagination
Add the parameter page to every request to access further pages. We return 20 photos per page.
$ curl http://api.lomography.com/v1/photos/popular?page=2
Response
This is how a typical response will look like. For every photo you will get two assets: small (with an inner bounding box of 96 × 64 pixels – that means the image is at least this size) and large (with an outer bounding box of 576 × 576 pixels – that means the image is at most this size). Title, description, camera, film and location are optional and could be null. The user includes the username, the url to the LomoHome and (optional) an avatar (with an inner bounding box of 192 × 192 pixels).
$ curl http://api.lomography.com/v1/photos/popular?page=2&api_key=XXXXXX { "meta": { "total_entries": 20, "per_page": 20, "page": 2 }, "photos": [ { "id": 11336951, "title": "Los Angeles", "description": "All these shots were taken during a trip to Los Angeles in April 2010.", "url": "http://www.lomography.com/photos/11336951", "camera": { "id": 3314883, "name": "Lomo LC-A" }, "film": { "id": 871911028, "name": "Lomographic X-Pro Slide 100" }, "location": { "longitude": -82.4575967, "latitude": 27.1000553 }, "assets": { "small": { "url": "http://cloud.lomography.com/96/64/88/3c4c6c7e9774abdd110b45b679c1c579a42da2.jpg", "width": 96, "height": 64 }, "large": { "url": "http://cloud.lomography.com/576/386/88/3c4c6c7e9774abdd110b45b679c1c579a42da2.jpg", "width": 576, "height": 386 } }, "user": { "username": "recurving", "url": "http://www.lomography.com/homes/recurving", "avatar": { "url": "http://cloud.lomography.com/290/192/58/63307c8ed53828bd563cc08156d044de8dd93f.jpg", "width": 290, "height": 192 } } } … ] }
GET http://api.lomography.com/v1/photos/popular
This will return the most popular photos (uploaded in the last month).
$ curl http://api.lomography.com/v1/photos/popular
GET http://api.lomography.com/v1/photos/recent
This will return the most recent photos (right as they are uploaded).
$ curl http://api.lomography.com/v1/photos/recent
GET http://api.lomography.com/v1/photos/selected
This will return a handpicked collection of photos.
$ curl http://api.lomography.com/v1/photos/selected
GET http://api.lomography.com/v1/cameras
This will return the most used cameras.
$ curl http://api.lomography.com/v1/cameras { "meta": { "page": 1, "per_page": 20, "total_entries": 200, }, "cameras": [ { "id": 3314883, "name": "Lomo LC-A" } … ] }
GET http://api.lomography.com/v1/cameras/:id
This will return a single camera.
$ curl http://api.lomography.com/v1/cameras/3314883 { "id": 3314883, "name": "Lomo LC-A" }
GET http://api.lomography.com/v1/cameras/:id/photos/popular
This will return the most popular photos (uploaded in the last month) taken with that camera.
$ curl http://api.lomography.com/v1/cameras/3314883/photos/popular
GET http://api.lomography.com/v1/cameras/:id/photos/recent
This will return the most recent photos (right as they are uploaded) taken with that camera.
$ curl http://api.lomography.com/v1/cameras/3314883/photos/recent
GET http://api.lomography.com/v1/films
This will return the most used films.
$ curl http://api.lomography.com/v1/films { "meta": { "page": 1, "per_page": 20, "total_entries": 200, }, "films": [ { "id": 871911028, "name": "Lomographic X-Pro Slide 100" } … ] }
GET http://api.lomography.com/v1/films/:id
This will return a single film.
$ curl http://api.lomography.com/v1/films/871911028 { "id": 871911028, "name": "Lomographic X-Pro Slide 100" }
GET http://api.lomography.com/v1/films/:id/photos/popular
This will return the most popular photos (uploaded in the last month) taken with that film.
$ curl http://api.lomography.com/v1/films/871911028/photos/popular
GET http://api.lomography.com/v1/films/:id/photos/recent
This will return the most recent photos (right as they are uploaded) taken with that film.
$ curl http://api.lomography.com/v1/films/871911028/photos/recent
GET http://api.lomography.com/v1/location/within/:latitude_north/:longitude_east/:latitude_south/:longitude_west/photos/recent
GET http://api.lomography.com/v1/location/within/:latitude_north/:longitude_east/:latitude_south/:longitude_west/photos/popular
This will return the most popular or most recent photos within a certain bounding box. The order is latitude north, longitude west, latitude south and longitude east.
$ curl http://api.lomography.com/v1/location/within/48.1898262/16.3239505/48.1890053/16.3237948/photos/recent $ curl http://api.lomography.com/v1/location/within/48.1898262/16.3239505/48.1890053/16.3237948/photos/popular
GET http://api.lomography.com/v1/location/around/:latitude/:longitude/:radius/photos/distance
GET http://api.lomography.com/v1/location/around/:latitude/:longitude/:radius/photos/recent
GET http://api.lomography.com/v1/location/around/:latitude/:longitude/:radius/photos/popular
This will return the nearest, most popular or most recent photos within a certain radius (in km) to the origin point.
$ curl http://api.lomography.com/v1/location/around/48.1898262/16.3239505/10/photos/distance $ curl http://api.lomography.com/v1/location/around/48.1898262/16.3239505/10/photos/recent $ curl http://api.lomography.com/v1/location/around/48.1898262/16.3239505/10/photos/popular
Visit us at www.lomography.com or say hi at @lomodev