Documentation
  • ES | EN
  • Routing

    Smart Routing

    We find the optimal route between an origin and a destination by considering real-time traffic, weather and road incidents affecting the route.

    We quantify toll costs according to the type of vehicle that will travel the route and setup stops at gas stations and parking lots that are the least expensive detours from the route.

    Furthermore, we tell you the right time to leave so you can arrive on time to your destination, according to historical traffic data and our predictive algorithms.

    With custom-made routes, our users and customers make better decisions that reduce their time and money spent in mobility.


    See documentation

    Use cases

    For a user that needs to get from one point to another we can:
    - create the optimal route, avoiding incidents like protests, roadworks and closed streets,
    - determine which gas station is the best to stop at (avoiding PROFECO's blacklisted stations),
    - find the closest public parking to your destination, and
    - quantify time, distance, and cost for the route.

    Code Samples

    "Your key" parameters receives both "key" and "apiKey" keywords for compatibility. cURL
    $ curl "http://api.sintrafico.com/route?apiKey=[your key]&start=19.385994,-99.192323&end=19.458232,-99.113169&poi_in[]=3"
    Python 2.x
    import requests
    params = {
                'key': '[your key]',
                'start': '19.385994,-99.192323',
                'end': '19.458232,-99.113169',
                'poi_in[]': 3
    }
    route = requests.get('http://api.sintrafico.com/route', params=params)
               
    Javascript
    var parameters =  {
        'key': '[your key]',
        'start': '19.385994,-99.192323',
        'end': '19.458232,-99.113169',
        'poi_in[]': 3
    };
    $.getJSON('http://api.sintrafico.com/route', parameters)
        .done(function(data, textStatus, jqXHR) {
            // process information
        })
        .fail(function(jqXHR, textStatus, errorThrown) {
            alert('Error ' + jqXHR.status);
        });
              

    Routing

    Dynamic Multidestiny Routing

    We optimize the order and route to visit several destinations in one day starting from the given day and time. We use historical traffic data, scheduled incidents like protests and roadworks, and our predictive alorithms.

    Additionally, we evaluate and optimize the route in real time with our planned routes.

    Smart route planning helps our clients increase productivity up to 15%, visiting more customers per day and reducing travel costs.


    See documentation

    Use cases

    For a fleet administrator who knows which customers a vehicle must visit and the starting day and time, we determine the optimal order in which customers should be visited according to scheduled incident information like protests and roadworks, historical traffic data and our predictive algorithms. Once we have the order, we determine the optimal route to go from customer to customer and create an agenda with departure and arrival times.

    Code Samples

    "Your key" parameters receives both "key" and "apiKey" keywords for compatibility. cURL
    $ curl "http://api.sintrafico.com/route?apiKey=[your key]&start=19.43436804321391,-99.18636123930054&end=19.429127071991978,-99.16597645078735&optimize=true&wp[]=19.430374582805314,-99.18358325958252&wp[]=19.4336122435248,-99.17693138122559&wp[]=19.42907950044628,-99.17319774627686&wp[]=19.433652713875333,-99.16800498962402"
    Python 2.x
    import requests
    params = {
        'key': '[your key]',
        'start': '19.43436804321391,-99.18636123930054',
        'end': '19.429127071991978,-99.16597645078735',
        'optimize': 'true',
        'wp[]': ['19.430374582805314,-99.18358325958252',
        '19.4336122435248,-99.17693138122559',
        '19.42907950044628,-99.17319774627686',
        '19.433652713875333,-99.16800498962402']
    }
    route = requests.get('http://api.sintrafico.com/route', params=params)
               
    Javascript
    var parameters =  {
       'key': '[your key]',
       'start': '19.43436804321391,-99.18636123930054',
       'end': '19.429127071991978,-99.16597645078735',
       'optimize': 'true',
       'wp[]': ['19.430374582805314,-99.18358325958252',
               '19.4336122435248,-99.17693138122559',
               '19.42907950044628,-99.17319774627686',
               '19.433652713875333,-99.16800498962402']
    ;
    .getJSON('http://api.sintrafico.com/route', parameters)
       .done(function(data, textStatus, jqXHR) {
           // process information
       })
       .fail(function(jqXHR, textStatus, errorThrown) {
           alert('Error ' + jqXHR.status);
       })
              

    Routing

    Smart Matrix

    From a series of available operators, we help identify the one who will reach a destination faster according to real time traffic.

    5 out of 10 times, the operator closest to the site is NOT the one with the shortest travel time because of traffic at the moment.

    For a series of destinations, we identify the one to which the operator will arrive fastest.

    We identify the best arrangement among several origins and destinations such that travel times are minimized according to real time traffic.


    See documentation

    Use cases

    For an insurance or roadside assitance company that has a customer to assist and several employees available, we identify the one with the least travel time to the place according to real time traffic.

    Code Samples

    "Your key" parameters receives both "key" and "apiKey" keywords for compatibility. cURL
    $ curl "http://api.sintrafico.com/matrix?apiKey=[your key]&start=[[19.43,-99.16650000000004],[19.411220252127993,-99.15036383056645],[19.439065308259824,-99.21044531250004]]&end=[[19.41,-99.18650000000002]]"
    Python 2.x
    import requests
    params = {
        'key': '[your key]',
        'start': [[19.411220252127993,-99.15036383056645],
                  [19.439065308259824,-99.21044531250004],
                  [19.41,-99.18650000000002]],
        'end': [[19.43,-99.16650000000004]]
    }
    matrix = requests.get('http://api.sintrafico.com/matrix', params=params)
               
    Javascript
    var parameters =  {
         'key': '[your key]',
         'start': JSON.stringify([[19.411220252127993,-99.15036383056645],
               [19.439065308259824,-99.21044531250004],
               [19.41,-99.18650000000002]]),
         'end': JSON.stringify([[19.43,-99.16650000000004]])
     };
     $.getJSON('http://api.sintrafico.com/matrix', parameters)
         .done(function(data, textStatus, jqXHR) {
             // process information
         })
         .fail(function(jqXHR, textStatus, errorThrown) {
             alert('Error ' + jqXHR.status);
         })
              

    Routing

    Monitoring And Real Time Arrivals

    For any route created on SinTráfico's platform, we monitor the vehicle/operator assigned to the route, monitor its ETA to each stop of the route in real time, and determine if it is "On time" or "Delayed".

    Visiblity on performance in real time of 10-100-1,000 routes at the same time allows our clients better their level of service and reduce punctuality penalty costs.

    Use cases

    For an operator that has to visit several customers in one day and has an agenda with arrival times, we monitor traffic in that route, updating ETAs to each route and identifying delays.

    Code Samples

    "Your key" parameters receives both "key" and "apiKey" keywords for compatibility. cURL
    $ curl "http://api.sintrafico.com/monitor?apiKey=[your key]&dow=1"
    Python 2.x
    import requests
    params = {
        'key': '[your key]',
        'dow': 1
    }
    monitor = requests.get('http://api.sintrafico.com/monitor', params=params)
               
    Javascript
    var parameters =  {
         'key': '[your key]',
         'dow': 1
     };
     $.getJSON('http://api.sintrafico.com/monitor', parameters)
         .done(function(data, textStatus, jqXHR) {
             // process information
         })
         .fail(function(jqXHR, textStatus, errorThrown) {
             alert('Error ' + jqXHR.status);
         })
              

    Location Analytics

    Isochrone Maps of Accesibility and Reach

    We decide to go somewhere or not because of the time it takes us to get there since traffic can make a short distance be a 40 minute trip or a very large distance take only 4 minutes.

    With this in mind, we analyze the market of a location using historical traffic data. We determine the isochrone area where, every point inside can reach the location in at most a certain number of minutes.

    Traffic can reduce up to 10 times the area of influence of a location.
    For the variable 'method' is recommended use the value 'router_st_v0.1'.


    See documentation

    Use cases

    For a business that knows its customers are not willing to drive more than 15 minutes to its location, we identify the area that typical traffic conditions will allow cars to reach the location in that time or less.

    Code Samples

    "Your key" parameters receives both "key" and "apiKey" keywords for compatibility. cURL
    $ curl "http://api.sintrafico.com/isochrone?key=[your key]&lat=19.425009&lon=-99.145083&insideOut=false&range=weekday&length=30&foursquare=false&transport=car&polling=false&method=router_st_v0.1"
    Python 2.x
    import requests
    params = {
        'key': '[your key]',
        'lat': '19.385994',
        'lon': '-99.113169',
        'insideOut': 'false',
        'range': 'weekday',
        'length': '30',
        'foursquare': 'false',
        'transport': 'car',
        'polling': 'false',
        'method': 'router_st_v0.1'
    }
    route = requests.get('http://api.sintrafico.com/isochrone', params=params)
               
    Javascript
    var parameters =  {
        'key': '[your key]',
        'lat': '19.385994',
        'lon': '-99.113169',
        'insideOut': 'false',
        'range': 'weekday',
        'length': '30',
        'foursquare': 'false',
        'transport': 'car',
        'polling': 'false',
        'method': 'router_st_v0.1'
    };
    $.getJSON('http://api.sintrafico.com/isochrone', parameters)
        .done(function(data, textStatus, jqXHR) {
            // process information
        })
        .fail(function(jqXHR, textStatus, errorThrown) {
            alert('Error ' + jqXHR.status);
        })
              

    Location Analytics

    Vehicle Flow And Speed Profiles

    From typical historical traffic we can predict the number of cars that drive by a location and their average speed, helping our clients identify potential customers with greater precision by knowing their location's visibility.

    Vehicle flow is positively correlated with location performance, therefore we help our customers choose their locations with more precision.


    See documentation

    Use cases

    For a company that must choose among several locations for a billboard, we compare visibility of each location using the number of cars driving through and the average time each car is exposed to the billboard.

    Code Samples

    "Your key" parameters receives both "key" and "apiKey" keywords for compatibility. cURL

    Request to create flow data

    $ curl "http://api.sintrafico.com/flow?key=[your key]&lat=19.430725687317032&lon=-99.15904562269287"

    Answer

    200;
    {
        "status": "Request successfully created.",
        "req_id": "19049c54530f4de"
    }
                

    Request to get flow data

    $ curl "http://api.sintrafico.com/flow?key=[your key]&req_id=19049c54530f4de
                

    Answer when it is not ready

    202;
    {
        "status": "Your request is still in progress",
        "req_id": "3b9e162409c477f9"
    }
                
    Python 2.x

    Request to create flow data

    import requests
    params = {
        'key': '[your key]',
        'lat': 19.430725687317032,
        'lon': -99.15904562269287
    }
    flow = requests.get('http://api.sintrafico.com/flow', params=params)
    flow.status_code == 202
    req_id = flow.json()['req_id']
               

    Request to get flow data

    import requests
    import json
    status_code = 0
    route = None
    params = {
        'key': '[your key]',
        'req_id': '74916794c670f5b9' #req_id received above
    }
    while status_code != 200:
        # If it loops:
        # flow.status_code == 202
        # flow.json() == {"status": "Your request is still in progress.",
        #                  "req_id": "74916794c670f5b9"
        flow = requests.get('http://api.sintrafico.com/flow', params=params)
        status_code = flow.status_code
        route = flow.json()
               
    Javascript

    Request to create flow data

    var parameters =  {
         'key': '[your key]',
         'lat': 19.430725687317032,
         'lon': -99.15904562269287
    };
    $.getJSON('http://api.sintrafico.com/flow', parameters)
        .done(function(data, textStatus, jqXHR) {
            // process information
        })
        .fail(function(jqXHR, textStatus, errorThrown) {
            alert('Error ' + jqXHR.status);
        })
              

    Request to get flow data

    var statusCode = 0;
    var parameters =  {
        'key': '[your key]',
        'req_id': req_id,
    };
    while (statusCode != 200) {
        $.getJSON('http://api.sintrafico.com/flow', parameters)
            .done(function(data, textStatus, jqXHR) {
                statusCode = jqXHR.status
                if (statusCode == 202) {
                    // Wait 1 second before next request
                    window.setTimeout(function(){}, 1000)
                } else if (statusCode == 200) {
                    // process information
                }
            })
            .fail(function(jqXHR, textStatus, errorThrown) {
                alert('Error ' + jqXHR.status);
            })
    }
              

    Location Analytics

    Origin - Destination Patterns

    Based on historical mobility patterns we identify origin and destination areas for our client's locations, helping them understand composition and behavior of people close to their locations.

    With origin-destination patters we help our clients define strategies estrategias focused on characteristics and behavior of people in their areas of influence.


    See documentation

    Use cases

    For a new real estate project we identify areas in which people close by work, helping the developer create strategies that reach their potential customers (people living far away from their workplace that would benefit greatly from changing location).

    Code Samples

    "Your key" parameters receives both "key" and "apiKey" keywords for compatibility. cURL

    Request to create flow data

    $ curl "http://api.sintrafico.com/trips?apiKey=[your key]&lat=19.434381178460576&lon=-99.15693283081055&origin=start&time=morning"
    Python 2.x

    Request to create flow data

    import requests
    params = {
        'key': '[your key]',
        'lat': 19.434381178460576,
        'lon': -99.15693283081055,
        'origin': 'start',
        'time': 'morning'
    }
    route = requests.get('http://api.sintrafico.com/trips', params=params)
               
    var parameters =  {
         'key': '[your key]',
         'lat': 19.434381178460576,
         'lon': -99.15693283081055,
         'origin': 'start',
         'time': 'morning'
     };
     $.getJSON('http://api.sintrafico.com/trips', parameters)
         .done(function(data, textStatus, jqXHR) {
             // process information
         })
         .fail(function(jqXHR, textStatus, errorThrown) {
             alert('Error ' + jqXHR.status);
         })
              

    Maps And Dynamic Layers

    Vehicle Affluence Map

    Our vehicle affluence maps help our clients make better decisions about their locations and understand mobility patterns in their areas of interest.

    Use cases

    For a company that handles publicity, we help identify intersections with bigger vehicle affluence, for the location of its promoters and operators.

    Code Samples

    "Your key" parameters receives both "key" and "apiKey" keywords for compatibility. cURL
    $ curl "https://api.sintrafico.com/layers/wms/heatmap.png?key=[your key]&bbox=-99.44103240966797,19.35779359620928,-98.99059295654297,19.46108928912844&height=319&width=1312"
    Python 2.x
    import requests
    params = {
        'key': '[your key]',
        'bbox' ['-99.44103240966797,19.35779359620928',
            '-98.99059295654297,19.46108928912844'],
        'height': 319,
        'width': 1312
    }
    route = requests.get('https://api.sintrafico.com/layers/wms/heatmap.png', params=params)
               
    Javascript
    var parameters =  {
        'key': '[your key]',
        'bbox' ['-99.44103240966797,19.35779359620928',
            '-98.99059295654297,19.46108928912844'],
        'height': 319,
        'width': 1312
    };
    $.getJSON('https://api.sintrafico.com/layers/wms/heatmap.png', parameters)
        .done(function(data, textStatus, jqXHR) {
            // process information
        })
        .fail(function(jqXHR, textStatus, errorThrown) {
            alert('Error ' + jqXHR.status);
        })
              

    Maps And Dynamic Layers

    Street Speed Map

    Our street speed maps help our clients make better decisions about their locations and understand mobility patterns of their areas of interest.

    Use cases

    For a business, like convenience stores, that benefits from impulse purchases of vehicles passing close by, we help identify streets and intersections in which vehicle speeds allow drivers make instant decisions to stop and buy something.

    Code Samples

    "Your key" parameters receives both "key" and "apiKey" keywords for compatibility. cURL
    $ curl "https://api.sintrafico.com/layers/wms/speed.png?key=[your key]&bbox=-99.44103240966797,19.35779359620928,-98.99059295654297,19.46108928912844&height=319&width=1312"
    Python 2.x
    import requests
    params = {
        'key': '[your key]',
        'bbox' ['-99.44103240966797,19.35779359620928',
            '-98.99059295654297,19.46108928912844'],
        'height': 319,
        'width': 1312
    }
    route = requests.get('https://api.sintrafico.com/layers/wms/speed.png', params=params)
               
    Javascript
    var parameters =  {
        'key': '[your key]',
        'bbox' ['-99.44103240966797,19.35779359620928',
            '-98.99059295654297,19.46108928912844'],
        'height': 319,
        'width': 1312
    };
    $.getJSON('https://api.sintrafico.com/layers/wms/speed.png', parameters)
        .done(function(data, textStatus, jqXHR) {
            // process information
        })
        .fail(function(jqXHR, textStatus, errorThrown) {
            alert('Error ' + jqXHR.status);
        })
              

    Maps And Dynamic Layers

    Points Of Interest "POIs"

    We maximize reach and capabilities of our partners' platforms with our broadest and most up-to-date layers of information of Mexico's mobility in the market.


    See documentation

    Use cases

    For software platforms and mobile applications designed for the final customer, we enrich visualizations and offered information tailored for their users.

    Code Samples

    "Your key" parameters receives both "key" and "apiKey" keywords for compatibility. cURL
    $ curl "http://api.sintrafico.com/st/pois?apiKey=[your key]&location=19.43436804321391,-99.18636123930054&poi_set=all&ps[]=-1"
    Python 2.x
    import requests
    params = {
        'key': '[your key]',
        'location': '19.385994,-99.192323',
        'poi_set': 'all',
        'ps': '-1'
    }
    route = requests.get('http://api.sintrafico.com/st/pois', params=params)
               
    Javascript
    var parameters =  {
        'key': '[your key]',
        'location': '19.385994,-99.192323',
        'poi_set': 'all',
        'ps': '-1'
    };
    $.getJSON('http://api.sintrafico.com/st/pois', parameters)
        .done(function(data, textStatus, jqXHR) {
            // process information
        })
        .fail(function(jqXHR, textStatus, errorThrown) {
            alert('Error ' + jqXHR.status);
        })
              

    Tailored Information

    Historical Information

    Either for integral logistics consulting, market research, urban development, or even planning and evaluating public policy projects, SinTráfico's information allows us to understand, measure, track, and support our partners' decision making.

    Use cases

    For analysis of decisions' impacts in urban operations of a city, we integrate our information with our partners' to evaluate the status before, during, and after these decisions.

    Implementation tailored to our clients' needs


    Tailored Information

    Real-time Information

    With real-time tailored information, we empower navigation, automotive, media, and urban operation platforms maximizing their solutions' value to the market.

    Use cases

    Any technology platform can be enriched with real-time mobility information to add value dynamically.

    Implementation tailored to our clients' needs