FREEFirst project with us? Your landing page design is on the house.See the offer

Glossary · Astro and headless

What is GROQ?

By Abdul QuadirUpdated Nov 2026
GROQ (Sanity query language)noun · Astro and headless

GROQ is the query language for Sanity. It lets a website ask for exactly the content it needs, shaped the way the page wants it, in one request.

GROQ is the query language for Sanity. It lets a website ask for exactly the content it needs, shaped the way the page wants it, in one request.

GROQ, explained

GROQ stands for Graph-Relational Object Queries. It was created by Sanity to query structured content stored in its Content Lake.

A query filters documents, then picks and reshapes fields. For example: all posts in a category, newest first, with only the title, slug, summary and the author's name joined in.

Its strength is joins and projections. You can follow references, rename fields and compute values in the query, so the front end gets clean data.

Sanity also supports GraphQL, but most Sanity projects use GROQ because it is flexible and fits Sanity's data model closely.

In our work

How Kookies uses it

In our Astro and Sanity builds, every page fetches its content with typed GROQ queries, so pages get only the fields they need and editors' changes flow straight to the site.

FAQs

GROQ
questions.

Abdul Quadir
Still have a question?Ask us directly. We reply within a day.
Book a callPick a timehello@kookies.io

The basics take an afternoon for anyone who has used JSON. Advanced joins take a bit longer.

Yes, but GROQ is the native and more common choice.

No. Editors use Sanity Studio. GROQ is for developers building the site.

Your turn

Let's kook
what you krave.

Hi Kookies, I need a built on . I'd love to launch . Reach me at
or book a callSent. We reply within one working day.