Skip to content

FunQL logo

Complex queries made simple

FunQL, the Functional Query Language, is an open-source specification and software implementation that standardizes API query design and provides ready-to-use software components for filtering, sorting, pagination, and more.

Designed for usability, flexibility and seamless integration, FunQL simplifies complex query logic. Use it to enhance an existing REST API or build a new API with powerful, well-structured query capabilities using the FunQL Query Language.

Get started

Everything is a function

FunQL is both powerful and simple. Its functions are easy to learn, intuitive to use, and built to handle everything from simple search to complex queries. Looking for LEGO Star Wars sets that cost at least € 500 and were launched after 2010, sorted by price? Just ask:

GET https://api.play.funql.io/sets?filter=
  and(
    eq(theme, "STAR_WARS"),
    gte(price, 500),
    gt(year(launchTime), 2010)
  )
  &sort=desc(price)
HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "name": "Millennium Falcon",
    "setNumber": 75192,
    "price": 849.99,
    "launchTime": "2017-10-01T14:15:30.500Z",
    "theme": "STAR_WARS"
  },
  {
    "name": "The Razor Crest",
    "setNumber": 75331,
    "price": 599.99,
    "launchTime": "2022-10-03T14:15:30.500Z",
    "theme": "STAR_WARS"
  }
]
POST https://api.play.funql.io/funql
Content-Type: text/plain

listSets(
  filter(
    and(
      eq(theme, "STAR_WARS"),
      gte(price, 500),
      gt(year(launchTime), 2010)
    )
  ),
  sort(
    desc(price)
  )
)
HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "name": "Millennium Falcon",
    "setNumber": 75192,
    "price": 849.99,
    "launchTime": "2017-10-01T14:15:30.500Z",
    "theme": "STAR_WARS"
  },
  {
    "name": "The Razor Crest",
    "setNumber": 75331,
    "price": 599.99,
    "launchTime": "2022-10-03T14:15:30.500Z",
    "theme": "STAR_WARS"
  }
]