@@ -36,3 +36,43 @@ while has_more:
3636 last_id = tasks[- 1 ][' id' ]
3737 all_tasks.extend(tasks)
3838```
39+
40+ ## Create UI Task for Google Maps Scraper
41+
42+ ``` python
43+ import requests
44+
45+
46+ json_data = {
47+ ' service_name' : ' google_maps_service_v2' , # service ID
48+ ' queries' : [], # leave empty when using locations and enrichLocations
49+ ' settings' : {
50+ ' output_extension' : ' xlsx' ,
51+ ' output_columns' : [], # leave empty to get all columns
52+ },
53+ ' tags' : [' my first huge API task' ],
54+ ' enrichments' : [
55+ ' domains_service' ,
56+ ' company_insights_service' ,
57+ ],
58+ ' categories' : [
59+ ' restaurant' ,
60+ ' dentist' ,
61+ ],
62+ ' locations' : [
63+ ' SE>Stockholm' ,
64+ ],
65+ ' language' : ' en' , # 2 letter language code
66+ ' region' : ' SE' , # 2 letter country code
67+ ' limit' : 0 , # total limit, 0 - unlimited
68+ ' organizationsPerQueryLimit' : 500 , # limit per each query (keep it as it is)
69+ ' useZipCodes' : True , # required to use zip codes
70+ ' dropDuplicates' : True ,
71+ ' dropEmailDuplicates' : False ,
72+ ' ignoreWithoutEmails' : False ,
73+ ' enrichLocations' : True , # reiqred when using locations
74+ }
75+
76+ response = requests.post(' https://api.app.outscraper.com/tasks' , headers = {' X-API-KEY' : ' SECRET_API_KEY' }, json = json_data)
77+ ```
78+
0 commit comments