Web Scraper API

The Web Scraper API allows you to extract data from web pages.

Base URL

"https://openapi-idk8.onrender.com"

Endpoint

GET `/webscrape`

Description: Scrapes data from a specified URL using ScraperAPI.

Query Parameters:

  • url (required): URL of the web page from which data will be scraped.

Sample Request

GET `https://openapi-idk8.onrender.com/webscrape?url=https://github.com/`

Sample Response

{
    "title": "Example Website",
    "meta": {
        "description": "This is an example website",
        "keywords": "example, website, sample"
    },
    "body": {
        "heading": "Welcome to Example Website",
        "paragraphs": [
            "This is a sample paragraph.",
            "Here's another paragraph for demonstration."
        ]
    }
}

Error Handling

400 Bad Request: Returned when the URL parameter is missing.

Response Body:


{
    "error": "URL parameter is required"
}
        

500 Internal Server Error: Returned when there's an issue fetching data from the specified URL using ScraperAPI.

Response Body:


{
    "error": "Failed to fetch data using ScraperAPI"
}