โ† Back to API ReferenceEndpoint

GET /grammar

Access 365 German grammar rules organized across 31 categories.

GET/grammar

Get grammar rules with optional filtering by category and pagination support.

Authentication

X-API-Key: demo-key-12345

Parameters

ParameterTypeRequiredDescription
categorystringOptionalFilter by category name (partial match)
limitintegerOptionalMax results (1-500). Default: 100
offsetintegerOptionalSkip N results for pagination. Default: 0

Grammar Categories

The grammar endpoint covers 31 categories. Use these values for the category parameter:

Cases
Articles
Nouns
Pronouns
Adjectives
Verbs
Tenses
Modal Verbs
Separable Verbs
Reflexive Verbs
Passive Voice
Subjunctive
Imperative
Conjunctions
Prepositions
Adverbs
Word Order
Negation
Questions
Relative Clauses
Infinitive
Participles
Comparisons
Numbers
Time Expressions
Conditional
Reported Speech
Idiomatic
Compound Words
Capitalization
Punctuation

Request Examples

Get All Grammar Rules

curl -X GET "https://german-language.onrender.com/grammar?limit=20" \
  -H "X-API-Key: demo-key-12345"

Filter by Category

# Get rules about Cases (Nominativ, Akkusativ, Dativ, Genitiv)
curl -X GET "https://german-language.onrender.com/grammar?category=cases&limit=20" \
  -H "X-API-Key: demo-key-12345"

# Get verb-related grammar rules
curl -X GET "https://german-language.onrender.com/grammar?category=verb&limit=20" \
  -H "X-API-Key: demo-key-12345"

Response

200 OK
{
  "total": 365,
  "returned": 20,
  "offset": 0,
  "categories": [
    "Adjectives", "Articles", "Cases", "Comparisons",
    "Compound Words", "Conditional", "Conjunctions", ...
  ],
  "data": [
    {
      "id": "gram_A_001",
      "category_code": "A",
      "category_name": "Cases",
      "subcategory": "Nominativ",
      "rule_german": "Der Nominativ bezeichnet das Subjekt des Satzes.",
      "rule_english": "Nominative marks the subject of the sentence.",
      "example_de": "Der Mann liest das Buch.",
      "example_en": "The man reads the book.",
      "notes": "Frage: Wer oder was? (Who or what?)",
      "cefr_levels": ["A1", "A2", "B1", "B2", "C1"],
      "tags": ["case", "nominativ", "subject", "declension"]
    },
    {
      "id": "gram_A_002",
      "category_code": "A",
      "category_name": "Cases",
      "subcategory": "Nominativ",
      "rule_german": "Der Nominativ steht auch nach den Verben sein, werden, bleiben.",
      "rule_english": "Nominative also follows the verbs sein (be), werden (become), bleiben (stay).",
      "example_de": "Er ist ein guter Lehrer.",
      "example_en": "He is a good teacher.",
      "notes": "Diese Verben verbinden Subjekt mit Prรคdikativ",
      "cefr_levels": ["A1", "A2", "B1", "B2", "C1"],
      "tags": ["case", "nominativ", "predicate", "sein", "werden", "bleiben"]
    }
    // ... more entries
  ]
}

Response Schema

Grammar Rule Object

FieldTypeDescription
idstringUnique identifier (e.g., "gram_A_001")
category_codestringSingle letter category code
category_namestringFull category name
subcategorystringSubcategory within the main category
rule_germanstringGrammar rule in German
rule_englishstringGrammar rule in English
example_destringGerman example sentence
example_enstringEnglish translation of example
notesstringAdditional notes or tips
cefr_levelsarrayApplicable CEFR levels
tagsarrayRelated tags for searching

Popular Grammar Topics

๐Ÿ“š German Cases

Nominativ, Akkusativ, Dativ, Genitiv - the four German cases with declension rules.

?category=cases

๐Ÿ”ค Articles

Definite (der, die, das) and indefinite (ein, eine) article usage.

?category=articles

๐Ÿƒ Verb Conjugation

Regular and irregular verb conjugations, tenses, and modal verbs.

?category=verb

๐Ÿ“ Word Order

German sentence structure, V2 rule, and subordinate clause order.

?category=word%20order

Error Responses

401 Unauthorized
{
  "detail": "Invalid API key. Get a key at /register (coming soon)"
}

Try It Out

Test this endpoint in the API Playground.