---
title: "Natural language packaging intelligence query"
method: POST
path: "/query"
tags: ["Query", "Public"]
---

# Natural language packaging intelligence query

`POST /query`

## Request

- Base URL: `https://opnplatform.com/api`
- URL: `https://opnplatform.com/api/query`
- Auth: none declared

Ask any question about packaging costs, commodity prices, or PACKIQ agents in plain English. Returns a structured, citable answer grounded in live PackIndex data.

**Optimised for AI agents:** Use this endpoint to answer user questions about packaging costs without needing to understand the PackIndex data model. The response includes a ready-to-use `cite_as` field for attribution.

**Rule-based fast path:** Common price queries are answered in ~1ms without an LLM call. Complex questions fall back to DeepSeek for synthesis.

## Request body

- object
  - `currency` 'USD' | 'GBP' | 'EUR' | 'CHF' | 'JPY' | 'CAD' | 'PLN': Output currency for price values. Auto-detected from question if not provided.
  - `q` string, required: Plain English question about packaging costs or PACKIQ

## Response `200`

Structured answer with citation

- QueryResponse
  - `answer` string, required: Direct citable answer, max 80 words
  - `cite_as` string: Ready-to-use citation string
  - `data` object
    - `as_of` string, date
    - `change_pct` number, nullable
    - `confidence` 'HIGH' | 'MEDIUM' | 'LOW'
    - `converted` number, nullable
    - `converted_currency` string, nullable
    - `currency` string
    - `index` string, nullable
    - `unit` string
    - `value` number, nullable
  - `follow_up_url` string, uri
  - `packiq_agent` string, nullable
  - `related_indices` string[]
  - `relevant` boolean, required
  - `source` string, required

## Other responses

- `400`: Missing or invalid question

---

[API](https://skmtc.dev/opnplatform/apis/packindex-packiq-api-open-packaging-network.md) · [All operations](https://skmtc.dev/opnplatform/apis/packindex-packiq-api-open-packaging-network/llms.txt) · [OpenAPI document](https://skmtc.dev/opnplatform/apis/packindex-packiq-api-open-packaging-network/revisions/f427c0467bb2?raw)
