# model.getInput(input, line)

Return input data for given input and line number

@status current Introduced in 2.0.0, `switch` added in TODO

## Parameters

* `input` (unsigned number) input number (use 0 for Input1)
* `line` (unsigned number) input line (use 0 for first line)

## Return value

* `nil` requested input or line does not exist
* `table` input data:
  * `name` (string) input line name
  * `source` (number) input source index
  * `weight` (number) input weight&#x20;
  * `offset` (number) input offset&#x20;
  * `switch` (number) input switch index


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.open-tx.org/opentx-2-2-lua-reference-guide/part_iii_-_opentx_lua_api_reference/model_functions/getinput.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
