{
  "openapi": "3.0.1",
  "info": {
    "title": "Antenna Simulator: NEC-2 Antenna Analysis, SWR & Pattern",
    "description": "Simulate antennas with NEC-2 (nec2c): upload 4nec2 .nec decks or describe a Yagi, dipole, vertical, Moxon, quad or loop in words. Get SWR, impedance, gain, front-to-back, takeoff angle, pattern plots, Smith chart, Touchstone and CSV. For hams, RF engineers and AI agents.",
    "version": "0.1",
    "x-build-id": "sgPGiOpfEmaw7rf5H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~antenna-simulator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-antenna-simulator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/jumblemog~antenna-simulator/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-antenna-simulator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/jumblemog~antenna-simulator/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-antenna-simulator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "antennas": {
            "title": "Antennas: links or designs in words",
            "type": "array",
            "description": "One antenna per line. A link to a NEC-2 deck: a .nec file (4nec2's symbols, traps and coatings work), a ZIP archive or a GitHub folder of decks (add #yagi to take only the files whose path holds yagi), a GitHub or GitLab file page, Google Drive or Dropbox. Or a design in words, built and tuned for you: dipole, inverted V, vertical or ground plane, Yagi (2 to 17 elements), Moxon, quad, loop or delta loop, with the frequency, and optionally height, ground, wire size and material, such as '5 element yagi 432 MHz 4 mm' or 'inverted V 3.65 MHz apex 15 m over poor ground'.",
            "items": {
              "type": "string"
            }
          },
          "upload": {
            "title": "Or upload a NEC deck",
            "type": "string",
            "description": "A .nec file (or a ZIP of them) from your computer, simulated together with the antennas above."
          },
          "necText": {
            "title": "Or paste a NEC deck",
            "type": "string",
            "description": "The text of a NEC-2 deck: CM comments, then GW wires, GE, EX source, FR frequency and EN, as 4nec2, xnec2c and nec2c use."
          },
          "frequencyMHz": {
            "title": "Design frequency (MHz)",
            "minimum": 0.001,
            "maximum": 300000,
            "type": "number",
            "description": "Where the pattern, gain and feed impedance are reported. Empty: the deck's FR card (the middle of its range), or the design's frequency. For a design without a frequency in its words, this is its frequency."
          },
          "sweepStartMHz": {
            "title": "Sweep from (MHz)",
            "minimum": 0.001,
            "maximum": 300000,
            "type": "number",
            "description": "Empty: the amateur or radio band holding the design frequency with a margin on both sides (the deck's own range when its FR card sweeps), else 5% either side."
          },
          "sweepStopMHz": {
            "title": "Sweep to (MHz)",
            "minimum": 0.001,
            "maximum": 300000,
            "type": "number",
            "description": "The top of the sweep. Give one end only and the sweep is centred on the design frequency."
          },
          "sweepPoints": {
            "title": "Sweep frequencies",
            "minimum": 1,
            "maximum": 201,
            "type": "integer",
            "description": "Frequencies in the sweep, evenly spaced. Empty: 21. Each one costs one NEC run: large models take a while per frequency."
          },
          "impedanceOhms": {
            "title": "Feed line impedance (ohms)",
            "minimum": 1,
            "maximum": 10000,
            "type": "number",
            "description": "SWR, return loss, the Touchstone file and the matching networks refer to this: 50 for coax, 75 for TV coax, 450 or 600 for ladder line. Empty: the deck's Z0 card (xnec2c) if it has one, else 50."
          },
          "ground": {
            "title": "Ground",
            "enum": [
              "deck",
              "freeSpace",
              "perfect",
              "average",
              "good",
              "veryGood",
              "poor",
              "veryPoor",
              "sandy",
              "saltWater",
              "freshWater",
              "city",
              "extremelyPoor",
              "custom"
            ],
            "type": "string",
            "description": "Real soils use NEC's exact Sommerfeld ground. Over a ground the pattern is the half above it and the takeoff angle is reported.",
            "default": "deck"
          },
          "groundConductivity": {
            "title": "Soil conductivity (S/m)",
            "minimum": 0.000001,
            "maximum": 1000,
            "type": "number",
            "description": "For a custom ground, or to change a soil type's value. Giving it with the deck's ground uses custom soil."
          },
          "groundPermittivity": {
            "title": "Soil relative permittivity",
            "minimum": 1,
            "maximum": 200,
            "type": "number",
            "description": "For a custom ground, or to change a soil type's value (dielectric constant)."
          },
          "heightM": {
            "title": "Feed point height (m)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Moves the whole antenna up or down to put its (first) feed point this high above the ground. For designs it's the height of the antenna (the apex of an inverted V, the base of a ground plane). Empty: as the deck has it; designs over ground go half a wavelength up."
          },
          "symbols": {
            "title": "Deck symbols (SY)",
            "type": "object",
            "description": "Values for the deck's SY symbols, which win over the deck's own, to try a change without editing the file: {\"len\": 10.35, \"h\": 15}. Expressions in the deck use them."
          },
          "wireDiameterMm": {
            "title": "Wire diameter for designs (mm)",
            "minimum": 0.001,
            "maximum": 10000,
            "type": "number",
            "description": "For designs whose words give no size. Empty: 2 mm wire below 30 MHz, 6 mm tube for beams and 4 mm for others above."
          },
          "material": {
            "title": "Wire material",
            "enum": [
              "copper",
              "aluminium",
              "brass",
              "steel",
              "stainless",
              "silver",
              "bronze",
              "perfect"
            ],
            "type": "string",
            "description": "The wires' losses (LD 5). For a deck, every wire, unless the deck sets its own conductivity. Empty: decks as they are; designs copper below 30 MHz, aluminium above."
          },
          "outputs": {
            "title": "Files to make",
            "type": "array",
            "description": "The dataset row with every number is always made.",
            "items": {
              "type": "string",
              "enum": [
                "pictures",
                "tables",
                "nec",
                "touchstone"
              ],
              "enumTitles": [
                "Pictures: radiation pattern, SWR and impedance sweep, Smith chart, the wires and their currents",
                "CSV tables: the sweep, the full pattern and the current on every segment",
                "The deck as simulated (antenna.nec) and NEC's own output",
                "Touchstone antenna.s1p: the feed point's S11 for circuit simulators and VNA software"
              ]
            },
            "default": [
              "pictures",
              "tables",
              "nec",
              "touchstone"
            ]
          },
          "timeLimitSeconds": {
            "title": "Time limit (seconds)",
            "minimum": 10,
            "maximum": 3300,
            "type": "integer",
            "description": "Downloading and simulating stop after this long; what was done is kept. A sweep that wouldn't fit is cut to fewer frequencies. Each antenna is billed for its own time.",
            "default": 300
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}