Felo API PlatformFelo API Platform
v0.1.0-beta
OpenAPI 3.1.0

OnPage API Page Screenshot

服务器:https://openapi.felo.ai
客户端库

DataForSEO

​

SEO, search-engine results, keyword research, backlinks and AI visibility data.

OnPage API Page Screenshot

​

Renders any url and returns a screenshot, with full_page_screenshot for the whole scroll height and browser_screen_width and browser_screen_height setting the viewport. Standalone - no crawl needed. Wrapped in DataForSEO's envelope: data in tasks[0].result, outcome in tasks[0].status_code - a rejected request still returns HTTP 200. ⚠️ An image is a large tool result even before an agent can do anything with it; ask for a screenshot only when the visual is the point, and use post_dataforseo_on_page_content_parsing_live when the text is.

请求体
必填
application/json
  • 类型: array object[]
    • url
      类型: string
      必填

      page url required field absolute URL of the page to snap note: if the URL you indicate here returns a 404 status code or the indicated value is not a valid URL, you will obtain "error_message":"Screenshot is empty" in the response array

    • accept_language
      类型: string

      language header for accessing the website optional field all locale formats are supported (xx, xx-XX, xxx-XX, etc.) note: if you do not specify this parameter, some websites may deny access; in this case, you will obtain "error_message":"Screenshot is empty" in the response array

    • browser_preset
      类型: string

      preset for browser screen parameters optional field if you use this field, you don’t need to indicate browser_screen_width, browser_screen_height, browser_screen_scale_factor possible values: desktop, mobile, tablet desktop preset will apply the following values: browser_screen_width: 1920 browser_screen_height: 1080 browser_screen_scale_factor: 1 mobile preset will apply the following values: browser_screen_width: 390 browser_screen_height: 844 browser_screen_scale_factor: 3 tablet preset will apply the following values: browser_screen_width: 1024 browser_screen_height: 1366 browser_screen_scale_factor: 2 Note: in this endpoint, the enable_browser_rendering, enable_javascript, load_resources, and enable_xhr parameters are always enabled.

    • browser_screen_height
      类型: integer

      browser screen height optional field you can set a custom browser screen height to perform audit for a particular device; if you use this field, you don’t need to indicate browser_preset as it will be ignored; minimum value, in pixels: 240 maximum value, in pixels: 9999

    • browser_screen_scale_factor
      类型: number

      browser screen scale factor optional field you can set a custom browser screen resolution ratio to perform audit for a particular device; if you use this field, you don’t need to indicate browser_preset as it will be ignored; minimum value: 0.5 maximum value: 3

    • browser_screen_width
      类型: integer

      browser screen width optional field you can set a custom browser screen width to perform audit for a particular device; if you use this field, you don’t need to indicate browser_preset as it will be ignored; minimum value, in pixels: 240 maximum value, in pixels: 9999

    • custom_user_agent
      类型: string

      custom user agent optional field custom user agent for crawling a website example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 default value: Mozilla/5.0 (compatible; RSiteAuditor)

    • disable_cookie_popup
      类型: boolean

      disable the cookie popup optional field set to true if you want to disable the popup requesting cookie consent from the user; default value: false

    • full_page_screenshot
      类型: boolean

      take a screenshot of the full page optional field set to false if you want to capture only the part of the page displayed before scrolling default value: true

    • ip_pool_for_scan
      类型: string

      proxy pool optional field you can choose a location of the proxy pool that will be used to obtain the requested data; the parameter can be used if page content is inaccessible in one of the locations, resulting in occasional site_unreachable errors possible values: us, de

    • switch_pool
      类型: boolean

      switch proxy pool optional field if true, additional proxy pools will be used to obtain the requested data; the parameter can be used if a multitude of tasks is set simultaneously, resulting in occasional rate-limit and/or site_unreachable errors

响应
  • 200
    类型: object

    Successful response

    • cost
      类型: number

      total tasks cost, USD

    • status_code
      类型: integer

      general status code you can find the full list of the response codes here Note: we strongly recommend designing a necessary system for handling related exceptional or error conditions

    • status_message
      类型: string

      general informational message you can find the full list of general informational messages here

    • tasks
      类型: array string[]

      array of tasks

    • tasks_count
      类型: integer

      the number of tasks in the tasks array

    • tasks_error
      类型: integer

      the number of tasks in the tasks array returned with an error

    • tasks.cost
      类型: number

      cost of the task, USD

    • tasks.data
      类型: object

      contains the same parameters that you specified in the POST request

    • tasks.id
      类型: string

      task identifier unique task identifier in our system in the UUID format

    • tasks.path
      类型: array string[]

      URL path

    • tasks.result
      类型: array string[]

      array of results

    • tasks.result_count
      类型: integer

      number of elements in the result array

    • tasks.result.crawl_progress
      类型: string

      status of the crawling session possible values: in_progress, finished

    • tasks.result.error_message
      类型: string

      error message if the url you indicated returns a 404 status code or is not a valid URL, you will obtain "error_message":"Screenshot is empty" if no error is encountered, the value will be null

    • tasks.result.items
      类型: array string[]

      items array

    • tasks.result.items_count
      类型: integer

      number of items in the results array

    • tasks.result.items.image
      类型: string

      screenshot of the requested page URL of the page screenshot on the DataForSEO storage

    • tasks.status_code
      类型: integer

      status code of the task generated by DataForSEO; can be within the following range: 10000-60000 you can find the full list of the response codes here

    • tasks.status_message
      类型: string

      informational message of the task you can find the full list of general informational messages here

    • tasks.time
      类型: string

      execution time, seconds

    • time
      类型: string

      execution time, seconds

    • version
      类型: string

      the current version of the API

    application/json
  • 400

    Bad request

  • 401

    Unauthorized

  • 402

    The request cannot proceed because a billing requirement is not met.

  • 403

    The account is not permitted to perform this operation.

  • 429

    Rate limit exceeded

  • 500

    Internal server error

  • 502

    The service could not complete the request.

  • 503

    The API or billing service is temporarily unavailable.

  • 504

    The service timed out while processing the request.

  • default

    The operation failed. Keep the response request ID when contacting Felo support.

Request Example for post/v1/beta/dataforseo/on_page/page_screenshot
curl https://openapi.felo.ai/v1/beta/dataforseo/on_page/page_screenshot \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '[
  {
    "url": "",
    "accept_language": "",
    "custom_user_agent": "",
    "browser_preset": "",
    "browser_screen_width": 1,
    "browser_screen_height": 1,
    "browser_screen_scale_factor": 1,
    "full_page_screenshot": true,
    "disable_cookie_popup": true,
    "switch_pool": true,
    "ip_pool_for_scan": ""
  }
]'
{
  "version": "string",
  "status_code": 1,
  "status_message": "string",
  "time": "string",
  "cost": 1,
  "tasks_count": 1,
  "tasks_error": 1,
  "tasks": [
    "string"
  ],
  "tasks.id": "string",
  "tasks.status_code": 1,
  "tasks.status_message": "string",
  "tasks.time": "string",
  "tasks.cost": 1,
  "tasks.result_count": 1,
  "tasks.path": [
    "string"
  ],
  "tasks.data": {},
  "tasks.result": [
    "string"
  ],
  "tasks.result.crawl_progress": "string",
  "tasks.result.error_message": "string",
  "tasks.result.items_count": 1,
  "tasks.result.items": [
    "string"
  ],
  "tasks.result.items.image": "string"
}
OnPage API Page Screenshot