Analyze a website to determine scraping strategy and complexity before scraping. ## Headers | Name | Type | Required | Description | | --- | --- | --- | --- | | `Authorization` | string | Yes | Bearer token authentication | | `Content-Type` | string | Yes | Must be `application/json` | ## Request Body | Field | Type | Required | Description | | --- | --- | --- | --- | | `url` | string | Yes | Target URL to analyze | ## Response **Status**: `200 OK` | Field | Type | Description | | --- | --- | --- | | `url` | string | Analyzed URL | | `estimated_items` | integer | Estimated number of items on page | | `complexity` | string | Site complexity: "low", "medium", or "high" | | `requires_js` | boolean | Whether JavaScript rendering is required | | `is_spa` | boolean | Whether site is a Single Page Application | | `has_anti_bot` | boolean | Whether anti-bot measures detected | | `estimated_processing_time` | number | Estimated processing time in seconds | | `recommended_limits` | object | Recommended max_items and timeout values | | `recommended_engine` | string | Recommended scraping engine | | `pagination_detected` | boolean | Whether pagination was detected | | `robots_txt_restrictions` | string | Any robots.txt restrictions (null if none) | | `content_type` | string | Content type from HTTP headers | | `status_code` | integer | HTTP status code | Analyze Site ```bash curl -X POST https://api.aitronos.com/api/v1/scrape/analyze \ -H "X-API-Key: $FREDDY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com/products"}' ``` ```python import os import requests api_key = os.environ["FREDDY_API_KEY"] response = requests.post( "https://api.aitronos.com/api/v1/scrape/analyze", headers={"X-API-Key": api_key}, json={"url": "https://example.com/products"} ) data = response.json() print(f"Complexity: {data['complexity']}") print(f"Requires JS: {data['requires_js']}") print(f"Recommended engine: {data['recommended_engine']}") ``` ```javascript const axios = require('axios'); const apiKey = process.env.FREDDY_API_KEY; axios.post('https://api.aitronos.com/api/v1/scrape/analyze', { url: 'https://example.com/products' }, { headers: { 'X-API-Key': apiKey } }) .then(response => { const data = response.data; console.log(`Complexity: ${data.complexity}`); console.log(`Requires JS: ${data.requires_js}`); console.log(`Recommended engine: ${data.recommended_engine}`); }); ``` **Response** `200 OK` ```json { "url": "https://example.com/products", "estimated_items": 25, "complexity": "medium", "requires_js": true, "is_spa": false, "has_anti_bot": false, "estimated_processing_time": 3.5, "recommended_limits": { "max_items": 50, "timeout": 45 }, "recommended_engine": "browser", "pagination_detected": true, "robots_txt_restrictions": null, "content_type": "text/html", "status_code": 200 } ```