Back to Features
Feature

Natural Language Queries

Ask your CSV questions in plain English.

Pass a plain-English question via the prompt parameter and csv-api translates it into structured filters and sorts automatically. No filter syntax to memorize, no client-side parsing — just ask.

What it does

Natural Language Queries let you query any csv-api dataset by writing a sentence instead of a query string. Send ?prompt=people over 30 in Portland and the API returns the matching rows as if you'd written ?city=Portland&age_gt=30. The prompt understands your column names, your column types, and operators like 'over,' 'before,' 'contains,' and 'sorted by.' It's powered by an LLM and runs against your dataset's actual schema, so the filters it generates are always valid.

How it works

  1. 1

    Send a prompt

    Add a prompt query parameter to any records request: ?prompt=customers in Oregon who joined this year.

  2. 2

    We translate it into filters

    csv-api looks at your dataset's columns and types, then converts your prompt into structured query parameters.

  3. 3

    Get filtered results back

    The response comes back in the same JSON shape as a normal query, with the same pagination and metadata.

See it in action

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "prompt=people over 30 in Portland sorted by age" \
  -G "https://csv-api.com/api/v1/datasets/d_a8f3bc91/records"

{
  "data": [
    { "name": "Carol", "age": 41, "city": "Portland" },
    { "name": "Alice", "age": 32, "city": "Portland" }
  ],
  "meta": { "total": 2, "page": 1, "per_page": 25, "total_pages": 1 }
}

Why it matters

  • Skip the syntax

    No need to remember whether the operator is _gt or _greater_than. Just say 'over 30.'

  • Built for non-developers

    Anyone who can ask a question can query your data. Great for shared views and internal tools.

  • Schema-aware

    Prompts respect your dataset's actual column names and types, so the generated filters are valid by construction.

The problem it solves

Building filter UIs is fiddly and never quite covers every question someone wants to ask. Natural Language Queries skip the UI entirely — anyone who can type a sentence can query your data, and they don't need to know what columns exist.

Common use cases

  • Letting product managers query data without writing query strings

  • Building chat interfaces over your CSV data

  • Voice-driven dashboards and internal tools

  • Powering shared, public-read pages where viewers shouldn't need a manual

Try Natural Language Queries for yourself

Create a free csv-api account, upload a file, and see your API live in under a minute.

We use essential cookies to keep you logged in. No tracking or analytics. Privacy policy