# Openrouteservice

**URL:** <https://ask.openrouteservice.org/t/openrouteservice/2839>\
**Category:** openrouteservice\
**Created:** [May 27, 2021, 9:04am UTC](https://ask.openrouteservice.org/t/openrouteservice/2839 "2021-05-27T09:04:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sohanur\_Rahman\_Shant](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/sohanur_rahman_shant/32/1078_2.png) [@Sohanur\_Rahman\_Shant](https://ask.openrouteservice.org/u/Sohanur_Rahman_Shant)\
**Post date:** [May 27, 2021, 9:04am UTC](https://ask.openrouteservice.org/t/openrouteservice/2839/1 "2021-05-27T09:04:12Z")

</div>

I am getting this error. What is the maximum distance for routing using openrouteservice directions?

File “E:\Heatmap\env\lib\site-packages\openrouteservice\client.py”, line 242, in \_get\_body  
raise exceptions.ApiError(  
openrouteservice.exceptions.ApiError: 400 ({‘error’: {‘code’: 2004, ‘message’: ‘Request parameters exceed the server configuration limits. The approximated route distance must not be greater than 6000000.0 meters.’}, ‘info’: {‘engine’: {‘version’: ‘6.5.0’, ‘build\_date’: ‘2021-05-17T12:08:50Z’}, ‘timestamp’: 1622098849198}})

---

<div class="post-metadata">

**Author:** ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)\
**Post date:** [May 27, 2021, 9:07am UTC](https://ask.openrouteservice.org/t/openrouteservice/2839/2 "2021-05-27T09:07:28Z")

</div>

Hey,

as stated in the error message, the maximum distance is 6.000 km.  
You can find more information about this [on our homepage](https://openrouteservice.org/restrictions/).

Best regards

---

<div class="post-metadata">

**Author:** ![Sohanur\_Rahman\_Shant](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/sohanur_rahman_shant/32/1078_2.png) [@Sohanur\_Rahman\_Shant](https://ask.openrouteservice.org/u/Sohanur_Rahman_Shant)\
**Post date:** [May 29, 2021, 4:39am UTC](https://ask.openrouteservice.org/t/openrouteservice/2839/3 "2021-05-29T04:39:43Z")

</div>

Thank you @jschnell, Will I be able to use any custom procedure to increase the maximum distance?

---

<div class="post-metadata">

**Author:** ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)\
**Post date:** [May 29, 2021, 4:59pm UTC](https://ask.openrouteservice.org/t/openrouteservice/2839/4 "2021-05-29T16:59:00Z")

</div>

Your only option to increase the maximum distance is setting up your own ors instance and increase the maximum distance in the configuration.

Best regards
