> ## 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.

# Web

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

<Danger>
  **Attention**

  Our **BMP task** is reserved for long-term customers and is not available to new users. This helps us maintain a controlled user base and reduce the risk of external monitoring.
</Danger>

## 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

### Task Structure

| **Property** | **Type** | **Required** | **Description**                                       |
| ------------ | :------: | :----------: | :---------------------------------------------------- |
| `type`       |  String  |      Yes     | The task type that you want to engange.               |
| `url`        |  String  |      Yes     | Your **target** website, make sure it's the full URL. |
| `abck`       |  String  |      Yes     | The initial **\_abck** cookie that you retrieved.     |
| `bmsz`       |  string  |      Yes     | The initial **bm\_sz** cookie that you retrieved.     |
| `script`     |  String  |      Yes     | The **complete script** fetched from Akamai.          |
| `sensor_url` |  String  |      Yes     | The **full akamai URL**, this is dynamic.             |
| `count`      |  Integer |      Yes     | First request should **always be 0**, then increase.  |
| `data`       |  String  |      Yes     | Should be **empty** on first request.                 |
| `user_agent` |  String  |      No      | Your **chrome** user-agent.                           |

This task is where we took extra care to explain the parameters, because we want everything to be clear and easy to use. We strongly recommend using our [Software Development Kit](https://apidocs.salamoonder.com/sdk/official), and our [examples](https://apidocs.salamoonder.com/examples#akamai-web-examples) are there to help you get up and running fast.

You can send your own user agent for this task. If you skip it, the system picks a random one. If you do send one, make sure it’s a Chrome on Windows user agent, since those have worked best.

<Accordion title="These user agents have given our users the best results.">
  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36

  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36

  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36

  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36

  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
</Accordion>

### 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": "AkamaiWebSensorSolver",
    "url": "https://www.ihg.com/hotels/us/en/reservation",
    "abck": "2706C6DDF2B013C342A7125C1C0F5185~-1~YAAQ...",
    "bmsz": "BCD5B7DFC133ED770D17429A247C9724~YAAQ7do...",
    "script": "(function(){if(typeof Array.prototype ...",
    "sensor_url": "https://www.ihg.com/rJftaU2Ch9_OZd...",
	"count": 0, // should be 0 on first request
	"data": "", // This should be empty on the first request.
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win6..."
  }
}
```

### 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": {
    "data": "...",
    "payload": "...",
	"user-agent": "..."
  },
  "status": "ready"
}
```

**Response Fields:**

* `data` - Data that needs to be sent to our API for the second payload generation.
* `payload` - The payload you have to post to the akamai URL.
* `user-agent` - The user-agent used to create the payload.

## Quick Start Example

We have examples for all our tasks to streamline integration. Feel free to check them out!

<Card title="Akamai Web Examples" icon="globe" href="https://apidocs.salamoonder.com/examples#akamai-web-examples">
  All our Akamai Web Examples can be found here!
</Card>
