Google Place API Unit Number not fetching - google-places-api

Google Place API not fetching the Unit number for the specific address.
Example: 3/12 Selwyn Avenue Elwood, 3184, Mel, VIC
But some addresses it's fetching the unit number properly.
Example: 15/25 Batlow Street, Heckenberg NSW, Australia
Here subpremise is the unit number in the response

There is a similar issue reported on SO.
As per the support issue:
Support for subpremise elements (apt. / suite) is limited. Place
Autocomplete is not intended to support these universally.
Geocoding API will find these places, and return subpremise elements
in address_components:
so your mileage may vary.

Related

Geo Service wfs : How call by range?

I'm using the API WFS from the French Government to get geographical data. This API use OGC. (https://geoservices.ign.fr/documentation/donnees-ressources-wfs.html)
"IRIS2000" is an acronym which stood for "Islands Grouped for Statistical Information" and which referred to the target size of 2,000 inhabitants per elementary mesh. It is the basic building block for the dissemination of infra-municipal data.
I would like to get all Iris2000 data, but the API deliver 1000 objects maximum by request.
They are 49404 differents Iris2000 and I don't find the range parameter.
Could you help me please ?
WFS is a public international standard, check the specification at http://docs.opengeospatial.org/is/09-025r2/09-025r2.html.
I believe you are looking for paged request support, that is, the startIndex and count parameters: http://docs.opengeospatial.org/is/09-025r2/09-025r2.html#50

YouTube V3 api returns considerably different LIKEs and Comments results from numbers on the Web

YouTube v3 api returns significantly different LIKEs count from what is on the web version of YouTube.
Compare these:
https://monosnap.com/file/EdtDNTTGDK06zoCZ7IXkMdzn6WuyOo
https://monosnap.com/file/CcJOiKl9CBMyncHQSrPv3lkLOuqeDD
To replicate:
https://www.googleapis.com/youtube/v3/videos?id=jWnhFM1Ttwg&key={api_key}&maxResults=50&part=statistics (https://console.developers.google.com/apis/credentials - use your Youtube V3 key)
Any ideas?
Many thanks!
Since I don't have any documentation (from the YouTube Data API v3) that backs me up for what I going to say, I'll drop some thoughts about why the API returns different values in the "likeCount" section comparing to the YouTube actual video (saw in the main website):
I think that the differences in the results returned by the API and the results shown in the website are due to:
YouTube has its own calculations for set the values in the website, the API results and in the YouTube Analytics1.
It would be possible that those additional "likes" retrieved in the API aren't exposed to the calculations made by YouTube.
1 Extracted from this answer in the Google Support webpage:
The number of likes/dislikes in YouTube Analytics may be different than what you see on the watch page under the video. This
is a known issue and our team is working to fix this. In the meantime,
please refer to the counts on the watch page under the video for the most accurate count.
And
In rare instances, you might see more likes/dislikes than views since these metrics are adjusted by different verification
systems.
For the specific videoId you posted in your question, I did check at 2019-01-25 and the results were:
likeCount "by the API": 1341
likeCount "in the YouTube website": 851
Check again at 2019-01-28 the numbers did changed:
likeCount "by the API": 1367
likeCount "in the YouTube website": 877
You can try here the API request for get these results - (results for current day).
If you make a substract from the likeCount values gotten above, you'll get 26.
Maybe it is futile try make any mathematical operation for set the "correct" value shown in the YouTube website (using the likeCount result from the YouTube Data API), but if anyone want give it a try, I encourage you to share your answer.

Where to fetch REAL- TIME economic data announcements for use in algorithmic trading?

I'm looking to fetch values of macro- economic announcement data (e.g. interest rate announcements, unemployment figures, consumer price index figures etc.) as soon as/ as near to the time the figures are released from the original source to be used within an MQL4 algorithm written on metatrader4.
At the moment I'm fetching the latest value from Quandl which provides a csv API so that the value can be fetched within an MQL4 script. The issue here lies in that Quandl doesn't update latest values as soon as the sources release them, which is a factor that is very important for my algorithm.
So:
Q. Which sources allow you to fetch real- time LATEST values upon release, to be used within an algorithm?
There doesn't seem to be any documentation on the source websites such as Bureau of Labor Statistics [US], Bank of England [UK] etc. regarding fetching released data values, yet I see online FOREX market calendar websites retrieving latest values sometimes within the second the value is announced- so they must be fetching data from the source?
Examples of the sort of latest values to be fetched:
[US] Non- Farm Payroll - source: Bureau of Labor Statistics
[GB] Interest Rate Announcement - source: Bank of England
[EU] Unemployment Rate - source: Eurostat
To summarise:
which sources can I use to fetch a single real- time latest value of an economic announcement as soon as its released? (I understand latency will mean that it won't be fetched immediately)
can be fetched using MQL4
To get "near real-time", you need to be subscribed to feed services like Bloomberg. But they are expensive. They provide an WebAPI and wrapper interface.
There are other online services too, but again, they can be expensive.
Alternative way is for you to "data-scrap" them off those "near real-time" sources (note: gray-area legality).
This method is possible, I've done it. I managed to get it down to ~2sec (near real-time), and am currently using it in one of my MT4 EA project ( TriskM ):
https://www.facebook.com/TrackRiskM/photos/a.800008416769352.1073741828.781013552002172/800008486769345
Basically, in involve 2 parts:
A server application that I host in the cloud. This application's job is to go out and scrape the data, and format it properly for easy downstream consumption.
At the MT4 application (EA) level, you can make HTTP request to the cloud host and request for the info.
Update: Forex News Gun does not work any more.
The fastest free way to get macroeconomic data in almost real time is a Forex Peace Army Forex News Gun. You get all the economic signals you mentioned, and more, with a delay of less than a second after the release in most cases.
It works like this: before the actual economic data release, you set up where the program will click in case the number released will be such and such range. At the time of the release ( or better said, when the number arrives at your computer ), if the number is in the specified range, click will occur and you can possibly perform a trade or run a trading algorithm.
For an even faster access, you have to pay a lot of money ( thousands or tens of thousands of dollars monthly ) to financial news providers aka Bloomberg or Thomson-Reuters.

Bing Maps API inconsistently fails on certain postal code lookups

I have an application using Bing Maps API to retrieve coordinates for a postal code and then I perform spatial queries based on the result. There are times where I get empty results, but when I wait a few minutes it succeeds. I added logic that retried a handful of times if there's a failure but that doesn't seem to be helping. Here's the empty result I get back:
{"authenticationResultCode":"ValidCredentials","brandLogoUri":"http://dev.virtualearth.net/Branding/logo_powered_by.png","copyright":"Copyright © 2014 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","resourceSets":[{"estimatedTotal":0,"resources":[]}],"statusCode":200,"statusDescription":"OK","traceId":"7a6bfca3f89b4f94a4693a410da4feb7|CH10043840|02.00.107.2300|CH1SCH050102529"}
And here's the URL I'm calling:
http://dev.virtualearth.net/REST/v1/Locations?q=50613&o=json&key=MyApiKey
Is there a way I can retrieve further information based on the traceId? Or is this something that's just accepted when using Bing Maps API?
You should firstly check the number of requests you're doing in a specific time and put it in relation with the type of Bing Maps Key you're using. Basic keys are rate limited which means that if you exceed the allowed number of request in a specific duration, you will be blocked.
Bing Maps Trial and basic key and rate limitation information
Those types of key are rate limited for security and logicial reasons (on 24h period and with time between the request) and that's the reason why you're getting a blank response without any information regarding the fact that it failed to geocode.
See the Terms of Use regarding the limitations and other restrictions (load and stress tests as well as hammering are part of it): http://www.microsoft.com/maps/product/terms.html
So, in order to try to analyze where your problem comes from, you might:
Check the type of key you're using and how many calls you're making on a specific period
Check the header of the response, it should include a specific header value: X-MS-BM-WS-INFO set to 1 if you are rate limited
See the MSDN about error handling: http://msdn.microsoft.com/en-us/library/ff701703.aspx
If you're not in this case (if you have an enterprise account), reach the technical support so they can officialy get back to you and check the key.

Exhaustive Search on Google Places

I'm trying to use Google Places API for a business locator app, but am having trouble creating an exhaustive database of business.
1.The API call only returns 20 results back.
2.The "type" restriction (e.g. type=restaurant) does not pick up all businesses by type in a given zip. I could use "keyword" but not all restaurants have restaurant in their name, and not all spas have "spa" in their name.
3. Each call produces the same set of results from day to day, and with only 20 returns per call, how am I to get a more exhaustive database of businesses?
I can try to get around the above three constraints by looping through a very well degraded search of businesses: say by zip code, some list of keywords, category type. But I still won't get close to picking up the 50 million or so businesses in google places.
In fact, even when I make a call for restaurants and bars in my own neighborhood, I don't pick up popular places down the block from me.
How is the API usable for an app that locates places then?
Any suggestions on how to create a more exhaustive search?
Thanks,
Nad
I'm not able to answer your question regarding Google Places API.
But for your requirements ('business locator app', 'I don't pick up popular places down the block from me') I suggest you try Yelp Search API:
Yelp's API program enables you to access trusted Yelp information in real time, such as business listing info, overall business ratings and review counts, deals and recent review excerpts.
Yelp is a popular review website with a capable API and you may test the quality of database and the devoted user base they have at Yelp homepage.
Note:
They keep some data for themselves and do not return everything in response.
The (free) dev account has a limit of 100 calls per 24 hours.
I know I'm late but maybe it helps someone these days.
By default, each Nearby Search or Text Search returns up to 20
establishment results per query; however, each search can return as
many as 60 results, split across three pages.
You need to use the field nextPageToken that you will receive on the first search to get the next page.
https://developers.google.com/places/web-service/search
An issue in stack overflow says:
There is no way to get more than 60 results in Places API. Some people
tried to file a feature request in Google issue tracker, but Google
rejected it with the following comment Unfortunately Places API is not
in a position to return more than 60 results. Besides technical
reasons (latency, among others) returning more than 60 results would
make the API be more like a database or general-purpose search engine.
We'd rather improve search quality so that users don't need to go so
far down a long list of results.
google places api more than 60 results
I faced the same difficulties that you did and decided to use the Yelp API instead. It is free, very complete and returns up to 1000 results. You should however check the terms of service before doing anything. It does not provide the website of the business (only the Yelp website link).
https://www.yelp.com/developers/documentation/v3/business_search
Other options I investigated at that time:
Foursquare ventures. (It was very expensive, and only returned up to around 100 results)
Here places API
Factual Places (I don't think this one is an API)
Sygic Travel API (Specific for touristical spots)
Planet.osm (OpenStreetMap)

Resources