Skip to main content
Scrapely uses standard HTTP status codes to indicate the success or failure of an API request. The exact error.id returned in the JSON payload will tell you exactly what went wrong. If you are using the Python SDK, these error IDs are automatically converted into native Python exceptions inheriting from the ScrapelyException base class.
When using the REST API directly, errors are returned as a JSON object with an appropriate HTTP status code.
{
  "success": false,
  "error": {
    "id": "API_KEY_INVALID",
    "message": "Invalid API key"
  }
}

Detailed Error Codes

Below is a comprehensive list of every error ID returned by the Scrapely API, its corresponding HTTP status code, and its meaning. In the Python SDK, these translate directly to PascalCase exception classes (e.g. API_KEY_INVALID becomes APIKeyInvalid).

Authentication & Account Errors

Error IDHTTP CodeDescription
API_KEY_REQUIRED400API key is required (via ‘api_key’ field or ‘X-API-Key’ header).
API_KEY_INVALID403Invalid API key provided.
USER_NOT_FOUND403No user found associated with the API key.
SUBSCRIPTION_INACTIVE403Your subscription is not active.
CONCURRENCY_LIMIT_REACHED429You have exceeded your active concurrency limit.
TASK_ACCESS_DENIED403You don’t have permission to access this task.

General Request Errors

Error IDHTTP CodeDescription
INVALID_FIELDS400Unrecognized fields were provided in the root of the JSON body.
AMBIGUOUS_TASK_TYPE400Cannot provide both ‘captcha’ and ‘crawler’ objects in one request.
TASK_TYPE_REQUIRED400Either a ‘captcha’ or ‘crawler’ object is required.
TASK_ID_REQUIRED400Task ID is required to fetch a result.
INVALID_ENDPOINT400Hit the wrong endpoint (e.g. fetching result from /create).
TASK_NOT_FOUND404The requested task ID does not exist.
TASK_CREATION_FAILED500Failed to create the task in the database.
INTERNAL_SERVER_ERROR500An unexpected internal error occurred.

Crawler Errors

Error IDHTTP CodeDescription
INVALID_CRAWLER_FIELDS400Unrecognized fields provided in the crawler object.
CRAWLER_WEBSITE_URL_REQUIRED400Crawler websiteURL is required.
CRAWLER_WEBSITE_URL_INVALID_TYPE400Crawler websiteURL must be a string.
CRAWLER_WEBSITE_URL_INVALID_SCHEME400Crawler websiteURL must start with http:// or https://.
CRAWLER_WEBSITE_URL_TOO_LONG400Crawler websiteURL must not exceed 254 characters.
CRAWLER_BLOCK_RESOURCES_INVALID_TYPE400Crawler block_resources must be a boolean.
CRAWLER_DEVICE_INVALID_TYPE400Crawler device must be a string.
CRAWLER_DEVICE_INVALID_VALUE400Crawler device must be either ‘desktop’ or ‘mobile’.
CRAWLER_SCREENSHOT_INVALID_TYPE400Crawler screenshot must be a boolean.
CRAWLER_SCREENSHOT_FULL_PAGE_INVALID_TYPE400Crawler screenshot_full_page must be a boolean.
CRAWLER_SCREENSHOT_CONFLICT400Cannot use both screenshot and screenshot_full_page at the same time.
CRAWLER_RETURN_PAGE_SOURCE_INVALID_TYPE400Crawler return_page_source must be a boolean.
CRAWLER_RETURN_PAGE_TEXT_INVALID_TYPE400Crawler return_page_text must be a boolean.
CRAWLER_RETURN_PAGE_CONFLICT400Cannot request both return_page_source and return_page_text at the same time.
CRAWLER_RETURN_PAGE_COOKIES_INVALID_TYPE400Crawler return_page_cookies must be a boolean.
CRAWLER_RETURN_PAGE_META_INVALID_TYPE400Crawler return_page_meta must be a boolean.
CRAWLER_RETURN_USER_AGENT_INVALID_TYPE400Crawler return_user_agent must be a boolean.
CRAWLER_INSTRUCTIONS_INVALID_TYPE400Crawler instructions must be a list.
CRAWLER_INSTRUCTIONS_EMPTY400Crawler instructions cannot be an empty list.
CRAWLER_INSTRUCTIONS_INVALID_ITEMS400All items in crawler instructions must be JSON objects.

Instruction Errors

Error IDHTTP CodeDescription
INSTRUCTION_INVALID_TYPE400Instruction must be a JSON object.
INSTRUCTION_ACTION_REQUIRED400’action’ field is required.
INSTRUCTION_ACTION_INVALID_TYPE400’action’ must be a string.
INSTRUCTION_ACTION_INVALID400Invalid action (must be wait, click, mouse_click, send_keys, scroll_into_view).
INSTRUCTION_SELECTOR_REQUIRED400’selector’ or ‘xpath’ is required for the action.
INSTRUCTION_SELECTOR_CONFLICT400Cannot use both ‘selector’ and ‘xpath’ at the same time.
INSTRUCTION_SELECTOR_INVALID_TYPE400’selector’ must be a string.
INSTRUCTION_XPATH_INVALID_TYPE400’xpath’ must be a string.
INSTRUCTION_TIMEOUT_INVALID_TYPE400’timeout’ must be a number.
INSTRUCTION_TIMEOUT_NEGATIVE400’timeout’ cannot be negative.
INSTRUCTION_TIMEOUT_TOO_HIGH400’timeout’ cannot exceed 30 seconds.
INSTRUCTION_INDEX_INVALID_TYPE400’index’ must be an integer.
INSTRUCTION_INDEX_NEGATIVE400’index’ cannot be negative.
INSTRUCTION_TEXT_REQUIRED400’text’ field is required for ‘send_keys’ action.
INSTRUCTION_TEXT_INVALID_TYPE400’text’ must be a string.
INSTRUCTION_TEXT_TOO_LONG400’text’ must not exceed 1000 characters.
INSTRUCTIONS_TOTAL_TIMEOUT_EXCEEDED400Total timeout of all instructions exceeds maximum allowed (50s).

CAPTCHA Errors

Error IDHTTP CodeDescription
INVALID_CAPTCHA_FIELDS400Unrecognized fields provided in the captcha object.
INVALID_CAPTCHA_TYPE400Invalid captcha type. Must be RecaptchaV2, RecaptchaV3, or Turnstile.
CAPTCHA_WEBSITE_URL_REQUIRED400Captcha websiteURL is required.
CAPTCHA_WEBSITE_URL_INVALID_TYPE400Captcha websiteURL must be a string.
CAPTCHA_WEBSITE_URL_INVALID_SCHEME400Captcha websiteURL must start with http:// or https://.
CAPTCHA_WEBSITE_URL_TOO_LONG400Captcha websiteURL must not exceed 254 characters.
CAPTCHA_WEBSITE_KEY_REQUIRED400Captcha websiteKey is required.
CAPTCHA_WEBSITE_KEY_INVALID_TYPE400Captcha websiteKey must be a string.
CAPTCHA_WEBSITE_KEY_TOO_SHORT400Captcha websiteKey must be at least 10 characters.
CAPTCHA_WEBSITE_KEY_TOO_LONG400Captcha websiteKey must not exceed 200 characters.
CAPTCHA_TYPE_REQUIRED400Captcha type is required.
CAPTCHA_TYPE_INVALID_TYPE400Captcha type must be a string.

Options Errors

Error IDHTTP CodeDescription
INVALID_OPTIONS_FIELDS400Unrecognized fields provided in the options object.
OPTIONS_USER_AGENT_INVALID_TYPE400Options user_agent must be a string.
OPTIONS_USER_AGENT_TOO_SHORT400Options user_agent must be at least 10 characters.
OPTIONS_USER_AGENT_TOO_LONG400Options user_agent must not exceed 500 characters.
OPTIONS_INVISIBLE_INVALID_TYPE400Options invisible must be a boolean.
OPTIONS_ENTERPRISE_INVALID_TYPE400Options enterprise must be a boolean.
OPTIONS_ACTION_INVALID_TYPE400Options action must be a string.
OPTIONS_ACTION_TOO_LONG400Options action must not exceed 100 characters.

Proxy Errors

Error IDHTTP CodeDescription
INVALID_PROXY_FIELDS400Unrecognized fields provided in the proxy object.
PROXY_SCHEME_REQUIRED400Proxy scheme is required.
PROXY_HOST_REQUIRED400Proxy host is required.
PROXY_PORT_REQUIRED400Proxy port is required.
PROXY_PASSWORD_REQUIRED400Proxy password is required when username is provided.