Kod Ustası
Kod Ustası · Acciones GPT
Web Scraper API
GET /v1/webscraperScrape data from a given URL
Esquema original API
{
"openapi": "3.0.0",
"info": {
"title": "Web Scraper API",
"version": "1.0.0"
},
"description": "API to scrape HTML or plaintext data from given URLs.",
"servers": [
{
"url": "https://api.api-ninjas.com"
}
],
"paths": {
"/v1/webscraper": {
"get": {
"summary": "Scrape data from a given URL",
"operationId": "scrapeWebData",
"parameters": [
{
"name": "url",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "The URL to scrape."
},
{
"name": "text_only",
"in": "query",
"required": true,
"schema": {
"type": "boolean",
"default": false
},
"description": "Extract only visible text, ignoring HTML tags and metadata."
},
{
"name": "user_agent",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "User-Agent string to use in the request header."
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "string"
}
}
}
}
}
},
"400": {
"description": "Bad request"
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}
}
},
"components": {
"schemas": {},
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "X-Api-Key"
}
}
}
}