Endpoint: tides/stations

The tides/stations dataset provides access to the complete station information that tides are available for.

https://api.aerisapi.com/tides/stations/

Supported Actions

The following actions are supported with the tides/stations endpoint:

:id Requesting data by using the :id action is used for returning data for a particular item that has an ID associated with it. This is the primary method for requesting general weather information for a single location (observations, forecasts, advisories, etc.) as the location's name or a zip code serves as the id. Other endpoints may expect a certain value for the ID, such as storm cells whose ID value is a combination of the radar site identifier and unique identifier assigned to every storm cell. Refer to an enpoint's detailed documentation for specific information regarding how to use the :id action.
closest The closest action will query the API for data that is closest to the requested place and return the results, if any, in order from closest to farthest. If no limit is provided in the request, then only the closest single result will be returned.

If your request does not return results, you may try setting or increasing the radius being used.
within The within action allows for returning data within a variety of different geometrical regions. Currently supported geometries include a circle (requires a center point and radius), square (requires two coordinate points defining the top-left and bottom-right corners) and polygon (requires at least three coordinate points). Unlike the closest action, the results will not be returned in any particular order based on distance.
search The search action is used as a more general query method and expects the query to be defined with the custom query for the request. Unlike the closest action, results will not be returned in any particular order.

Supported Parameters

The following parameters are optional unless otherwise noted:

p p=:place Defines the location to query data for. Refer to the list of supported place value formats.
limit limit=:total The total number of results to return as an integer. Each endpoint may have a set maximum for this value depending on usage.

The default limit is 1 if not specified.
radius radius=:distance:unit When requesting the closest results within a circle, the radius determines how far from the specified location to search. A valid unit value must be included in your radius value, e.g., "5mi", "10km", "25miles". If no unit is provided, your value is assumed to be in meters by default.

Most endpoints utilize a default radius of 50 miles, though some endpoints, such as lightning, may have tighter restrictions specified.
filter filter=:string Predefined filters for limiting the results. The filter value can be a single, comma-delimited or a semicolon delimited string of filter names.
query query=:string Used to filter results based on certain fields in the data set. See Advanced Queries for more details.
sort sort=:string Used to sort results based on certain fields in the data set. See Sorting for more details.
skip skip=:number Used to skip over a specific number of results in the data set.
callback callback=:functionName Used with JSONP implementation.

Defines the callback function to use for the response. The response will be enclosed as C(response), where C is the callback function provided.
fields fields=:string Provides a comma separated list of values for the API to return. This parameter is often used to limit the amount of data returned. See Reducing Output.

Supported Query Properties

Use the following supported property keys when creating custom queries for your requests:

id Query based on the station ID.
state Query based on the station's 2-letter abbreviation (lowercase).
country Query based on the station's 2-letter country abbreviation (lowercase).
type Query based on the station type. Refer to the profile.type property for supported values.

Sortable Fields

You can use the following fields to sort the data returned in your response:

id Sort based on station ID.
name Sort based on station name.
state Sort based on the station's 2-letter state abbreviation.
country Sort based on the statin's 2-letter country abbreviation.
type Sort based on the station type. Refer to the profile.type property for supported values.

Examples

The /[:endpoint]/[:action]? portion within the query template below can be exchanged with any of the examples. Also, please note you will need to input your client credentials in the [ID] and [SECRET] fields which can be found under the Apps section of the members area.

https://api.aerisapi.com/[:endpoint]/[:action]?client_id=[ID]&client_secret=[SECRET]

Return the information for the closest station to Miami, FL.
/tides/stations/miami,fl?

Return the information for the closest station to tide location with id '8723165'.
/tides/stations/8723165?

Return the information for the closest 5 stations to Miami, FL.
/tides/stations/closest?p=miami,fl&limit=5&

Response

The following is an example of what each object in the response will consist of. Depending on your requested action, the response may contain multiple instances of this object within an array.

Default
GeoJSON

{
    "success": true,
    "error": null,
    "response": [{
        "id": "9410777",
        "loc": {
            "long": -118.433,
            "lat": 33.9083
        },
        "place": {
            "name": "el segundo, santa monica bay",
            "state": "ca",
            "country": "us"
        },
        "profile": {
            "tz": "America\/Los_Angeles",
            "type": "subordinate",
            "typeCode": 2
        },
        "relativeTo": {
            "lat": 34.05223,
            "long": -118.24368,
            "bearing": 227,
            "bearingENG": "SW",
            "distanceKM": 23.683,
            "distanceMI": 14.716
        }
    }]
}
								

{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "id": "9410777",
        "geometry": {
            "type": "Point",
            "coordinates": [-118.433, 33.9083]
        },
        "properties": {
            "id": "9410777",
            "loc": {
                "long": -118.433,
                "lat": 33.9083
            },
            "place": {
                "name": "el segundo, santa monica bay",
                "state": "ca",
                "country": "us"
            },
            "profile": {
                "tz": "America\/Los_Angeles",
                "type": "subordinate",
                "typeCode": 2
            },
            "relativeTo": {
                "lat": 34.05223,
                "long": -118.24368,
                "bearing": 227,
                "bearingENG": "SW",
                "distanceKM": 23.683,
                "distanceMI": 14.716
            }
        }
    }]
}
								

Response Properties

The following properties will be provided in every response object:

profile.type (string) The station type, "harmonic" or "subordinate".
profile.typeCode (number) The numeric representation of the station type:
- 1 = hamonic
- 2 = subordinate
loc.long (number) The longitude coordinate of the record.
loc.lat (number) The latitude coordinate of the record.
place.name (string) The place or nearest place to the record.
place.state (string) The state abbreviation in which the record is located. This may be null depending on the country.
place.country (string) The country abbreviation in which the record is located.
relativeTo.lat (number) Latitude coordinate of the location used for the request. This may be different than the record's loc.lat value if there was no record exactly at the request location.
relativeTo.long (number) Longitude coordinate of the location used for the request. This may be different than the record's loc.long value if there was no record exactly at the request location.
relativeTo.bearing (number) Bearing in degrees of the record's location relative to the location used for the request.
relativeTo.bearingEng (string) Cardinal direction of the record relative to the location used for the request.
relativeTo.distanceKM (number) Distance, in kilometers, from the requested location to the record's actual location.
relativeTo.distanceMI (number) Distance, in miles, from the requested location to the record's actual location.
profile.tz (string) The timezone name association with the record's location.