GymFlow API

An easy way to integrate gym traffic info into your application.

Response Format

The API returns responses in JSON format, which can be used directly in JavaScript and many other languages. You can use this format in PHP: just call json_decode() to convert the data into an array.


Making the URL

http://api.mygymflow.com/v1.0/key/date

Name Data Type Required/ Optional Description
key string required GymFlow API key used for authentication.
date string required The date of traffic data to retrieve. Format: yyyy-mm-dd.

Example Request

To get traffic data of September 16, 2013, you’d make this request:

http://api.mygymflow.com/v1.0/your-api-key/2013-09-16

Example Response

Here’s an example of the JSON response:

{
   "status": "success",
   "gym_name": "USC Lyon Rec Center",
   "is_open": true,
   "date": "2013-09-16",
   "time_open": "06:00:00",
   "time_close": "24:00:00",
   "traffic": [
     {
       "start_time": "06:00",
       "end_time": "06:15",
       "traffic_count": 63,
       "is_predicted": false;
     },
     {
       "start_time": "06:15",
       "end_time": "06:30",
       "traffic_count": 78,
       "is_predicted": false;
     },
     
     ...
     
     {
       "start_time": "23:45",
       "end_time": "24:00",
       "traffic_count": 47,
       "is_predicted": true;
     }
   ]
}

Name Type Description
status string Status of the query: "success" or "failed".
gym_name string Name of the gym facility.
is_open bool Whether the gym facility is open for the given date.
date string Date of the gym traffic data.
time_open string Opening time of the gym facility for the given date. Empty string if the facility is closed.
time_close string Closing time of the gym facility for the given date. Empty string if the facility is closed.
traffic list List of traffic data for the given date.
start_time string Starting time of the given period.
end_time string Ending time of the given period.
traffic_count int Traffic count of the given period.
is_predicted bool Whether the traffic is predicted (true) or past traffic (false).

Need an API key?

The GymFlow API is currently only open to existing GymFlow customers. To request for an API key, please contact hello@mygymflow.com.