Get a google plus URL based on place_id or other location data as input - google-plus

This solution is no longer correct - the url returned is now always a maps.google.com url. Is there a way to get the google plus url from either the place id or with some other programmatic means?
I'm okay with using an API that costs money.
I'm okay with using some
other location information as input but would prefer to use place id
as input.

Related

How to limit my api result with edamam API

I am trying to make a call to the edamam API to just get 1 item, right now when I call it I get a lot of results which I don't need, is there a query I can use to limit the results?
I have tried to put maxResults at the end but id doesn't change my response
https://api.edamam.com/api/food-database/v2/parser?session=40&app_id=$id&app_key=$appKey&ingr=rice&maxResults=1
The official documentation does not name any means to actively influence the result set / page size of the result.
There is an OpenAPI specification available as well.
There seems to be basic support for pagination, however that is solely based on a session and only supports iteration instead of full control of which page to request and of which size a page should be.
To obtain the next page, the API user should follow the “next” link from the “_links” section in the result JSON ...
The /auto-complete endpoint allows to provide a limit parameter. However, that does not seem to be supported by the /api/food-database/v2/parser endpoint you're interested in.

How to get image URLs in different pages using a single WIKI api call?

We can get text extract of different pages in a single wiki api call by using pipe character ( | ).
For eg : http://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exlimit=max&explaintext&exintro&titles=Yahoo|Google&redirects=
By using this api call, we can get datas about Google and Yahoo in text format. Here we get datas of both Google and Yahoo in a single api call.
I want to get image urls of both Google and Yahoo in a single wiki api call.
Is there any method to get all image urls of different pages in a single wiki api call?
Yes, just switch prop=extracts to prop=images. Works exactly the same way:
http://en.wikipedia.org/w/api.php?action=query&titles=Yahoo|Google&prop=images
The full documentation is here: http://www.mediawiki.org/wiki/API:Properties
To get the url of an image, use prop=imageinfo&iiprop=url for the corresponding file page.
Finally, you can combine it all in one single request, by using the prop=images result as a generator for the prop=imageinfo call:
http://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=url&generator=images&titles=Google|Yahoo!
There are some warning because you are missing the format=json. So the correct is
https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&format=json&iiprop=url&generator=images&titles=Google|Yahoo

Web Scraping through Excel VBA

I need to fetch company addresses(cim) from site http://www.ceginfo.hu/
Example Company Name: AB-KONTÍR Szolgáltató Bt.
I know how to do it using WinHttp.WinHttpRequest object and FireBug.
But I am not able to decide to which URL I should send this request.
When I analyse the request/responses using FireBug, I get the following URL:
http://www.ceginfo.hu/company/search/4221638
4221638 is CompanyID here I think. But in my case I will have company name only and that's what my problem is.
So can anybody please tell me where can I get URL using firebug or any other tool using which I can track the URL with Company Name as parameter which I can use in my VBA code.
Thanks in advance!
So can anybody please tell me where can I get URL using firebug or any
other tool using which I can track the URL with Company Name as
parameter which I can use in my VBA code.
No. Unless there is a publicly available database (I would suggest calling them, if you can) or an API that allows for programmatic access, the only way to arrive at this link slug is by executing the search.
Further, the post slog is not as relevant as you think. If you search for simply "Kontir", this is the resulting page -- with many results:
http://www.ceginfo.hu/company/search/4222407
You're going to have to automate the "search" -- passing the criteria to the Web Page and executing the button-click and/or HTTPPost, and then parse the result(s). In the example company name, there is only one result. But it is possible as in my example above, that there may be multiple matches for some queries, and then you will need to have a method of dealing with these, or ignoring them.

How can i remake the return from Google search api?

How can i use Google search api to get like on the google engine, title of website,a short description and URL. Is it possible?
I tried the api but it gives me only some information that doesn`t have a url or title to a website.
Using the Google shopping api, you can retrieve the title, short description and url. I've achieved this in a c# application where it returns a json file from the url below and parse over it.
You need a apiId to start with.
Using this url you can add search parameters after the q, in this example just searching for digital camera.
https://www.googleapis.com/shopping/search/v1/public/products?key=key&country=US&q=digital+camera
See http://code.google.com/apis/shopping/search/v1/getting_started.html
for more details
I'm not sure that I have enough information, but I find the Google Custom Search API reference page has the reference JSON/ATOM examples:
https://code.google.com/apis/customsearch/v1/reference.html
This query will get you started:
https://www.googleapis.com/customsearch/v1?key={YOURAPIKEY}&cx={cx?}&cref={cref?}&q=st%20olaf
Does this get you started?
Take care!
speeves

How to detect if a query string is relevant for a Google Map Static API lookup

I am currently developing a web app that uses Google's Static Map API, in order to display maps of places upon user's request.
My problem is the following: How can I detect if a given string is relevant or not to searching Google Maps ?
Examples:
Searching for "North Beach San Francisco" with the following URL returns a relevant map of what is asked.
http://maps.google.com/maps/api/staticmap?size=270x185&maptype=roadmap&sensor=false&markers=north%20beach%20san%20francisco
However, searching for something that is not an address like Orwell's "1984" with the following URL does also return a map but it is absolutely not relevant to the query.
http://maps.google.com/maps/api/staticmap?size=270x185&maptype=roadmap&sensor=false&markers=1984
My point is, I don't need to parse the query since Google Maps Static API can find an address pretty easily, but I need to know if the string the user submitted should be searched in Maps or just regular search.
There is a lot of address-parsing related questions on SO, but I repeat that I don't want to have a full address parsing process, I just want to know if Google would have displayed a map link if I had searched the same thing on their website.
I do know the Google Geocoding API but it's roughly the same, as it will return coordinates even for unadapted queries like "1984". (And I'm not even talking about the limitations that make it pretty impossible to use in a large-scale web application)
Thank you for your time !
Gael
What I eventually did:
Google Geocoding API has a response parameter that indicates the accuracy of the geocoding lookup. Using this parameter, I was able to determine if my query is a real address or just a standard query looking like an address.
Keep in mind that both Geocoding Service and Javascript Geocoding API have limitations (as of now, 2,500 requests per IP per day)
Do post a comment if you want further information about that !