# iter_query_stream

> **Function** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/_query_streaming/iter_query_stream)

Calls `query(**params)`, yields the items and follows the next cursor across pages.

See `_Page` for when items are yielded.

## Signature

```python
iter_query_stream(
    item_type: type[_T],
    query: Callable[..., Stream[_E]],
    params: Dict[str, Any],
    *,
    items_path: str = '/items',
    next_cursor_path: str = '/next_cursor',
    cursor_param: str = 'cursor',
) -> Iterator[_T]
```

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-python/blob/15dd2a789f976bbbafd803b26d0f25c08b5ed527/src/langsmith/_query_streaming.py#L86)