Google Fusion Tables API

Query: sqlGet

Executes an SQL SELECT/SHOW/DESCRIBE statement. Try it now.

Request

HTTP request

GET https://www.googleapis.com/fusiontables/v1/query

Parameters

Parameter name Value Description
Required query parameters
sql string An SQL SELECT/SHOW/DESCRIBE statement.
Optional query parameters
hdrs boolean Should column names be included (in the first row)?. Default is true.
typed boolean Should typed values be returned in the (JSON) response -- numbers for numeric values and parsed geometries for KML values? Default is true.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

JSON

{
  "kind": "fusiontables#sqlresponse",
  "columns": [
    string
  ],
  "rows": [
    [
      double,
      long,
      string,
      {
        "geometry": {
          "type": "Point",
          "coordinates": [
            double,
            double,
            double
          ]
        },
        "geometry": {
          "type": "LineString",
          "coordinates": [
            [
              double,
              double,
              double
            ]
          ]
        },
        "geometry": {
          "type": "Polygon",
          "coordinates": [
            [
              [
                double,
                double,
                double
              ]
            ],
            [
              [
                double,
                double,
                double
              ]
            ]
          ]
        },
        "type": "GeometryCollection",
        "geometries": [
          {
            "type": "Point",
            "coordinates": [
              double,
              double,
              double
            ]
          },
          {
            "type": "LineString",
            "coordinates": [
              [
                double,
                double,
                double
              ]
            ]
          },
          {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  double,
                  double,
                  double
                ]
              ],
              [
                [
                  double,
                  double,
                  double
                ]
              ]
            ]
          }
        ]
      }
    ]
  ]
}
Property name Value Description Notes
kind string The kind of item this is. For sql, this is always fusiontables#sqlresponse.
columns[] list Columns in the table.
rows[] list The rows in the table. For each cell we print out whatever cell value (e.g., numeric, string) exists. Thus it is important that each cell contains only one value.
rows[].geometry nested object A polygon geometry.
rows[].geometry.type string Type: A polygon geometry.
rows[].geometry.coordinates[] list The coordinates that define the polygon.
rows[].type string Type: A collection of geometries.
rows[].geometries[] list The list of geometries in this geometry collection.
rows[].geometries[].type string Type: A polygon geometry.
rows[].geometries[].coordinates[] list The coordinates that define the polygon.

CSV

"(dynamic)"
(foreach)
  double, string
(/foreach)
Property name Value Description Notes
(dynamic) (value)

Try it!

Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.