@@ -28,16 +28,19 @@ def __init__(self, api_key: str, requests_pause: int = 5) -> None:
2828 }
2929 self ._requests_pause = requests_pause
3030
31- def get_requests_history (self ) -> list :
31+ def get_requests_history (self , type : str = 'running' ) -> list :
3232 '''
3333 Fetch up to 100 of your last requests.
3434
3535 Parameters:
36+ type (str): parameter allows you to filter requests by type (running/finished).
3637
3738 Returns:
3839 list: requests history
40+
41+ See: https://app.outscraper.com/api-docs#tag/Requests/paths/~1requests/get
3942 '''
40- response = requests .get (f'{ self ._api_url } /requests' , headers = self ._api_headers )
43+ response = requests .get (f'{ self ._api_url } /requests?type= { type } ' , headers = self ._api_headers )
4144
4245 if 199 < response .status_code < 300 :
4346 return response .json ()
@@ -53,6 +56,8 @@ def get_request_archive(self, request_id: str) -> dict:
5356
5457 Returns:
5558 dict: result from the archive
59+
60+ See: https://app.outscraper.com/api-docs#tag/Requests/paths/~1requests~1{requestId}/get
5661 '''
5762 response = requests .get (f'{ self ._api_url } /requests/{ request_id } ' )
5863
@@ -91,8 +96,10 @@ def google_search(self, query: list, language: str = 'en', region: str = None, f
9196
9297 Returns:
9398 list: json result
99+
100+ See: https://app.outscraper.com/api-docs#tag/Google-Search/paths/~1google-search-v2/get
94101 '''
95- response = requests .get (f'{ self ._api_url } /search' , params = {
102+ response = requests .get (f'{ self ._api_url } /google- search-v2 ' , params = {
96103 'query' : as_list (query ),
97104 'language' : language ,
98105 'region' : region ,
@@ -125,6 +132,8 @@ def google_maps_search(self, query: list, limit: int = 500, extract_contacts: bo
125132
126133 Returns:
127134 list: json result
135+
136+ See: https://app.outscraper.com/api-docs#tag/Google-Maps/paths/~1maps~1search/get
128137 '''
129138 response = requests .get (f'{ self ._api_url } /maps/search' , params = {
130139 'query' : as_list (query ),
@@ -162,6 +171,8 @@ def google_maps_search_v2(self, query: list, limit: int = 20, drop_duplicates: b
162171
163172 Returns:
164173 list: json result
174+
175+ See: https://app.outscraper.com/api-docs#tag/Google-Maps/paths/~1maps~1search-v2/get
165176 '''
166177 response = requests .get (f'{ self ._api_url } /maps/search-v2' , params = {
167178 'query' : as_list (query ),
@@ -197,6 +208,8 @@ def google_maps_directions(self, query: list, departure_time: int = None, finish
197208
198209 Returns:
199210 list: json result
211+
212+ See: https://app.outscraper.com/api-docs#tag/Google-Maps/paths/~1maps~1directions/get
200213 '''
201214 response = requests .get (f'{ self ._api_url } /maps/directions' , params = {
202215 'query' : as_list (query ),
@@ -243,6 +256,8 @@ def google_maps_reviews(self, query: list, reviewsLimit: int = 100, limit: int =
243256
244257 Returns:
245258 list: json result
259+
260+ See: https://app.outscraper.com/api-docs#tag/Google-Maps/paths/~1maps~1reviews-v2/get
246261 '''
247262 response = requests .get (f'{ self ._api_url } /maps/reviews-v2' , params = {
248263 'query' : as_list (query ),
@@ -293,6 +308,8 @@ def google_maps_reviews_v3(self, query: list, reviewsLimit: int = 10, limit: int
293308
294309 Returns:
295310 list: json result
311+
312+ See: https://app.outscraper.com/api-docs#tag/Google-Maps/paths/~1maps~1reviews-v3/get
296313 '''
297314 async_request = reviewsLimit > 1000
298315 response = requests .get (f'{ self ._api_url } /maps/reviews-v3' , params = {
@@ -336,6 +353,8 @@ def google_maps_photos(self, query: list, photosLimit: int = 100, limit: int = 1
336353
337354 Returns:
338355 list: json result
356+
357+ See: https://app.outscraper.com/api-docs#tag/Google-Maps/paths/~1maps~1photos/get
339358 '''
340359 response = requests .get (f'{ self ._api_url } /maps/photos' , params = {
341360 'query' : as_list (query ),
@@ -375,6 +394,8 @@ def google_play_reviews(self, query: list, reviewsLimit: int = 100, sort: str =
375394
376395 Returns:
377396 list: json result
397+
398+ See: https://app.outscraper.com/api-docs#tag/Google-Play/paths/~1google-play~1reviews/get
378399 '''
379400 response = requests .get (f'{ self ._api_url } /google-play/reviews' , params = {
380401 'query' : as_list (query ),
@@ -401,6 +422,8 @@ def emails_and_contacts(self, query: list, fields: list = None) -> list:
401422
402423 Returns:
403424 list: json result
425+
426+ See: https://app.outscraper.com/api-docs#tag/Emails-and-Contacts
404427 '''
405428 response = requests .get (f'{ self ._api_url } /emails-and-contacts' , params = {
406429 'query' : as_list (query ),
0 commit comments