2
RのGoogleプレイスAPIからレストランの詳細を取得しようとしていますが、Googleが提供する20個の結果を正常に取得できますが、next_page_token
を返すため、他の結果(私が探している場所の半径50km付近に20以上のレストランがあることは論理的です)。しかし、next_page_token
を使用すると、NULL
が返されます。 は、ここに私のコードです:次のページトークンR Google Places API
install.packages("googleway")
library(googleway)
key <- 'my key'
df_places <- google_places(search_string = "restaurant",
location = c(-33, 151),
page_token = "next_page_token",
radius = 50000,
key = key)
df_places$results$name
df_places$results$rating
df_places$results$formatted_address
df_places$results$geometry$location
そして、ここではそれがnext_page_token
せずに返すものです:
> df_places$results$name
NULL
:など
[1] "Gennaro's Italian Restaurant"
[2] "Mount Broke Wines & Restaurant"
[3] "Oak Dairy Bar"
[4] "Bimbadgen"
[5] "Subway Restaurant"
[6] "Muse Restaurant"
[7] "Ocean Restaurant"
...ここ
はそれがnext_page_token
で返すものです
私が繰り返し何をしているのか不思議なことは、 NULL
?
これは完全に機能しました! –