@@ -61,7 +61,7 @@ def _wait_request_archive(self, request_id: str) -> dict:
6161
6262 raise Exception ('Timeout exceeded' )
6363
64- def google_search (self , query : list , language : str = 'en' , region : str = None ) -> dict :
64+ def google_search (self , query : list , language : str = 'en' , region : str = None ) -> list :
6565 '''
6666 Get data from Google search
6767
@@ -71,7 +71,7 @@ def google_search(self, query: list, language: str = 'en', region: str = None) -
7171 region (str): parameter specifies the region to use for Google. Available values: "AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AG", "AR", "AM", "AU", "AT", "AZ", "BS", "BH", "BD", "BY", "BE", "BZ", "BJ", "BT", "BO", "BA", "BW", "BR", "VG", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "CF", "TD", "CL", "CN", "CO", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "EE", "ET", "FJ", "FI", "FR", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GT", "GG", "GY", "HT", "HN", "HK", "HU", "IS", "IN", "ID", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KW", "KG", "LA", "LV", "LB", "LS", "LY", "LI", "LT", "LU", "MG", "MW", "MY", "MV", "ML", "MT", "MU", "MX", "FM", "MD", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NZ", "NI", "NE", "NG", "NU", "MK", "NO", "OM", "PK", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RO", "RU", "RW", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "KR", "ES", "LK", "SH", "VC", "SR", "SE", "CH", "TW", "TJ", "TZ", "TH", "TL", "TG", "TO", "TT", "TN", "TR", "TM", "VI", "UG", "UA", "AE", "GB", "US", "UY", "UZ", "VU", "VE", "VN", "ZM", "ZW".
7272
7373 Returns:
74- dict : json result
74+ list : json result
7575 '''
7676 response = requests .get (f'{ self ._api_url } /search' , params = {
7777 'query' : as_list (query ),
@@ -80,13 +80,13 @@ def google_search(self, query: list, language: str = 'en', region: str = None) -
8080 }, headers = self ._api_headers )
8181
8282 if 199 < response .status_code < 300 :
83- return self ._wait_request_archive (response .json ()['id' ])
83+ return self ._wait_request_archive (response .json ()['id' ]). get ( 'data' , [])
8484
8585 raise Exception (f'Response status code: { response .status_code } ' )
8686
8787 def google_maps_search (self , query : list , limit : int = 400 , extract_contacts : bool = False , drop_duplicates : bool = False ,
8888 coordinates : str = None , language : str = 'en' , region : str = None
89- ) -> dict :
89+ ) -> list :
9090 '''
9191 Get data from Google Maps
9292
@@ -100,7 +100,7 @@ def google_maps_search(self, query: list, limit: int = 400, extract_contacts: bo
100100 region (str): parameter specifies the region to use for Google. Available values: "AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AG", "AR", "AM", "AU", "AT", "AZ", "BS", "BH", "BD", "BY", "BE", "BZ", "BJ", "BT", "BO", "BA", "BW", "BR", "VG", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "CF", "TD", "CL", "CN", "CO", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "EE", "ET", "FJ", "FI", "FR", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GT", "GG", "GY", "HT", "HN", "HK", "HU", "IS", "IN", "ID", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KW", "KG", "LA", "LV", "LB", "LS", "LY", "LI", "LT", "LU", "MG", "MW", "MY", "MV", "ML", "MT", "MU", "MX", "FM", "MD", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NZ", "NI", "NE", "NG", "NU", "MK", "NO", "OM", "PK", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RO", "RU", "RW", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "KR", "ES", "LK", "SH", "VC", "SR", "SE", "CH", "TW", "TJ", "TZ", "TH", "TL", "TG", "TO", "TT", "TN", "TR", "TM", "VI", "UG", "UA", "AE", "GB", "US", "UY", "UZ", "VU", "VE", "VN", "ZM", "ZW".
101101
102102 Returns:
103- dict : json result
103+ list : json result
104104 '''
105105 response = requests .get (f'{ self ._api_url } /maps/search' , params = {
106106 'query' : as_list (query ),
@@ -120,7 +120,7 @@ def google_maps_search(self, query: list, limit: int = 400, extract_contacts: bo
120120 def google_maps_reviews (self , query : list , reviewsLimit : int = 100 , limit : int = 1 , sort : str = 'most_relevant' ,
121121 skip : int = 0 , start : int = None , cutoff : int = None , cutoff_rating : int = None , ignore_empty : bool = False ,
122122 coordinates : str = None , language : str = 'en' , region : str = None
123- ) -> dict :
123+ ) -> list :
124124 '''
125125 Get reviews from Google Maps
126126
@@ -139,7 +139,7 @@ def google_maps_reviews(self, query: list, reviewsLimit: int = 100, limit: int =
139139 region (str): parameter specifies the region to use for Google. Available values: "AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AG", "AR", "AM", "AU", "AT", "AZ", "BS", "BH", "BD", "BY", "BE", "BZ", "BJ", "BT", "BO", "BA", "BW", "BR", "VG", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "CF", "TD", "CL", "CN", "CO", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "EE", "ET", "FJ", "FI", "FR", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GT", "GG", "GY", "HT", "HN", "HK", "HU", "IS", "IN", "ID", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KW", "KG", "LA", "LV", "LB", "LS", "LY", "LI", "LT", "LU", "MG", "MW", "MY", "MV", "ML", "MT", "MU", "MX", "FM", "MD", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NZ", "NI", "NE", "NG", "NU", "MK", "NO", "OM", "PK", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RO", "RU", "RW", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "KR", "ES", "LK", "SH", "VC", "SR", "SE", "CH", "TW", "TJ", "TZ", "TH", "TL", "TG", "TO", "TT", "TN", "TR", "TM", "VI", "UG", "UA", "AE", "GB", "US", "UY", "UZ", "VU", "VE", "VN", "ZM", "ZW".
140140
141141 Returns:
142- dict : json result
142+ list : json result
143143 '''
144144 response = requests .get (f'{ self ._api_url } /maps/reviews-v2' , params = {
145145 'query' : as_list (query ),
@@ -162,7 +162,7 @@ def google_maps_reviews(self, query: list, reviewsLimit: int = 100, limit: int =
162162 raise Exception (f'Response status code: { response .status_code } ' )
163163
164164 def google_maps_photos (self , query : list , photosLimit : int = 100 , limit : int = 1 , coordinates : str = None , language : str = 'en' , region : str = None
165- ) -> dict :
165+ ) -> list :
166166 '''
167167 Get reviews from Google Maps
168168
@@ -175,7 +175,7 @@ def google_maps_photos(self, query: list, photosLimit: int = 100, limit: int = 1
175175 region (str): parameter specifies the region to use for Google. Available values: "AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AG", "AR", "AM", "AU", "AT", "AZ", "BS", "BH", "BD", "BY", "BE", "BZ", "BJ", "BT", "BO", "BA", "BW", "BR", "VG", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "CF", "TD", "CL", "CN", "CO", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "EE", "ET", "FJ", "FI", "FR", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GT", "GG", "GY", "HT", "HN", "HK", "HU", "IS", "IN", "ID", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KW", "KG", "LA", "LV", "LB", "LS", "LY", "LI", "LT", "LU", "MG", "MW", "MY", "MV", "ML", "MT", "MU", "MX", "FM", "MD", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NZ", "NI", "NE", "NG", "NU", "MK", "NO", "OM", "PK", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RO", "RU", "RW", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "KR", "ES", "LK", "SH", "VC", "SR", "SE", "CH", "TW", "TJ", "TZ", "TH", "TL", "TG", "TO", "TT", "TN", "TR", "TM", "VI", "UG", "UA", "AE", "GB", "US", "UY", "UZ", "VU", "VE", "VN", "ZM", "ZW".
176176
177177 Returns:
178- dict : json result
178+ list : json result
179179 '''
180180 response = requests .get (f'{ self ._api_url } /maps/photos' , params = {
181181 'query' : as_list (query ),
@@ -191,12 +191,12 @@ def google_maps_photos(self, query: list, photosLimit: int = 100, limit: int = 1
191191
192192 raise Exception (f'Response status code: { response .status_code } ' )
193193
194- def google_maps_business_reviews (self , * args , ** kwargs ) -> dict : # deprecated
194+ def google_maps_business_reviews (self , * args , ** kwargs ) -> list : # deprecated
195195 return self .google_maps_reviews (* args , ** kwargs )
196196
197197 def google_play_reviews (self , query : list , reviewsLimit : int = 100 , sort : str = 'most_relevant' , cutoff : int = None ,
198198 rating : int = None , language : str = 'en'
199- ) -> dict :
199+ ) -> list :
200200 '''
201201 Returns reviews from any app/book/movie in the Google Play store.
202202
@@ -209,7 +209,7 @@ def google_play_reviews(self, query: list, reviewsLimit: int = 100, sort: str =
209209 language (str): parameter specifies the language to use for Google. Available values: "en", "de", "es", "es-419", "fr", "hr", "it", "nl", "pl", "pt-BR", "pt-PT", "vi", "tr", "ru", "ar", "th", "ko", "zh-CN", "zh-TW", "ja", "ach", "af", "ak", "ig", "az", "ban", "ceb", "xx-bork", "bs", "br", "ca", "cs", "sn", "co", "cy", "da", "yo", "et", "xx-elmer", "eo", "eu", "ee", "tl", "fil", "fo", "fy", "gaa", "ga", "gd", "gl", "gn", "xx-hacker", "ht", "ha", "haw", "bem", "rn", "id", "ia", "xh", "zu", "is", "jw", "rw", "sw", "tlh", "kg", "mfe", "kri", "la", "lv", "to", "lt", "ln", "loz", "lua", "lg", "hu", "mg", "mt", "mi", "ms", "pcm", "no", "nso", "ny", "nn", "uz", "oc", "om", "xx-pirate", "ro", "rm", "qu", "nyn", "crs", "sq", "sk", "sl", "so", "st", "sr-ME", "sr-Latn", "su", "fi", "sv", "tn", "tum", "tk", "tw", "wo", "el", "be", "bg", "ky", "kk", "mk", "mn", "sr", "tt", "tg", "uk", "ka", "hy", "yi", "iw", "ug", "ur", "ps", "sd", "fa", "ckb", "ti", "am", "ne", "mr", "hi", "bn", "pa", "gu", "or", "ta", "te", "kn", "ml", "si", "lo", "my", "km", "chr".
210210
211211 Returns:
212- dict : json result
212+ list : json result
213213 '''
214214 response = requests .get (f'{ self ._api_url } /google-play/reviews' , params = {
215215 'query' : as_list (query ),
0 commit comments