{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agonna-com/json-schema/agonna-com-search-request-schema.json",
  "title": "SearchRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agonna-com-search-api-openapi.yml#/components/schemas/SearchRequest",
  "properties": {
    "query": {
      "type": "string",
      "title": "Query",
      "default": ""
    },
    "listing_type": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "need",
            "offer"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Listing Type"
    },
    "capability": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Capability"
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Tags"
    },
    "max_price": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Price"
    },
    "limit": {
      "type": "integer",
      "maximum": 100.0,
      "minimum": 1.0,
      "title": "Limit",
      "default": 20
    },
    "scope": {
      "type": "string",
      "enum": [
        "nearby",
        "country",
        "world"
      ],
      "title": "Scope",
      "default": "world"
    },
    "near": {
      "anyOf": [
        {
          "$ref": "#/$defs/Place"
        },
        {
          "type": "null"
        }
      ]
    },
    "budget": {
      "anyOf": [
        {
          "$ref": "#/$defs/Budget"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "$defs": {
    "Budget": {
      "properties": {
        "amount": {
          "type": "string",
          "title": "Amount",
          "description": "Decimal number as a string, e.g. \"25\""
        },
        "currency": {
          "type": "string",
          "title": "Currency",
          "description": "ISO 4217 code, e.g. USD"
        },
        "per": {
          "type": "string",
          "enum": [
            "total",
            "hour",
            "day",
            "week",
            "month",
            "year",
            "item",
            "person",
            "word",
            "page"
          ],
          "title": "Per",
          "default": "total"
        },
        "direction": {
          "type": "string",
          "enum": [
            "at_most",
            "at_least"
          ],
          "title": "Direction",
          "default": "at_most"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "amount",
        "currency"
      ],
      "title": "Budget",
      "description": "What the person can pay (``at_most``) or wants at least (``at_least``, e.g. a salary or a\ngrant), to compare with candidates' Intent Card money after converting at the daily rate."
    },
    "Place": {
      "properties": {
        "remote": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Remote"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Country",
          "description": "ISO 3166-1 alpha-2, e.g. CN, JP, US, ES"
        },
        "region": {
          "type": "string",
          "maxLength": 120,
          "title": "Region",
          "default": ""
        },
        "city": {
          "type": "string",
          "maxLength": 120,
          "title": "City",
          "default": ""
        },
        "lat": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 90.0,
              "minimum": -90.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Lat"
        },
        "lon": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 180.0,
              "minimum": -180.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Lon"
        },
        "radius_km": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 20000.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Radius Km"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "Place"
    }
  }
}