gridsurvey.comSecond Life Grid Survey - API Reference

Total Residents:39,434,423 | Residents online:51,920 | Last update:2014-09-02 14:05:03 SLT

API Details

Currently there are two web APIs for Grid Survey, the first serves queries about named regions whilst the second serves queries about a range of Second Life Metrics. They have been designed for use with the LSL llHTTPRequest Function.

Terms of use

Both APIs are publically available under the following conditions:

  • Both API interfaces by Tyche Shepherd & gridsurvey.com are licensed under a Creative Commons Attribution 2.0 UK: England & Wales License.
    This license means that you can use the APIs and the data for any project, commercial or otherwise as long as you attribute the data provided by the APIs to Tyche Shepherd & gridsurvey.com and include the URL for this web page. If you distribute products in Second Life (or elsewhere) which use these APIs then please include the correct attribution and a link to this page in an accompanying notecard or documentation (including product advertising)
  • Use of these APIs in any 3rd party product or service is made on the understanding that the APIs and related data can be discontinued at any time. In particular its important to draw attention to the fact that Linden Lab have announced longer term plans to discontinue storage of map texture uuids, if this happens then gridsurvey.com will be unable to keep these up to date.
  • The data supplied by these APIs tends to be be updated on a daily or less frequent interval. Any product using these APIs needs to be aware of this. Excessive and frequent data requests using these APIs may be blocked.

Gridsurvey Region Data API

  • Data about specific regions can be accessed using the url http://api.gridsurvey.com/simquery.php?region=region_name where region_name is the name of the region
  • region_name should be rawurlencoded (e.g. in LSL use llEscapeURL) and is case insensitive
  • The API returns a new line separated set of key-value pairs
  • The value for specific key is returned by the API if item=key is added to the URL, for instance http://api.gridsurvey.com/simquery.php?region=Ahern&item=objects_uuid returns the UUID for the object layer map texture for Ahern region. When a specific value is requested using the item=key only the value is returned , not the key-value pair.
  • An Example LSL Script which uses this API to show Region Maps can be downloaded here
  • if you use the string FETCH_RANDOM_ONLINE_REGION_FROM_DATABASE in place of a region name the API will return the name of a randomly selected online region. This string is case sensitive
  • You can also query the database using the xy method instead of the region method using the url using the url http://api.gridsurvey.com/simquery.php?xy=x_coord,y_coord, where x_coord,y_coord are the Secondlife X & Y Map coordinates separated by a comma. This will return the information available for the current region at these coordinates.If there is no active region at the entered coordinates it will report an error. The &item=key qualifier works with this method exactly as the region method. E.G. http://api.gridsurvey.com/simquery.php?xy=999,1001&item=name will return the name of the region at x=999 & y=1001 (Tehama Region).

Gridsurvey Metric Data API

  • Data about specific Second Life Metrics can be accessed using the url http://api.gridsurvey/metricquery.php?metric=metric_category where metric_category is a category of data and is case sensitive.
  • Currently there are 13 data categories available which are :
    metric_categoryData category
    auctionsLand Auctioned
    concurrencyDaily Concurrency
    grid_sizeGrid Size
    land_for_saleLand for sale
    land_soldLand sold in month
    ld_supplyTotal L$ supply
    lindexLindeX daily market statistics
    logged_inResidents Logged In
    miscMiscellanous Metrics
    profitsIn world business profits
    sinks_and_sourcesLD Sources and sinks
    spendMonthly customer spending distribution
    transactionsResident Transactions by Amount
    For instance http://api.gridsurvey.com/metricquery.php?metric=grid_size will return various data about the current grid size
  • http://api.gridsurvey.com/metricquery.php?metric=metrics will return a list of all available data categories with their descriptions.
  • The API returns a new line separated set of key-value pairs.
  • As with the Region API, the value for a single key can be returned using the item=key parameter. For example http://api.gridsurvey.com/metricquery.php?metric=grid_size&item=private returns the current number of private estate regions on the Main Grid
  • In all cases the Data returned is the most recent value of the specific metric stored on gridsurvey.com. There are no immediate plans to serve time series data via this API

Examples of data returned by the APIs

Select example

Gridsurvey API Changelog