Yahoo, Google, Yelp API - yahoo

Is there any php API to gather information about a business(address, reviews) by its phone number from Yelp, Google, Insiderpages, Yahoo..
Please help, i have done research about these, but did't get the right info, though yelp is providing info by it's phone number but there they ask ywsid as mendatory (http://api.yelp.com/phone_search?phone=1234567890&ywsid=XXXXXXXXXXXXXXXX) but i want by phone number only.

Please note that all APIs have terms, most of them won't allow you to store their data in your own database and most of them have display requirements, before proceeding with any developing please read carefully their display requirements and terms.
Depending on your project you might not be allowed to use the data as you might need/want to on your project.
The other alternative would be scrapping sites, but most sites have rules against scraping too...
And again read a lot before putting too effort on something you are prohibited to in first place.
Yelp
ywsid = API key, you need to get your own key if you are using the yelp API, get it here
if you are using it to add it to your own database or storing the information anywhere it is against their policies display requirements & api terms.
if you are using any API you must read their terms before even thinking of doing anything.
Google Places
API
Insiderpages
I Don't think they have one but you could use the citygrid API that does a [lot of sites] search at once.
Yahoo
Yahoo API
CityGrid
As mentioned before citygrid API
Foursquare
Foursquare API
Merchant Circle
Merchant Circle API
White Pages
White Pages API
Yellow Pages
Yellow Pages API
Bottom line is, all these companies have put a lot of time and effort and money to build their databases, and they want you to redirect people back to their pages so they can make their money back/profit.

Related

How to get place description using Google API or any other API?

I am using Google API to get the place information and store it into database. Using Google API I am able to get address, opening hours, rating and reviews as shown in below image.
But, I am not able to get place description which is highlighted in below image in red circle. ("Quaint Italian mainstay for deep-dish, Chicago-style pizza, calzones, pastas & hot dogs.")
I want that information in my application. I think google is taking those information from
Freebase https://developers.google.com/freebase/guide/basic_concepts
Wikipedia https://www.mediawiki.org/wiki/How_to_contribute
But I am not sure.
Can any one help me suggest me that how I can get that information or any other API that I can use to get that information based on google place_id.
Any help would be highly appreciated.
Thank you
Accordingly to the documentation and #xomena, currently you cannot obtain this data via Places API. There is a feature request in Google issue tracker to make the detailed business type available in Places API, however Google doesn't expose any ETA (estimation time of arrival:
https://issuetracker.google.com/issues/35822953
Feel free to star this feature request to express your interest and subscribe to notification from Google.
To my knowledge it is not possible to get this information from the Google Places API. The API documentation does not display the venue description. Try to have a look here: https://developers.google.com/places/web-service/details (it might be that Google does not share all information from their platform with other developers..).
I would suggest you to do one of the following (or perhaps both):
Scrape Google the old school way; i.e. by getting the information from the HTML. There is a quite decent guide for doing that here (you would of course have to adjust the example to scraping Google instead): https://medium.freecodecamp.org/how-to-scrape-websites-with-python-and-beautifulsoup-5946935d93fe.
What I would recommend and which probably is the fastest: enrich your current data with other data. You could e.g. use Foursquare and search for the places you get from Google. It should be possible to get the description for each place on Foursquare. See here: https://developer.foursquare.com/docs/api/venues/details. If you have problems with matching the places after your query has returned, because the venue names are not exactly the same - but close, then you could use an algorithm to match strings that are close; perhaps using the levenstein distance (https://en.wikipedia.org/wiki/Levenshtein_distance).

zagat content in the Places API - ERROR

I am many errors on my Maps API Console.
I am the website owner, not the developer or webmaster.
Got an email from Google about new pricing. Below is the email.
Today we are announcing important changes, including our new name - Google Maps Platform, a simplified product structure, pay as you go pricing for all, and more. Please take a few minutes to review the announcement to familiarize yourself with the upcoming changes.
We would like to highlight a few updates that may impact your implementation. Beginning June 11th, we are launching our new pricing plan and providing all users access to support. We’ll continue to offer a free tier — all developers will receive $200 of free monthly usage of our core products.
How does this affect your current account(s)?
Based on your usage over the last 3 months and our new pricing plan, we estimate that your monthly cost will exceed the current $200 free tier.
I am trying to figure out why I have so many API calls.
I am seeing in the console, that in the "Google Places API Web Service" I have alot of "Zagat content in the Places API" calls, and they all result in error.
I am trying to figure out how this is happening, but not finding any info online. I see that the "zagatselected" parameter was discarded May of 2017. I can not figure out what is causing these errors.
Everything has been working fine, I have my own API key, and have for a long while. The only reason I am really looking into this, is because Google will now start charging me monthly.
Is it possible you expose your Maps API key to the client, don't have any restrictions on it, and someone else is calling the API/raising those errors?
If you have a snippet of code like this....
<script src="https://maps.googleapis.com/maps/api/js?key=[APIKEYHERE]&libraries=geometry,places&callback=initialize">
...on a public web page, it would be easy for someone else to take the API key and use it themselves, unless you add a IP or referrer restriction to only allow it to be used client-side from your website. You can set up restrictions on who can use your API key following these instructions.
I suspect that the new Google Maps and Places API pricing scheme (which significantly lowers the number of free Places API calls) might cause some less ethical users to use keys they can scrape off websites.

how to implement Complex Web API queries in ASP Core

I'm new to web API design, so I've tried to learn best practices of web API design using these articles:
1.Microsoft REST API Guidelines
2.Web API Design-Crafting Interfaces that Developers Love from "Apigee"
Apigee is recommending web API developers to use these recommendations to have better APIs.
I quote here two of the recommendations:
I need C# code for implementing these recommendations in my Web APIs (in ASP Core) which is a back-end for native mobile apps and AngularJs web site.
Sweep complexity behind the ‘?’
Most APIs have intricacies beyond the base level of a resource. Complexities can include many states that can be updated, changed, queried, as well as the attributes associated with
a resource.
Make it simple for developers to use the base URL by putting optional states and attributes behind the HTTP question mark. To get all red dogs running in the park:
GET /dogs?color=red&state=running&location=park
Partial response allows you to give developers just the information they need.
Take for example a request for a tweet on the Twitter API. You'll get much more than a typical twitter app often needs - including the name of person, the text of the tweet, a timestamp, how often the message was re-tweeted, and a lot of metadata.
Let's look at how several leading APIs handle giving developers just what they need in
responses, including Google who pioneered the idea of partial response.
LinkedIn
/people:(id,first-name,last-name,industry)
This request on a person returns the ID, first name, last name, and the industry.
LinkedIn does partial selection using this terse :(...) syntax which isn't self-evident.
Plus it's difficult for a developer to reverse engineer the meaning using a search engine.
Facebook
/joe.smith/friends?fields=id,name,picture
Google
?fields=title,media:group(media:thumbnail)
Google and Facebook have a similar approach, which works well.
They each have an optional parameter called fields after which you put the names of fieldsyou want to be returned.
As you see in this example, you can also put sub-objects in responses to pull in other information from additional resources.
Add optional fields in a comma-delimited list
The Google approach works extremely well.
Here's how to get just the information we need from our dogs API using this approach:
/dogs?fields=name,color,location
Now I need C# code that handles these kind of queries or even more complex like this:
api/books/?publisher=Jat&Writer=tom&location=LA?fields=title,ISBN?$orderBy=location desc,writerlimit=25&offset=50
So web API users will be able to send any kind of requests they want with different complexities, fields, ordering,... based on their needs.

Use Google Places API to autocomplete input in subscribe form

For a commercial website, I would like users to fill out a field with their shop name, and if the shop is found by google, fill out the subscription form (for example: phone number, address, logo, etc).
My question: is it possible to use this Api with that? I find that the terms of use are not clear.
PS : Sorry about my english :/
In short a few of the important terms of use are:
http://code.google.com/apis/maps/terms.html#section_9_1
You must not charge access to use your implementation of the Places Autocomplete API and it must be freely accessible to the public. Unless its part of a Mobile Application or you have a Google Enterprise agreement or obtained Google's written permission.
http://code.google.com/apis/maps/documentation/places/autocomplete.html#requirements
You must show a "Powered by Google" logo with any data accessed using the Places Autocomplete API if you do no show this data with a Google Map
If the Places Autocomplete API responses contains Listing provider information it must be displayed to the user.
If your implementation adheres to the terms of use, than it is possible for you to use the Places Autocomplete API for the purpose described.

Google Places API - Submitting reviews

I am researching whether the following is possible and if so how I could go about achieving it.
We collect reviews for businesses from their customers and we’d like to post these reviews to Google places as part of the reviews they have on their.
I was wondering how I would go about getting our website to “push” this data to the Google places website, I’ve done lots of searching on the APIs but have found nothing that says it’s possible or not.
Currently the Google Places API does not have write capability. It only has read capability. Right now only ratings are available, but I suspect reviews might come someday too.
Although you can send check-in signals and fix Places through the API. Hopefully Google will add the ability to send reviews and receive them.
If you're looking to get your content added to Google, you may want to talk to their content partnerships teams http://www.google.com/support/mapcontentpartners/
Since Google's local and maps initiatives are under the same people that would be the place to go.
I too looked into this as it would be of huge value to companies if possible.
My research led me to believe that it is not possible and could possibly violate Google's TOA with negative results for the company's Places page.
Instead, I built a workaround that makes it really easy for companies to collect feedback and get their own customers to submit the reviews: http://dallasmarketingservices.com/survey-local-unveiled-how-online-reviews-affect-your-local-business/
Maybe we will see this in the future though.

Resources