Bookmark the Real World. flagr landscape
Share cool places from online or right from your mobile phone! Sign up for a free account or Sign in

Contents:

Flag Search Flag Retrieval Flag Creation

documentation Flagr API Documentation

The Flagr API allows for the search, retrieval and creation of flags. It is freely available to use for non-commercial purposes. Additionally, all use of the data must acknowledge Flagr as the source. If you have any questions about this policy please do not hesistate to contact .

The Flagr API is a truly REST based API. In that spirit we strongly encourage you to specify 'application/xml' as the only MIME type in your HTTP "Accept" header. This will allow for tighter integration in the future. Now on to the good stuff.


Flag Retrieval

Request Method / URL: GET http://www.flagr.com/api/flags/<flag_id> Sample XML Response:

Flag Creation

Adding a flag is little more complicated than the other operations. HTTP basic authentication is used to authenticate the session. Simply use your Flagr username and password and you should be all set.

Additionally, either an address or both a longitude and a latitude are required to create a flag. If the address can not be geocoded or the longitude and latitude are not valid, an xml response will be returned alerting you to the fact. Your flag will not be created until the problem is corrected.

Note: Please use https to add flags as it ensures that the user's password is protected.

Request Method / URL: POST https://www.flagr.com/api/flags/
Parameters:
  • latitude - float (≥ -180 and ≤ 180) - the latitude of the new flag.
  • longitude - float (≥ -180 and ≤ 180) - the longitude of the new flag
  • address - string - a string representing the address of the new flag.
  • title - string (optional) - the title of the new flag.
  • description - string (optional) - the description of the new flag.
  • tags - string (optional) - a string of space seperated tags for the new flag.
  • photo_url - string (optional) - the url of an image to attach to the flag. The image must be smaller than 2 MB.