Skip to content

Commit 542be47

Browse files
author
vs
committed
add UI example
1 parent 3fa3394 commit 542be47

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

examples/UI.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Outscraper Platform UI
2+
3+
Allows using Outscraper Platform via [Outscraper API](https://app.outscraper.com/api-docs#tag/Outscraper-Platform-UI
4+
5+
## Installation
6+
7+
Python 3+
8+
```bash
9+
pip install outscraper
10+
```
11+
12+
[Link to the Python package page](https://pypi.org/project/outscraper/)
13+
14+
## Initialization
15+
```python
16+
from outscraper import ApiClient
17+
18+
client = ApiClient(api_key='SECRET_API_KEY')
19+
```
20+
[Link to the profile page to create the API key](https://app.outscraper.com/profile)
21+
22+
## Get all UI tasks
23+
24+
```python
25+
all_tasks = []
26+
27+
has_more = True
28+
last_id = None
29+
30+
while has_more:
31+
tasks, has_more = api_client.get_tasks(last_id=last_id, page_size=20)
32+
33+
if not tasks:
34+
break
35+
36+
last_id = tasks[-1]['id']
37+
all_tasks.extend(tasks)
38+
```

0 commit comments

Comments
 (0)