> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.salamoonder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scraper

> Each request in this task is priced at only €0.0001.

This helper task takes existing human data, adjusts it to make it unique while keeping a natural feel, and lets you pull real user profile pictures for your own accounts.

## Create Task​

Create the task with the [createTask](https://apidocs.salamoonder.com/endpoint/createTask) endpoint, or use our [Software Development Kit ](https://apidocs.salamoonder.com/sdk/official)to make your integration process even easier!

### **Example Request**

```json theme={null}
POST https://salamoonder.com/api/createTask
Host: salamoonder.com
Content-Type: application/json

{
    "api_key": "YOUR_API_KEY",
    "task": {
        "type": "Twitch_Scraper"
    }
}
```

Upon successfully submitting the task to us, you should receive a 'taskId' in the response.

### Example Response

```json theme={null}
{
  "error_code": 0,
  "error_description": "",
  "taskId": "d4611a5f-9b4e-4f4a-94a2-8303d97562e1"
}
```

**Response Fields:**

* `taskId` - Unique identifier for this task. Use this to retrieve results.

## **Getting Results**

Retrieve the results using the [getTaskResult ](https://apidocs.salamoonder.com/api/gettaskresult-task-result)method. or use our [Software Development Kit ](https://apidocs.salamoonder.com/sdk/official)to make your integration process even easier!

### **Example Request**

```json theme={null}
POST https://salamoonder.com/api/getTaskResult
Host: salamoonder.com
Content-Type: application/json

{
  "api_key": "YOUR_API_KEY",
  "taskId": "d4611a5f-9b4e-4f4a-94a2-8303d97562e1"
}
```

### Example Response

```json theme={null}
{
   "errorId":0,
   "solution":{
      "biography":"Coolest pangolin of the neighbourhood!",
      "profile-picture":"https://static-cdn.jtvnw.net/jt......jpeg",
      "username":"xxx"
   },
   "status":"ready"
}
```

**Response Fields:**

* `biography`  - A real looking biography that a user would write.
* `profile-picture`  - A real looking profile picture.
* `username`  - A real looking username which would be mostly unclaimed.

## Quick Start Example

Because this is a helper function, there is no official example available, but we do include quick start code in Python.

```python theme={null}
import requests
import json
import time

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://salamoonder.com/api"

# Step 1: Create task
task_data = {
    "api_key": API_KEY,
    "task": {
        "type": "Twitch_PublicIntegrity",
    }
}

response = requests.post(f"{BASE_URL}/createTask", json=task_data)
task_id = response.json()["taskId"]
print(f"Task created: {task_id}")

# Step 2: Poll for results
while True:
    result_data = {
        "api_key": API_KEY,
        "taskId": task_id
    }
    
    response = requests.post(f"{BASE_URL}/getTaskResult", json=result_data)
    result = response.json()
    
    if result["status"] == "ready":
        token = result["solution"]["integrity-token"]
        user_agent = result["solution"]["user-agent"]
        print(f"Integrity Token: {token}")
        print(f"User-Agent: {user_agent}")
        break
    
    time.sleep(2)
```
