# Get the Qlik Sense script syntax grammar

Retrieve the Qlik Sense script syntax grammar by using the [GetBNF method](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/service-global-getbnf.htm).

## Example

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/EditDataLoadScript/get-script-syntax-grammar.htm)

#### The goal is to retrieve the script syntax grammar.

The method to be used is the [GetBNF method](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/service-global-getbnf.htm). The handle of the request is -1 because this method applies at global level.

The client sends:

```
{
	"handle": -1,
	"method": "GetBNF",
	"params": {
		"qBnfType": 0
	},
	"id": 2,
	"jsonrpc": "2.0"
}
```

The engine returns:

```
{
	"jsonrpc": "2.0",
	"id": 2,
	"result": {
		"qBnfDefs": [
```

```
			{
				"qBnf": [],
				"qNbr": 686,
				"qPNbr": 678,
				"qHelpId": 0,
				"qName": ")",
				"qStr": ")",
				"qBnfLiteral": true,
				"qFG": "U",
				"qMT": "N"
			},
			{
				"qBnf": [],
				"qNbr": 687,
				"qPNbr": 689,
				"qHelpId": 0,
				"qName": "(",
				"qStr": "(",
				"qBnfLiteral": true,
				"qFG": "U",
				"qMT": "N"
			},
			{
				"qBnf": [],
				"qNbr": 688,
				"qPNbr": 689,
				"qHelpId": 0,
				"qName": ")",
				"qStr": ")",
				"qBnfLiteral": true,
				"qFG": "U",
				"qMT": "N"
			},
			{
				"qBnf": [
					687,
					682,
					688,
					0
				],
				"qNbr": 689,
				"qPNbr": 697,
				"qHelpId": 0,
				"qName": "DD_ExpressionList",
				"qStr": "DD_ExpressionList",
				"qIsBnfRule": true,
				"qFG": "U",
				"qMT": "N"
			}
```

```
			...
```

```

		]
	}
}
```

The script syntax grammar is returned.

[GetBNF method](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/EngineJSONAPI/Content/service-global-getbnf.htm)