Understanding and handling ScrapeGraphAI API errors
{ "error": "Detailed error message" }
Invalid Parameters
{ "error": "Invalid URL format" }
Invalid Schema
{ "error": "Invalid schema format" }
Invalid HTML
{ "error": "Invalid HTML content" }
Invalid API Key
{ "error": "Invalid API key" }
Insufficient Credits
{ "error": "Insufficient credits" }
Rate Limit Exceeded
{ "error": "Too many requests" }
Processing Error
{ "error": "An error occurred while processing your request" }
Service Unavailable
{ "error": "Service temporarily unavailable" }
try: response = client.smartscraper( website_url="https://example.com", user_prompt="Extract data" ) except APIError as e: print(f"Error: {e.message}")
Was this page helpful?