Max Road Speed of any location

I am trying to create the correctly formatted URL to send to the api so they it returns the max road speed / limit of that road

I am needing the information to be sent in real time

My solution will sending co ordinates to the api every 2 seconds to continually have max road speed of location updated

I am also needing to ensure the max road speed returned is the test of the road the vehicle is on not the parallel road or over / underpass road or intersecting road where any of these could have different max road speeds compared to the road speed of the road being driven on. I am able to send the direction being travelled as well as the co ordinates with each packet of data being sent to the api at 2 second intervals

I would really appreciate assistance with the above request so I can further progress this project I am working on

Which API are you talking about? The APIs on osm.org are not meant for this purpose, they are meant for editing. You could use one of the Overpass instances, but it would even be better to deploy your own server with OSM data.
None of the osm.org, nor Overpass servers guarantee a 24/7 service and all might come with a usage policy with limits on the number of requests.
Note that you cannot buy a license that allows you to bypass any of those limitation.

What’s involved in deploying the osm data on my own server ??

Is there a cost to use said data

Where would I source the necessary queries to extract the data from the geospatial database that I would have on my own server

I already have my own server with sq dbase so just need to understand the issues mentioned above