JasonJensenDev
JasonJensenDev

Reputation: 2407

Google Places API - Text search not returning specific place, even though place details query works

Here's something that has me scratching my head and wondering what I'm missing - I'm trying to use the Google Places API to search for a specific business, but it's not showing up in the results. Here are the business details:

Google Places API Search - No results, even though there should be

Here is the Google Place API query I've been trying:

https://maps.googleapis.com/maps/api/place/findplacefromtext/json?inputtype=textquery&input=Website Kong llc&key=YOUR_GOOGLE_PLACES_API_KEY

But I get back the following:

{
    "candidates": [],
    "debug_log": {
        "line": []
    },
    "status": "ZERO_RESULTS"
}

Google Places API Details - Success

But when I query the Google Place API details endpoint, it finds it with no problem:

https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJG6VFjT0us1IRfzmduSzk2mQ&key=YOUR_GOOGLE_PLACES_API_KEY

Which returns the following:

{
    "html_attributions": [],
    "result": {
        "address_components": [
            {
                "long_name": "Minneapolis",
                "short_name": "Minneapolis",
                "types": [
                    "locality",
                    "political"
                ]
            },
            {
                "long_name": "Anoka County",
                "short_name": "Anoka County",
                "types": [
                    "administrative_area_level_2",
                    "political"
                ]
            },
            {
                "long_name": "Minnesota",
                "short_name": "MN",
                "types": [
                    "administrative_area_level_1",
                    "political"
                ]
            },
            {
                "long_name": "United States",
                "short_name": "US",
                "types": [
                    "country",
                    "political"
                ]
            }
        ],
        "adr_address": "<span class=\"locality\">Minneapolis</span>, <span class=\"region\">MN</span>, <span class=\"country-name\">USA</span>",
        "formatted_address": "Minneapolis, MN, USA",
        "formatted_phone_number": "(612) 470-5664",
        "geometry": {
            "location": {
                "lat": 45.6468003,
                "lng": -127.268921
            },
            "location_type": "APPROXIMATE",
            "viewport": {
                "northeast": {
                    "lat": 90,
                    "lng": 180
                },
                "southwest": {
                    "lat": -10.17844973037574,
                    "lng": -180
                }
            }
        },
        "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
        "id": "73bf8c40a758fbb8862479d58809432014c39d9c",
        "international_phone_number": "+1 612-470-5664",
        "name": "Website Kong llc",
        "opening_hours": {
            "open_now": true,
            "periods": [
                {
                    "close": {
                        "day": 1,
                        "time": "1800"
                    },
                    "open": {
                        "day": 1,
                        "time": "0600"
                    }
                },
                {
                    "close": {
                        "day": 2,
                        "time": "1800"
                    },
                    "open": {
                        "day": 2,
                        "time": "0600"
                    }
                },
                {
                    "close": {
                        "day": 3,
                        "time": "1800"
                    },
                    "open": {
                        "day": 3,
                        "time": "0600"
                    }
                },
                {
                    "close": {
                        "day": 4,
                        "time": "1800"
                    },
                    "open": {
                        "day": 4,
                        "time": "0600"
                    }
                },
                {
                    "close": {
                        "day": 5,
                        "time": "1800"
                    },
                    "open": {
                        "day": 5,
                        "time": "0600"
                    }
                },
                {
                    "close": {
                        "day": 6,
                        "time": "1800"
                    },
                    "open": {
                        "day": 6,
                        "time": "0600"
                    }
                }
            ],
            "weekday_text": [
                "Monday: 6:00 AM – 6:00 PM",
                "Tuesday: 6:00 AM – 6:00 PM",
                "Wednesday: 6:00 AM – 6:00 PM",
                "Thursday: 6:00 AM – 6:00 PM",
                "Friday: 6:00 AM – 6:00 PM",
                "Saturday: 6:00 AM – 6:00 PM",
                "Sunday: Closed"
            ]
        },
        "photos": [
            {
                "height": 455,
                "html_attributions": [
                    "<a href=\"https://maps.google.com/maps/contrib/114320184842749597003/photos\">Website Kong llc</a>"
                ],
                "photo_reference": "CmRaAAAAVkLv6PYRZyANYE2hUtNpyDNZnUq0eA0gzjNf62p4dSOjarZkordaYDaGjUU6Ocq9RZfwHtNSpKTuBfjkm-j5s-whNWdoknyTTVDOprbdClQDGqoBV9qxSDkvAKJYByz1EhCeFcS_76wbLN1Xge7HtqKiGhRzTkP0VTk9w6NV9plaYC5R_RDVgQ",
                "width": 920
            },
            {
                "height": 3264,
                "html_attributions": [
                    "<a href=\"https://maps.google.com/maps/contrib/114320184842749597003/photos\">Website Kong llc</a>"
                ],
                "photo_reference": "CmRaAAAAX6vcKPk-wk3IpM3UXMtdVJq_6ze4Scslyu4pypJ9Q5kf87B1B59tnXA8ddneT14eZJtIZzC_oluy4MYcEYqxPILd8VlXK1vod7J663up0i0vdsYUVz3XIwRZLYgfnzagEhAvZzqgbe9QC8lPmarxktUYGhTpc24nfQ4n8aBEdcvI0fsePtoDng",
                "width": 2448
            },
            {
                "height": 960,
                "html_attributions": [
                    "<a href=\"https://maps.google.com/maps/contrib/114320184842749597003/photos\">Website Kong llc</a>"
                ],
                "photo_reference": "CmRaAAAA_Ge4BrxKXOdmjgX7ig60ELFYK0XltHSoxnz100ouziShGkxU-kpy_QSQzPxXcvkqZBBlv4pKRFeeIRzWifxwE5wfKFVSWeZ4W3pAOuOr0gSVnjX9UsQVYkpof_QBfNi6EhCsl2rwYOhD67EyXtZX2etaGhRzcljIKpUuiAyydao60KKlIQkuTQ",
                "width": 960
            },
            {
                "height": 593,
                "html_attributions": [
                    "<a href=\"https://maps.google.com/maps/contrib/114320184842749597003/photos\">Website Kong llc</a>"
                ],
                "photo_reference": "CmRaAAAAKrs1qwAb5eektC-7pjDTA2qfhCxGNfyV4rr-wh2mreaZ4dcoOMaFy0e5LHY809aqshkL5D7Cnums3nwT4VAcslr7G3vr1qHgahAvMaVOPQZiau3jtemwplEciRY_G6crEhC_Fo1NGerEhiH-lQZwV8IqGhQujBQDemcaRxgbzsAxzjNEp6rn2Q",
                "width": 594
            },
            {
                "height": 1171,
                "html_attributions": [
                    "<a href=\"https://maps.google.com/maps/contrib/114320184842749597003/photos\">Website Kong llc</a>"
                ],
                "photo_reference": "CmRaAAAAR9_yfJz42qMnmgrGMW8IJ6IsifAvnNvNswKO8_i6clkBH7KDfpSdqsYbmKHwIOTUh0qvp3dhucjdcioHc4xj8WkSBCTNikyo7IqP4sZsu2ifjjUbcACA78WeV0xdcz4-EhAD-5t4joClR8yJKAM9xNNDGhQiWcWExMXwwz8CSahsqIFifHmJ_Q",
                "width": 750
            },
            {
                "height": 3264,
                "html_attributions": [
                    "<a href=\"https://maps.google.com/maps/contrib/114320184842749597003/photos\">Website Kong llc</a>"
                ],
                "photo_reference": "CmRaAAAAO26x3WEs9Gbx8X-nahwYDtVd_8k41hbW7eroJl8WNytAHRNl5p-sepBQGl6EseZaBDWINxu_EQVA0AlzPAOPLBWUOtD1wunabum9ttUvDKZBiyKc9t6v0hgKeCEFYDOGEhDhR50aj9A7EpIaLsYWi7sjGhSJg-aNOh8KnJ__sl6z36DjXm62BA",
                "width": 2448
            },
            {
                "height": 487,
                "html_attributions": [
                    "<a href=\"https://maps.google.com/maps/contrib/114320184842749597003/photos\">Website Kong llc</a>"
                ],
                "photo_reference": "CmRaAAAAr0BqWJ1b6XRmiux_DSpRqZ3Eko-5_lRQaCJCvkguf6Bg3QCkjlvQPlALjtJHd_oaVHiGb9nutT9ThKr5y3AAz5xykZqmn_IxOCUWYea9q1cKlu_ZtdeotNb0t-JpGkqpEhB2BMbAYqsdqt10dQFd02AhGhSo1oq1kCQivUMTqQ45s8whDOS7Tg",
                "width": 475
            }
        ],
        "place_id": "ChIJG6VFjT0us1IRfzmduSzk2mQ",
        "rating": 5,
        "reference": "CmRRAAAAjw6aoRzrwkDoX2D24qH2CMEHZa134zCdaWxAmNEgWC_GdBBRiX2FqcD-vv68EvS_ok4DTBqhBFIWpUb4_0Nx1QL05PkbGUQ1t5vFmG05ptdySj0xfUUyLr8UV4Oc0B1CEhD1pPsTltycClRhehscvtWHGhT3LwE8gN6YGlmIi7V12eW9BKIPrQ",
        "reviews": [
            {
                "author_name": "Brian Alexander",
                "author_url": "https://www.google.com/maps/contrib/115993747564105051740/reviews",
                "language": "en",
                "profile_photo_url": "https://lh4.googleusercontent.com/-7M3dezxysac/AAAAAAAAAAI/AAAAAAAAAJ8/-AaDZ8xlfzg/s128-c0x00000000-cc-rp-mo/photo.jpg",
                "rating": 5,
                "relative_time_description": "a year ago",
                "text": "Website Kong has pleasantly surprised me with their prompt responses, changes, worth ethic, and business practices. Extremely easy to work with and always stays within budget. When opportunities arise for a marketing push they are brought to my attention and we decide whether to pursue or not. Small company with a big impact.",
                "time": 1497967550
            },
            {
                "author_name": "Bryan Roland",
                "author_url": "https://www.google.com/maps/contrib/112194488231766826317/reviews",
                "language": "en",
                "profile_photo_url": "https://lh4.googleusercontent.com/-u4pTflqAH7A/AAAAAAAAAAI/AAAAAAAAAAA/APUIFaPVRiODCX_mIhZlqK3jQztWQaXkxg/s128-c0x00000000-cc-rp-mo/photo.jpg",
                "rating": 5,
                "relative_time_description": "a year ago",
                "text": "I was referred to \"Kong\" through a friend that had been doing business with them for a few years. I was in the market for a website and I really needed to get my online presence up and running as soon as possible so I didn't miss out on any business opportunities that may have come my way. I contacted \"Kong\" with some ideas I had for the website with not much idea on what to expect or how the flow of making a website would go. They were very prompt in their response and within a few hours we were on the phone discussing the ins-and-outs of what the website would include and how it should look.\n\nBefore the process started I was a newbie in every sense of the word, so needless to say I was worried that this would be a very long and difficult process adding only stress to my business day. By the time the initial phone call was over, I had a completely different outlook on the process and realized that I was dealing with professionals that have truly mastered their craft. Getting the website up and running was seamless, the process was quick (about a week), and any edits that I needed done were taken care of within the hour.\n\nBecause of Kong's professionalism and skill, I have been a returning customer getting yet another website up and running through them as well as utilizing their Social Media Management services that are offered. Kong is currently managing not only the websites, but both Facebook pages, a twitter account, and a LinkedIn account. \n\nI would absolutely recommend Kong to both newbies and experienced business owners for Website formation, Online Optimization (SEO), and Social Media management. \n\nKong, I can't thank you enough for everything you have done and everything you are continuing to do for me and my businesses.",
                "time": 1472156495
            }
        ],
        "scope": "GOOGLE",
        "types": [
            "point_of_interest",
            "establishment"
        ],
        "url": "https://maps.google.com/?cid=7267371829459499391",
        "utc_offset": -300,
        "vicinity": "Minneapolis",
        "website": "http://www.websitekong.com/"
    },
    "status": "OK"
}

Google SERP (regular Google Search) - Success

When I just google Website Kond llc, it successfully returns search results with the business details on the right side.

https://www.google.com/search?ei=AD57W6qyIdiQ0PEPlouJ2AY&q=website+kong+llc&oq=website+kong+llc&gs_l=psy-ab.3...20128.22287.0.22727.16.16.0.0.0.0.118.1247.15j1.16.0....0...1.1.64.psy-ab..0.15.1174...0j0i131k1j0i67k1j0i131i67k1j0i22i30k1j33i160k1.0.Ndr7KnVl_fY

enter image description here

Summary

I'd like to know how I can use Google Places API to search for this business and successfully get the business details. It appears like the business is listed successfully as it has a Google Place ID (which I found through other means than the Google Places Search) and it shows up in the Google Places Details endpoint and regular Google search. I've done this type of search thousands of times with other businesses, but this one appears to be a little different and I'd appreciate any feedback and/or suggestions. Thanks!

Update August 21, 2018

It looks like the problem was that this place was a service area location with no exact address and Google currently has no plans to include service areas in search results through the Google Places API (thanks for the heads up, xomena). So in order to get this to work, Website Kong's Google Place listing was converted to a physical address listing and it now shows up in search results as expected.

Upvotes: 2

Views: 2813

Answers (1)

xomena
xomena

Reputation: 32178

If you have a look at this business on maps.google.com you will see that it is defined as a Service area business (there is a polygon that covers USA and Canada)

https://maps.google.com/?cid=7267371829459499391

enter image description here

Unfortunately, all Service area businesses are excluded from Places API searches and autocomplete. This is a known issue and it was reported in Google issue tracker

https://issuetracker.google.com/issues/35828187

I would suggest starring the bug to add your vote and subscribe to further notifications.

Last comment from Google states (#26):

Service Area Businesses continue to be a recurring topic. While there are no plans to change the current status in the short term, we did update the Place ID finder at https://devsite.googleplex.com/my-business/content/tools/placeid-lookup which is embeded in the Google My Business FAQ at https://support.google.com/business/answer/7035772#place_id

This Place ID finder is the only one that can be used to find the Place ID for a Service Area Business. The only use case for this is currently for the business owner to provide this Place ID to Google My Business.

Place Details may be used to retrieve details about a Service Area Business by its Place ID. All other Maps APIs (Geocoding, Directions, etc.) will not return Service Area Businesses.

I hope my answer clarifies your doubt.

Upvotes: 1

Related Questions