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 Search
Request Method / URL: GET http://www.flagr.com/api/flags/- min_lat - float (≥ -180 and ≤ 180) - minimum latitude
- min_lng - float (≥ -180 and ≤ 180) - minimum longitude
- max_lat - float (≥ -180 and ≤ 180) - maximum latitude
- max_lng - float (≥ -180 and ≤ 180) - maximum longitude
- query - string - string to search title, description, and tags
- count - integer (≥ 0 and ≤ 100) - number of results
- user - string (length ≥ 0 and ≤ 17) - return flags from the specified user
- NEW!map_id - integer - return flags from the specified map
Note: if you wish to search an area, the minimum and maximum must be expressed for both longitude and latitude. Otherwise no restriction on location is made.
Sample XML Response: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.
- 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.

realized with 

