# GS1 AI (30) VAR COUNT Specification for Variable-Measure Items
> Extract GS1 AI (30) VAR COUNT quantities paired with AI (02) CONTENT for variable-measure barcodes.

- **Canonical URL:** https://stanzaapi.com/tools/gs1-decoder/ai/30-var-count
- **Governing Standard:** GS1 General Specifications & AI Syntax (GS1 Global Standards Architecture)
- **Latency:** <1ms Edge
- **Privacy:** In-memory execution only (zero data stored or logged)

## Technical Overview & Governing Rules
AI (30) is the VAR COUNT identifier for variable-measure trade items, expressing the measured quantity that accompanies AI (02) CONTENT.

The value is variable length (up to 8 digits) and is the last element in the barcode or is terminated by FNC1 when another AI follows.

It is commonly used where the quantity is a weight, volume, or length rather than an integer count.

## Specification Matrix
| Property | Value |
| --- | --- |
| AI Code | 30 |
| Data Content | VAR COUNT (measured quantity) |
| Length | 1 to 8 digits (variable) |
| Delimiter | FNC1 / ASCII 29 when followed by another AI |
| Paired AI | AI (02) CONTENT |

## Standard JSON Response Model
```json
{
  "ai": "30",
  "varCount": 2.5,
  "raw": "00000250",
  "pairedWith": "02"
}
```

## Frequently Asked Questions & Edge Cases
### Q: What is the difference between AI (37) and AI (30)?
**A:** AI (37) is a fixed-length integer COUNT of trade items, while AI (30) is a variable-length measured VAR COUNT such as weight, volume, or length. Both are used with AI (02) CONTENT for variable-measure trade items.

### Q: Does AI (30) need an FNC1 separator?
**A:** Yes when another Application Identifier follows it, because AI (30) is variable length. If it is the final element in the barcode, no separator is needed.
