---
title: "Discussion on \"Designing a search endpoint in OpenAPI: q, filters, sorting, sparse fieldsets, and pagination codegen understands\" | Hashnode"
description: "Discussion on \"Designing a search endpoint in OpenAPI: q, filters, sorting, sparse fieldsets, and pagination codegen understands\". A search endpoint decays into a pile of ad-hoc query params every client guesses at: filter[status], status_in, q, and a sort string nobody documents. Standardize full text with q, give filters explicit operators and types, use a sign convention for sort, and add sparse fieldsets"
url: "https://hashnode.com/posts/openapi-search-filter-sort-sparse-fields/6aca077490d4a870c03aa219"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Designing a search endpoint in OpenAPI: q, filters, sorting, sparse fieldsets, and pagination codegen understands](https://blogs.powerduck.com/openapi-search-filter-sort-sparse-fields?utm_source=hashnode&utm_medium=feed)

A search endpoint decays into a pile of ad-hoc query params every client guesses at: filter\[status\], status\_in, q, and a sort string nobody documents. Standardize full text with q, give filters explicit operators and types, use a sign convention for sort, and add sparse fieldsets

Oct 8 · 7 min read · blogs.powerduck.com  
Read the article

-   [#api-design](https://hashnode.com/tag/api-design)
-   [#openapi](https://hashnode.com/tag/openapi)
-   [#query-parameters](https://hashnode.com/tag/query-parameters)
-   [#best-practices](https://hashnode.com/tag/best-practices)

## Written by

[Powerduck](https://hashnode.com/@powerduck)

@powerduck · hon

  
[View profile](https://hashnode.com/@powerduck)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
