Get Tripadvisor URLs avatar
Get Tripadvisor URLs
Try for free

Pay $1.00 for 1,000 Results

View all Actors
Get Tripadvisor URLs

Get Tripadvisor URLs

tri_angle/get-tripadvisor-urls
Try for free

Pay $1.00 for 1,000 Results

Find Tripadvisor URLs starting from geographical coordinates.

Tripadvisor URLs

Finds Tripadvisor places' URLs in a geographical search area.

Input

To get started, you need an initial point with its geographical coordinates, in degrees, which will be the center of the search area. Then, choose the place type (either restaurant or hotel) and, optionally, a string to match with the place's name.

The queries must be formatted like this, with the values separated by comma, without white spaces around commas:

Latitude,longitude,place-type,match-string

Finally, choose the maximum distance from the center point. The API in use allows a maximum distance up to around 500 meters.

Here is a sample input:

1{
2	"queries": [
3		"44.2073275,-69.8277909,restaurant,Popeyes Louisiana Kitchen",
4		"43.410405,-70.5582322,restaurant,Popeyes Louisiana Kitchen",
5		"43.636905,-70.3363167,restaurant"
6	],
7	"maxResultsPerQuery": 1,
8	"maxDistanceInMeters": 25,
9	"matchStringTolerance": 1
10}

As you can see, maxResultsPerQuery is 1, because we are trying to match exactly some places we already know, and find their URLs on Tripadvisor. Also, notice that the third query does not provide a string to match. Even if that's the case, we would still like to match a "Popeyes Louisiana Kitchen" in this example.

Output

Here is a sample output, originated from the previous input:

1[
2    {
3        "query": "44.2073275,-69.8277909,restaurant,Popeyes Louisiana Kitchen",
4        "url": "https://www.tripadvisor.com/Restaurant_Review-g40891-d21201667-Reviews-Popeyes_Louisiana_Kitchen-South_Gardiner_Maine.html",
5        "id": 21201667,
6        "name": "Popeyes Louisiana Kitchen",
7        "lat": 44.20733,
8        "lng": -69.82779,
9        "distance": 0.28709411850707856,
10        "nameScore": 0
11    },
12    {
13        "query": "43.636905,-70.3363167,restaurant",
14        "url": "https://www.tripadvisor.com/Restaurant_Review-g40894-d12030525-Reviews-Popeyes_Louisiana_Kitchen-South_Portland_Maine.html",
15        "id": 12030525,
16        "name": "Popeyes Louisiana Kitchen",
17        "lat": 43.636906,
18        "lng": -70.33632,
19        "distance": 0.2879064202290549
20    }
21]

From this output, we can see that:

  1. The first query matched the correct place.
  2. The second query didn't produce any result. In fact, the API returned the following results, none of which matched the input string "Popeyes Louisiana Kitchen", meaning that the place we're interested in is not available on Tripadvisor:
    • Kennebunk South Travel Plaza
    • Burger King
    • Auntie Anne's
    • Dunkin'
    • Dunkin' (another one)
  3. The third query matched a "Popeyes Louisiana Kitchen", as we wished. Indeed, if you don't provide a string to match, the scraper will sort the results by distance from the center point and will give you the closest ones.
Developer
Maintained by Apify
Actor metrics
  • 2 monthly users
  • 2 stars
  • 100.0% runs succeeded
  • Created in May 2024
  • Modified 28 days ago
Categories