Fetching Zipcodes falling in between the routes Final and End destination using MapQuest API - mapquest

I need to fetch zipcodes falling all along the route using MapQuest API.Plz suggest i tried to find on mapquest forum as well as on stack .I also did google but can't manage to find appropriate solution.
Ex : Suppose i define a Route from point A to Point B. Now i need to fetch all zipcodes falling in between this route.

You'll want to look at the Corridor Search, which is part of the Search API Web Service. You have two options; you can either pass in the shapePoints that make up the route (corridor) that you want to search along, or you can use the Directions API to calculate a route and then use the sessionId from the Directions API response as input into the Search request.
Here's an example using the Directions API in conjunction with the Search API:
Use the Directions API to calculate a route between two points. In this example, I'm calculating a route between Denver, CO and Aurora, CO:
http://www.mapquestapi.com/directions/v2/route?key=YOUR-APP-KEY-GOES-HERE&from=Denver,CO&to=Aurora,CO
Locate the sessionId parameter in the response.
Use the Search API to perform a corridor search on the uspostalcodes table. I'm also filtering the results from the table to include just the name of the postal code and none of the other info that is available in the table.
http://www.mapquestapi.com/search/v2/corridor?key=YOUR-APP-KEY-GOES-HERE&sessionId=YOUR-SESSION-ID-GOES-HERE&width=1&buffer=0&hostedData=mqap.uspostalcodes|||POSTCODE
You can adjust the width/buffer options as well to refine your search.
Hope this helps!

Related

Filtering certain coins based upon name with CoinMarketCap

I'm currently attempting to use the CoinMarketCap API but finding it frustrating.
I'm wanting to use this URL to query their API:
https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest
However, rather than finding all, or just simply filtering based upon the number, I want to find a certain few coins.
So for example, I want to only find Bitcoin, Ethereum and Cardano.
Looking at their docs, it suggests you can sort by name, but it appears this is only listing them alphabetically, which I don't want to do.
So can anyone suggest how to query their API successfully and find just Bitcoin, Ethereum and Cardano using that GET URL above?
Here's the URL to the specific URL for the API request: https://coinmarketcap.com/api/documentation/v1/#operation/getV1CryptocurrencyListingsLatest
For this purpose, you can use the endpoint Quotes Latest:
https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest
It allows you to pass a list of identifiers in a string as a parameter, like this:
1,1027,328
or a list of slugs:
bitcoin,ethereum,monero
or a list of symbols
BTC,ETH,XMR
If you trying to scrape information about new listings at crypto exchanges, you can be interested in this API:
https://rapidapi.com/Diver44/api/new-cryptocurrencies-listings/
It includes an endpoint with New Listings, New Pairs from the biggest exchanges and a very useful endpoint with information about exchanges where you can buy specific coins and prices for this coin at that exchange. It's a bit paid, but it's worth it!

Fetch route plus crossings from OSRM

While fetching a driving route from OSRM, is it possible to fetch the names of the roads that feed into that path (so crossings and side roads)? If so, how can this be done?
Unfortunately you can only retrieve the names of the roads that are part of the route. This information is available if you pass the option steps=true.
The .routes[].legs[].steps[] object (RouteStep) has a property name that contains the street name.

How to obtain the traffic signs belonging to a set of LINK_IDS

I am using the REST API of HERE. I am trying to obtain the traffic signs corresponding to a set of LINK_IDS.
I have a list of the links (unique IDs) I am interested in, however I do not know how to obtain the traffic signs which are found in these links. As I understand there should only be 1 traffic sign in each link, at the end of the link.
Can anyone hint what is the way to proceed? I was trying to use Platform Data Extension API to do this, but have not been successful.
The most I have been able to achieve is obtaining all the traffic signs in one tile, by querying the following:
http://pde.cit.api.here.com/1/tile.json?region=EU
&release=LATEST
&layer=TRAFFIC_SIGN_FC1
&level=9
&tilex=537&tiley=399
&app_id={APP_ID}&app_code={APP_CODE}
However, this is not even working for all locations. I tried in different parts of the city of London and the output I obtain is:
{
"Rows":
Array[0][
]
}
In summary, my goal is to obtain the corresponding traffic sign (s) in a link. That is, for link with ID XXXXXXXXX I would like to see which is the traffic sign present in the location marked by this link.
I am trying to obtain the traffic signs corresponding to a set of LINK_IDS
There is no straight solution to this yet. You have to use PDE layer which gets all traffic information for a tile and then extract the link ids of your interest. We have 100% coverage in WEU and NA. For MEA, we have 100% coverage on FC1-FC4 roads and less coverage on FC5 roads(which are destination roads).

Generating a secure key that restricts a user to a particular radius

I was thinking of using Algolia's Secured API Keys feature to limit my users' queries to a particular geographic area (e.g., 50 miles around their home location). The idea was that users shouldn't be able to search the entire system, only the part of it that is relevant to them, thus limiting overall exposure of database. Does the API support anything like this, or do I need to use the tagging feature to do something less specific, e.g., tagging records by the user's home state ("New York") and then restricting access based on that tag?
you should be able to do so by generating a specific API key with pre-filled search parameters for each of your user.
Each key will have a specific around lat lng parameter and a specific radius also.
The user will not be able to trick the key to use different pre-filled search parameters. But you can still use different parameters (that were not pre-filled).
First, you need to create a new search only api key in your dashboard.
Then, using the JavaScript (node.js) client for instance:
var public_key = client.generateSecuredApiKey('YourSearchOnlyApiKey', {aroundLatLng: '43.0909,23.99898', aroundRadius: 50 * 1000});
Then on the frontend, in the browser, using this new api key, your user will only be able to search for items around the provided latitude longitude with a 50km radius.
You can use any geo search parameter https://www.algolia.com/doc/rest#geo-search-parameters.
More infos:
https://www.algolia.com/doc/tutorials/security
https://github.com/algolia/algoliasearch-client-js#security--user-api-keys
Every other API client has the same paragraph.

Points of interest for zip code

I"m looking for way to get list of points of interests like airports, parks, etc. per zip code using Bing maps. Believe me, I search google but it looks like my google is broken since I can't find anything useful. I just need a way to get that info. If there is like a list that would be even better. Any help is appreciated fellows. Is there a simple URL where I can pass in my bing map key, a category and longitude/latitude and get a list of point of interests?
You could use the NAVTEQ point of interest data sources that are in the Bing spatial Data Services here: https://msdn.microsoft.com/en-us/library/hh478189.aspx
You can use the Query API to filter on the PostalCode property: https://msdn.microsoft.com/en-us/library/gg585126.aspx
Here is an example that gets points of interests that are in zip code 98004 and returns the results as XML:
http://spatial.virtualearth.net/REST/v1/data/f22876ec257b474b82fe2ffcb8393150/NavteqNA/NavteqPOIs?&$filter=PostalCode%20eq%20'98004'&$top=250&o=xml&key=YOUR_BING_MAPS_KEY
That said, make sure that your use case does not go against this restriction in the Bing Maps terms of use:
(h)Use Content that consists of points of interest data to generate
sales leads information in the form of ASCII or other text-formatted
lists of category-specific business listings which (i) include
complete mailing address for each business; and (ii) contain a
substantial portion of such listings for a particular country, city,
state or zip code region.