# اسکرین‌شات صفحه در SERP API

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/serp/screenshot`

**Tags:** DataForSEO

اسکرین‌شات رندرشده یک صفحه نتایج جستجو در Google را برمی‌گرداند. `keyword`، `type`، `se_domain`، `location_code`، `language_code`، `check_url`، `datetime`، `spell`، `refinement_chips`، `item_types`، `items_count` و `items` را برمی‌گرداند. پاسخ در پاکت DataForSEO قرار می‌گیرد: داده‌ها در `tasks[0].result` و نتیجه در `tasks[0].status_code` — درخواست ردشده نیز همچنان HTTP 200 برمی‌گرداند.

### مرجع قیمت‌گذاری

- اندازه‌گیری: هزینه گزارش‌شده پاسخ.
- برآورد درخواست مرجع: 0.02 دلار آمریکا.
- ضریب مشتری مرجع: 1.0. آن را دوباره روی مبلغ تسویه‌شده مشتری اعمال نکنید.

فقط فراداده مرجع است، نه نقل‌قول حساب، نه قیمت تضمین‌شده و نه سقف هزینه. اعتبار منابع، اعتبار Felo نیست. هزینه‌های نهایی تابع سوابق صورت‌حساب Felo است.

## Related links

- [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier>)

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "description": "<em>شناسه وظیفه</em><br><strong>فیلد الزامی</strong><br>شناسه یکتای وظیفه مرتبط در قالب UUID<br>می‌توانید به مدت <strong>7 روز</strong> از آن برای درخواست نتایج وظیفه در هر زمان استفاده کنید"
          },
          "browser_preset": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>پیش‌تنظیم رزولوشن مرورگر</em><br>فیلد اختیاری<br>پیش‌تنظیم مرورگر مرتبط با نوع دستگاه خاص<br>می‌تواند مقادیر زیر را داشته باشد: <code>desktop</code>، <code>tablet</code>، <code>mobile</code> <br><strong>توجه:</strong> به‌صورت پیش‌فرض، پیش‌تنظیم مرورگر با نوع دستگاه مشخص‌شده در درخواست POST مطابقت دارد"
          },
          "browser_screen_width": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>عرض رزولوشن مرورگر</em><br>فیلد اختیاری<br>می‌توان در بازه زیر تعیین کرد: <code>240-9999</code><br>مقدار پیش‌فرض برای <code>desktop</code>: 1920<br>مقدار پیش‌فرض برای <code>mobile</code>: 390<br>مقدار پیش‌فرض برای <code>table</code>: 1024",
            "format": "int64"
          },
          "browser_screen_height": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>ارتفاع رزولوشن مرورگر</em><br>فیلد اختیاری<br>می‌توان در بازه زیر تعیین کرد: <code>240-9999</code><br>مقدار پیش‌فرض برای <code>desktop</code>: 1080<br>مقدار پیش‌فرض برای <code>mobile</code>: 844<br>مقدار پیش‌فرض برای <code>table</code>: 1366"
          },
          "browser_screen_scale_factor": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>ضریب مقیاس مرورگر</em><br>فیلد اختیاری<br>می‌توان در بازه زیر تعیین کرد: <code>0.5-3</code><br>مقدار پیش‌فرض برای <code>desktop</code>: 1<br>مقدار پیش‌فرض برای <code>mobile</code>: 3<br>مقدار پیش‌فرض برای <code>table</code>: 2"
          },
          "page": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>تعداد صفحات SERP</em><br>فیلد اختیاری<br>اگر <code>depth</code> در درخواست Task POST مربوطه از 10 نتیجه (یا 1 صفحه SERP) بیشتر شود، تعداد صفحات SERP برای گرفتن اسکرین‌شات را تعیین کنید؛<br>مقدار پیش‌فرض: <code>1</code>"
          }
        },
        "example": [
          {
            "task_id": "06211235-0696-0139-1000-36727fbd3c90",
            "browser_screen_scale_factor": 0.5
          }
        ]
      }
    ]
  },
  "example": [
    {
      "task_id": "06211235-0696-0139-1000-36727fbd3c90",
      "browser_screen_scale_factor": 0.5
    }
  ]
}
```

## Responses

### 200 — عملیات موفق

Headers:
- `X-Request-Id` (string) — شناسه درخواست برای درج هنگام تماس با پشتیبانی Felo.

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_SerpScreenshotResponseInfo"
    }
  ]
}
```

### 400 — درخواست پردازش نشد. پارامترهای درخواست را بررسی کنید.

### 401 — یک کلید API معتبر Felo لازم است.

### 402 — درخواست ادامه نمی‌یابد چون یک الزام صورت‌حساب برآورده نشده است.

### 403 — حساب مجاز به انجام این عملیات نیست.

### 429 — به سقف درخواست یا هزینه رسیده‌اید.

### 502 — سرویس نتوانست درخواست را کامل کند.

### 503 — سرویس API یا صورت‌حساب موقتاً در دسترس نیست.

### 504 — سرویس هنگام پردازش درخواست به پایان مهلت رسید.

### default — پاسخ خطا؛ پاسخ‌های عبوری بالادست ممکن است از قالب‌های ارائه‌دهنده استفاده کنند

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "نسخه فعلی API"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "کد وضعیت عمومی\nفهرست کامل کدهای پاسخ را اینجا پیدا می‌کنید"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "پیام اطلاعاتی عمومی\nفهرست کامل پیام‌های اطلاعاتی عمومی را اینجا پیدا می‌کنید"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "زمان کل اجرا، بر حسب ثانیه"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "هزینه کل وظایف، دلار آمریکا",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "تعداد وظایف در آرایه tasks",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "تعداد وظایف در آرایه tasks که با خطا برگردانده شده‌اند",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "شناسه وظیفه\nشناسه یکتای وظیفه در سیستم ما در قالب UUID"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "کد وضعیت وظیفه\nتوسط DataForSEO تولید می‌شود و می‌تواند در بازه زیر باشد: 10000-60000\nفهرست کامل کدهای پاسخ را اینجا پیدا می‌کنید"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "پیام اطلاعاتی وظیفه\nفهرست کامل پیام‌های اطلاعاتی عمومی را اینجا پیدا می‌کنید"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "زمان اجرا، ثانیه"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "هزینه کل وظایف، دلار آمریکا",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "تعداد عناصر در آرایه result",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "مسیر URL"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "همان پارامترهایی را دارد که در درخواست POST تعیین کرده‌اید"
    }
  }
}
```

### Response36Afe1097B20_ScreenshotItem

`#/components/schemas/Response36Afe1097B20_ScreenshotItem`

```json
{
  "type": "object",
  "properties": {
    "image": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>اسکرین‌شات صفحه درخواستی</em><br>URL اسکرین‌شات صفحه در فضای ذخیره‌سازی DataForSEO<br><strong>توجه: اسکرین‌شات صفحه که در فضای ذخیره‌سازی DataForSEO ذخیره می‌شود فقط یک روز پس از انجام درخواست قابل دسترسی است</strong>"
    }
  }
}
```

### Response36Afe1097B20_SerpScreenshotResponseInfo

`#/components/schemas/Response36Afe1097B20_SerpScreenshotResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_SerpScreenshotTaskInfo"
              }
            ]
          },
          "description": "<em>آرایه‌ای از وظایف</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_SerpScreenshotResultInfo

`#/components/schemas/Response36Afe1097B20_SerpScreenshotResultInfo`

```json
{
  "type": "object",
  "properties": {
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>تعداد آیتم‌های آرایه نتایج</em>",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_ScreenshotItem"
          }
        ]
      },
      "description": "<em>آرایه آیتم‌ها</em>"
    }
  }
}
```

### Response36Afe1097B20_SerpScreenshotTaskInfo

`#/components/schemas/Response36Afe1097B20_SerpScreenshotTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_SerpScreenshotResultInfo"
              }
            ]
          },
          "description": "<em>آرایه‌ای از نتایج</em>"
        }
      }
    }
  ]
}
```
