$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "urls": [
< "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
< ],
< "schema": {
< "type": "object",
< "properties": {
< "title": {
< "type": "string",
< "description": "Book title"
< },
< "price": {
< "type": [
< "number",
< "null"
< ],
< "description": "Price as a number, without currency symbol"
< },
< "currency": {
< "type": [
< "string",
< "null"
< ],
< "description": "ISO currency code or symbol"
< },
< "in_stock": {
< "type": [
< "boolean",
< "null"
< ],
< "description": "True if the book is in stock"
< },
< "rating_stars": {
< "type": [
< "integer",
< "null"
< ],
< "minimum": 1,
< "maximum": 5
< }
< },
< "required": [
< "title",
< "price"
< ],
< "additionalProperties": false
< },
< "instructions": "",
< "maxItems": 5,
< "proxyConfiguration": {
< "useApifyProxy": true
< }
<}
<EOF
$curl "https://api.apify.com/v2/actors/tiger19935~schema-ai-extractor/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'