Download OpenAPI specification:Download
To call this API you need an API key provided by Seiki. The API key is provided in every HTTP call in the key header.
Here is an example in Python :
requests.get(
'https://api.smart4cast.seiki.co/v1/account/credits',
headers = {'key': MY_API_KEY}
)
In case of failed authentication, the API returns the following status codes :
To use this API, you need credits in order to anlyse POI : 1 POI = 1 credit
To retrieve your amount of credits, you can call the endpoint /account/credits
In case of insufficient credits, the API returns a status code 402.
For the endpoints that analyse POI, the optional boolean parameter dry_run can be provided, which allows you to check authentication and parameters validity at no cost. It also allows you to retrieve what would be the cost of the computation.
The endpoint /poi lets you create a single new POI. This endpoint is synchronous, which means that your client will wait for the API to answer. You can either create a POI by its latitude / longitude, or by its address :
requests.post(
'https://api.smart4cast.seiki.co/v1/poi',
headers = { 'key': MY_API_KEY },
json = { 'lat': 48.8751, 'lng': 2.3074 }
).json()
requests.post(
'https://api.smart4cast.seiki.co/v1/poi',
headers = { 'key': MY_API_KEY },
json = { 'address': '178 bd Haussmann Paris' }
).json()
The output contains all information on the POI
This route allows you to compute a single new POI, in a synchronous way. The POI can be described either by its coordinates (WGS84), or by an address : you cannot provide both. Beware that providing an address can result in an imprecision on the exact location.
The coordinates (48.8751, 2.3074) are free
Costs 1 credit
| address | string Full address |
| lat | number <float> Latitude in WGS84 format |
| lng | number <float> Longitude in WGS84 format |
{- "address": null,
- "lat": 48.8751,
- "lng": 2.3074
}{- "consumed_credits": 1,
- "items": [
- {
- "address": "178 bd Haussmann 75008 Paris",
- "lat": 48.87,
- "lng": 2.3,
- "error": null,
- "state": "SUCCESS",
- "traffic_data": {
- "vehicle_tmja": 0.1,
- "soft_mode_tmja": 0.1
}
}
]
}