Places.sg
Places.sg aggregates the flow of your information to multiple web and mobile sites, so that when you upload your information and/or promotions in one place, it gets quickly syndicated to many digital properties.
Datasets Available
| Dataset | Description | URL | Metadata |
| Places | Information of Places in Singapore | http:// api.projectnimbus.org/ placesodataservice.svc/ Places |
Click Here |
Tips
| Function | Example Link | Description |
| To search for a place via Place ID | http:// api.projectnimbus.org/ placesodataservice.svc/ Detail?ID=1 |
To search for a particular place, send a request to the link with the ID query string appended to it |
| To search for a place via Keyword found in the name | http:// api.projectnimbus.org/ placesodataservice.svc/ Search?Keyword=Restaurant |
To search for a particular place, send a request to the link with the Keyword query string appended to it |
Code Snippet
.NET (optimised for .NET 3.5/Above) – How do I access a complete list of Places (Updated 01 Nov 2010)
class Places
{
public string Id { get; set; }
public string CompanyName { get; set; }
public string Category { get; set; }
}
public List GetPlacesFromNimbus(string AccountKey, string UniqueUserID)
{
System.Net.WebRequest wr=
HttpWebRequest.Create(
"http://api.projectnimbus.org/placesodataservice.svc/Places");
wr.Headers.Add("AccountKey",AccountKey);
wr.Headers.Add("UniqueUserID",UniqueUserID);
wr.Method = "GET";
WebResponse res = wr.GetResponse();
string resStr
= new System.IO.StreamReader(res.GetResponseStream()).ReadToEnd();
XNamespace atomNS
= "http://www.w3.org/2005/Atom";
XNamespace dNS
= "http://schemas.microsoft.com/ado/2007/08/dataservices";
XNamespace mNS
= "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";
List results
= (from item in XElement.Parse(resStr).Descendants(atomNS + "entry")
let place = item.Element(atomNS + "content").Element(mNS + "properties")
select new Places() {
Id = place.Element(dNS + "id").Value,
CompanyName = place.Element(dNS + "company_name").Value,
Category = place.Element(dNS + "category").Value
}).ToList();
return results;
}
Java – How do I access a complete list of Places (Updated 01 Nov 2010)
class Place {
private String id;
private String companyName;
private String category;
public String getID() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
}
public ArrayList getPlaces(String AccountKey, String UniqueUserId) {
// Declare an ArrayList for storing the data to be retrieved from Nimbus
ArrayList placeList = new ArrayList();
try {
// Declare a URL object with the url of the Nimbus Dataset
URL _url = new URL("http://api.projectnimbus.org/placesodataservice.svc/Places");
// Declare a URLConnection object and open a connection using the URL object declared previously
URLConnection _urlConn = _url.openConnection();
// Append the necessary Nimbus authentication info (AcountKey, UniqueUserId) to the URLConnection object
_urlConn.setRequestProperty("accept", "*/*");
_urlConn.addRequestProperty("AccountKey",
AccountKey);
_urlConn.addRequestProperty("UniqueUserID",
UniqueUserId);
// BufferedReader object stores the response (InputStream) of the URLConnection object
BufferedReader br = new BufferedReader(new InputStreamReader(_urlConn.getInputStream()));
String line = null;
StringBuilder strBuilder = new StringBuilder();
while ((line = br.readLine()) != null) {
strBuilder.append(line);
}
// An array of String is used to store the data retrieved from Nimbus and extracted later
String[] IProperties = strBuilder.toString().split("<m:properties>");
for (int i = 1; i < IProperties.length; i++) {
Place place = new Place();
// For each line of data, the function Utils.getStringBetween extracts the content between the opening and closing xml tags
place.setId(Utils.getStringBetween(
IProperties[i], "<d:id m:type=\"Edm.Int32\">", "</d:id>"));
place.setCompanyName(Utils.getStringBetween(
IProperties[i], "<d:company_name>", "</d:company_name>"));
place.setCategory(Utils.getStringBetween(
IProperties[i], "<d:category>", "</d:category>"));
placeList.add(place);
}
} catch (MalformedURLException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
}
return placeList ;
}
Helpers Available
.NET – C# Proxy Classes: Coming soon | Read this blog post for more information to use these proxy classes.
JAVA – Read this blog post for more information to use JAVA to connect to the data service.
PHP & AJAX – Read this blog post for more information to use PHP/AJAX to connect to the data service.
obj C / xcode – coming soon
Terms of Use
The datasets:
- Are here as a community technology preview for a period of time (TBD).
- Cannot be used in any public offering.
- Are offered as-is with no official support.
Support
None at this time.

Is it me or it’s impossible to search places around your current location?
Hi Metabaron,
let us check it out and get back to you.
Hi MetaBaron,
to find out the places around your location, kindly append the following to the end of the address
?latitude=1.3&longitude=103.85&distance=2000
latitude and longitude are in double, and distance in integer specifies the radius (in meters) of the select.
the above returns all places 2km around the lat,long 1.3,103.85
Requested
http://api.projectnimbus.org/placesodataservice.svc/Search?latitude=1.324&longitude=103.82&distance=2000
Got the following response:
Missing Parameters
Any ideas?
Hi Desmond,
if you want to use Search, you will need to enter in Keyword
http://api.projectnimbus.org/placesodataservice.svc/Search?keyword=Restaurant
or
http://api.projectnimbus.org/placesodataservice.svc/Search?keyword=Restaurant&latitude=1.324&longitude=103.82&distance=2000
The tutorial is here: http://projectnimbus.org/2010/10/18/datasets-places-sg/.
Hi Metabaron,
you are able to search places around your current location.
You can use the generic link provided instead of Search feature.
http://api.projectnimbus.org/placesodataservice.svc/Places?Latitude=1.3&Longitude=103.85&Distance=2000
Can i search by a product instead of place ?
Hi Feroz,
What do you mean by product instead of place?
if i want to filter the result according to category for nearby then what will be the the url for that:
http://api.projectnimbus.org/placesodataservice.svc/Places?keyword=Food and Beverages&latitude=1.324&longitude=103.82&distance=2000
Hi you can try this.
You can select the categories by this:
http://api.projectnimbus.org/placesodataservice.svc/Places?$filter=category eq ‘Sports’
or
http://api.projectnimbus.org/placesodataservice.svc/Search?keyword=Restaurant
Regards,
Project Nimbus Team
Hi
I am trying to access this data service and i have a valid key. When i access, i get the following error
401-Unauthorized: Access is denied due to invalid credentials”.