Where can I find Toll Cost Extension HERE API docs? - here-api

I need to implement a toll for calculating the route, and I wanted to use Toll Extension like described here. But I can't find documentation for this API. Any information about it redirects to Fleet Telematics API.
I would like to avoid having to implement the whole Fleet Telematics API or guessing what are the Toll Cost Extension's API parameters from the example in the first link.
I am looking for an answer that will point me to official docs or any official info saying this is deprecated and should not be used anymore.

Could you please check this toll cost API documentation if this accomplish your task.
https://tce.api.here.com/2/calculateroute.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&waypoint0=49.33729606975952,0.5986232869327068
&waypoint1=49.493527937780975,0.10129541603788539
&mode=fastest;car
&cost_optimize=1
Link to the docs is here.

Would like to highlight one problem - if you choose to just calculate toll based on existing route you may face the issue with too long url on their NGINX side. Also this API (TCE) seems to be deprecated, so it may be inevitable (unfortunately) to use fleet API.
In fleet API most params are the same like in TCE/Route API, some result are hidden via attributes. More on https://developer.here.com/documentation/fleet-telematics/api-reference.html. Worth to mention is that at least for now is it very expressive and there is a limited option to change this. For example, my TCE toll response has about 10k lines of formated json... whereas the same for fleet has 300k because there is no option (with routeMatch=1 to remove links/waypoints.
From my already quite long experience with Here API as a whole, it requries some time to go deep into it... and find things.

Related

How do I get the name of the creative through the adcreativev2 API?

I am trying to find the API that lets me query for the creative name through the creative ID. When I used this API: https://api.linkedin.com/v2/adCreativesV2/{creative id}
It returned the information of the creative but the name is missing.
So basically after exploring endlessly the doc and available forums, it seems a name can be found using the API https://api.linkedin.com/v2/adDirectSponsoredContents/{URN}
where the URN can be found in the original https://api.linkedin.com/v2/adCreativesV2/{creative id}. It if the value of the field reference.
It seems unintuitive to have it in a separate endpoint instead of the original GET api. Hope it helps anyone who stumbles on this answer.
P.S Sometimes the API will return a 404 response to a perfectly existing ad, I don't know the cause exactly but when you view the ad on the campaign manager you will see that the creative name will have the value of the creative ID.
You are correct on how to get the creative names through the adCreativeV2 API. HOWEVER, this is literally being deprecated in about a week (2/28).
By the 28th, you have to migrate to the "versioned" LinkedIn API. https://learn.microsoft.com/en-us/linkedin/marketing/versioning?view=li-lm
The adCreativesV2 endpoint will fail. I still have no idea how to grab the creative names on the versioned API. I've reached out to LinkedIn.
Here are some of the changes: https://learn.microsoft.com/en-us/linkedin/marketing/versioning?view=li-lms-2023-02
I haven't been able to use the new creatives endpoint to get the creative name. It's even less precise than their old API, and since the share endpoints are being deprecated, I'm not sure where to go.
I'll update you if I hear back. Their API is frustrating and very poorly documented.
EDIT: You're getting 404s on some ads probably because those ads are NOT DSC. There are unfortunately multiple different endpoints you have to call to expose the creative contents depending on the ad type and if it's DSC or not. But as mentioned, this is all being deprecated in about a week, so I don't think it's worth implementing since it'll all break on the 28th when the old V2 endpoints are deprecated.

Datashake alternatives for gathering review data?

I am looking for alternatives to Datashake that would be compatible using webhooks for either Zapier or Pabbly. Let me know if there is any other tool that has a review scraper and is compatible with Zapier and Pabbly.
Tried integrating datashake with pabbly and zapier. We could not integrate datashake with them. We are looking for alternatives.
See https://www.reviewsmaker.com - There are other places you can look specifically for APIs such as APIfy or Webautomation.io; RM is by far the most superior and is worth checking out. Anything that has an endpoint that consumes and gives a payload can be used with webhooks. :)

PageSpeed Insights API: usability, security and metrics missing from json response

I am using PageSpeed Insights API to grab speed metrics of different websites and integrate the data in a tool I'm creating.
If I try a query using the API test tool (https://developers.google.com/speed/docs/insights/v4/reference/pagespeedapi/runpagespeed), then everything is fine and I get the info I need.
However, when I perform the very same query (as far as I can see) from my server, the response json does not include the same information. Some information is just missing.
Basically, other than the 'initial_url', all the metrics information that should be included in the 'loadingExperience' branch is missing. No info on 'FIRST_CONTENTFUL_PAINT_MS' or 'DOM_CONTENT_LOADED_EVENT_FIRED_MS'.
On the other hand, I can't seem to find the way to request info on USABILITY and SECURITY under the 'ruleGroups' branch. According to the API reference, this branch should feature information on these aspects too, but nothing like that is return after the query. Just the SPEED branch info is returned.
This is the URL I use to query the API:
https://www.googleapis.com/pagespeedonline/v4/runPagespeed?url=https://stackoverflow.com&strategy=mobile&screenshot=true&locale=en&key=XXXXXXXXmyAPIKeyXXXXXXXX';
Am I missing anything? I have checked the API documentation and Google'd for more info on this, but I can't seem to find any parameter to force request this information.
(By the way, this is my first question at StackOverFlow, so I hope I have shared all the necessary information. And apologies if my english is bad. I do my best.)
I'm having the same issue with some websites. The problem is related to the website. Some websites are providing the userExperience.metrics object and some are not. I have no idea what is causing this.
However you can try to use strategy=desktop parameter to get the userExperience.metrics object in version 5. This worked for me.
Working URL: https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://stackoverflow.com&strategy=desktop&key=[SetYourApiKeyHere]

Google Distance Matrix API

I was trying to use Google Distance Matrix API JSON in my project, after formatting the url, for example:
http://maps.googleapis.com/maps/api/distancematrix/json?origins=Vancouver+BC|Seattle&destinations=San+Francisco|Victoria+BC&mode=bicycling&language=en&sensor=false
I was able to view the result in browser, but when I tried to make a http request to get the result, I will receive status : REQUEST_DENIED
In documentation:
REQUEST_DENIED indicates that the service denied use of the Distance
Matrix service by your application.
But I still don't know why my request is denied. More Info from google:
Use of the Distance Matrix API must relate to the display of
information on a Google Map; for example, to determine
origin-destination pairs that fall within a specific driving time from
one another, before requesting and displaying those destinations on a
map. Use of the service in an application that doesn't display a
Google map is prohibited.
If I can't get the result, how can I apply it on google map?
Anyone with same problem? I will post sample code later, to clarify my question more clearly.
I had a similar problem, but it was due to assuming that the sensor tag would default to false, but it is in fact required.
Google Distance Matrix API has a limit of elements set to 2500.
I highly doubt it that you would have gone over this limit, as you would have to have calculated the maximum 10 x 10 matrix 25 times over.
I am from South Africa, and it refused to work for any local addresses until I changed the transport mode to driving (from walking, I mean seriously, we have cars). Maybe that'll help
https://maps.googleapis.com/maps/api/distancematrix/json?origins=Seattle&destinations=San+Francisco&key=YOUR_API_KEY
Please make sure that you have created a credentials on Google Console which can be called as "API KEY" and you are using this API KEY in above request URL on the place of "YOUR_API_KEY"
I had the same problem earlier.
you need to check out with the Google Api key version and codes/scripts of version you are using.
I believe you need to get a Google Maps API key
You need to set an API KEY for using Google map services like this:
https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=Washington,DC&destinations=New+York+City,NY&key=**YOUR_API_KEY**
First thing is that you need is to have an API key assigned to your application. This is done by creating it in the Google API Manager.
I hope your have enabled distance matrix API from google console for your application.
please refer
https://support.google.com/googleapi/answer/6158841?hl=en
along with this you can restrict API_KEY for unauthorized use.

How to get distance from Google Map API from server side ASP.NET 2.0

I am working on a project which requires a server side access to google map api. i want to calculate distance (actual distance, not straight line). google map api supports javascript and not asp.net. please give suggestions ...!
you specified google maps in your question - but have you looked at Virtual Earth? Specifically this routing with Virtual Earth Web Service example sounds exactly like what you want:
server-side access (just Add Service Reference inside visual studio)
actual distance (not straight line) since it is using a route
The concerns raised by others about T&Cs for 'internal/intranet use' apply to VE as well as Google I think - you'll have to read up about whether your application needs licensing or not.
p.s. if you did just want to calculate straight-line distance, I have instructions using SQL Server 2008; which also links to some straight c# code that does it too.
The Google API allows you to Geocode via a server side call:
http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct
This would allow you to get the longitude and latitude of the locations. You can then cache these and use them to calculate distance using the techniques CMS suggests.
You will need to be careful of the Google T&C's though as you are only allowed to store the geocoding data for use on a Google map which is publicly available.
You would probably also run into limitations on the number of requests you could make from a single IP.
However I think what you mean by non-straight line distance is distance taking into account roads and one way streets etc.
If this is the case I think a commercial service is your only option. Although theoretically you could do it all via screen scraping, I'm almost certain that this would break Google's T&C's.
The simplest solution would probably be just to embed a Google map on a page of your application and let the user calculate the distance. You could pre-fill the to and from fields if required.
Again if this is for an internal app i.e. Not publicly available "my understanding" of the Google T&C's would forbid this.
Use something like firebug or fiddler to look at the requests that are being sent to Google from javascript you should then beable to build the request using that information and an HTTPWebRequest in .net and retrieve the same information.
HTH
You can calculate the distance of two geographical coordinates (latitude, longitude) using the Great-circle distance algorithm.
Here you can find some other formulas for distance calculation.
Well, you've pretty much identified the key issue, the Gmaps API is a browser resident javascript API and there's not much getting around that. Most of the API is executed in the browser so there's not much network traffic to spy on.
As tsaunders mentions there is a geocoding API call that is restfully accessible, but it only does reverse/geocoding and if you have lat/lng's already you can use the calculations the rms suggested, but they are as tsaunders points out 'as the crow flies' distance.
If indeed you are looking for road taken distance, the API does do routing but you are back in the browser to get the start/end points from the user.
Perhaps you can be a little more specific about what you are trying to do and why you feel this requires you to to access the API from your server. My application for instance has features that gather information from the user and sends requests back to my server to work on, some of that data are processed by the Gmaps API first.
If I were to use a API platform, I certinaly would not use Google as the free one does not include advances Geocoding menaing the accuracy is poor. There is also no sla , support or rights of service.
The directions are poor, the coverage for Ireland and Geocoding is almost childlike and the privacy stinks. No professional business would use a google mapping solution.
They copy everyone else's idea, say they are there own and get loads of press (they only added tube stations in 2006) an dcyclc lanes (2010), viamichelin added these 2006 and Traffic in 2009 !
Any agency or developers looking for an API should stick to Bing or ViaMichelin for better customisation and user experience which is killer !

Resources