Scraping website, please wait...
Web Scraper API Documentation
Our API allows you to programmatically scrape website content with simple HTTP requests.
Request Parameters
All parameters should be sent as form data or JSON in the request body.
| Parameter |
Type |
Required |
Description |
| url |
String |
Yes |
The URL of the website to scrape |
| element |
String |
No |
Specific element to extract (all, title, h1, h2, p, a, img). Default: all |
| limit |
Integer |
No |
Maximum number of results to return. Default: 10 |
| format |
String |
No |
Response format (json, text). Default: json |
Response Format
The API returns a JSON object with the following structure:
{
"success": true,
"url": "https://example.com",
"element": "h1",
"content": "Extracted content here...",
"timestamp": "2023-07-20 12:34:56"
}
In case of an error:
{
"success": false,
"error": "Error message describing what went wrong",
"timestamp": "2023-07-20 12:34:56"
}
Example Usage
Using cURL:
curl -X POST https://mvptomillions.com/scraper-api.php \
-d "url=https://example.com" \
-d "element=h1" \
-d "limit=5"
Using JavaScript fetch:
fetch('https://mvptomillions.com/scraper-api.php', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
'url': 'https://example.com',
'element': 'h1',
'limit': '5'
})
})
.then(response => response.json())
.then(data => console.log(data));
Using Python requests:
import requests
data = {
'url': 'https://example.com',
'element': 'h1',
'limit': 5
}
response = requests.post('https://mvptomillions.com/scraper-api.php', data=data)
print(response.json())
Test the API
Use this form to test the API endpoints directly.
Calling API, please wait...