SLF API

Geocoding / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

SLF is a free, no-authentication database API for German geographic data, including cities, rivers, countries, and related information. It is primarily useful for projects focused on German-language geographic lookups and searches. No API key is required, making it easy to get started immediately.

💡

Beginner Tip

Consult the GitHub documentation to see the full list of supported endpoints and query parameters before building your requests. The data is German-language focused, so queries and results will use German names.

Available Data

country name and code
population
capital city
region and subregion
flag image URL

Example Response

JSON Response
{
  "name": "Japan",
  "capital": "Tokyo",
  "population": 125800000,
  "region": "Asia",
  "languages": [
    "Japanese"
  ],
  "flag": "https://flagcdn.com/jp.svg",
  "currencies": [
    {
      "code": "JPY",
      "name": "Japanese yen"
    }
  ]
}

Field Reference

name Name of the German city, river, or country entry.
type Category of the result, such as city, river, or country.
population Population count for city entries.

Implementation Example

const url = "https://github.com/slftool/slftool.github.io/blob/master/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Unexpected response format The API may return data in a non-standard or undocumented format depending on the endpoint.
Log the raw response first and read the API.md documentation on GitHub to understand the correct response structure.
No results for a query City or river names must be in German; English names may not be recognized.
Use the German spelling of the location (e.g., Muenchen not Munich, Rhein not Rhine).
Connection refused or timeout The API may have limited availability or uptime as a small community project.
Retry after a short wait. For production use, cache results aggressively as this API may be intermittently unavailable.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 706ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Geocoding
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →