OpenGames

OpenGames API

Access the OpenGames directory programmatically. Build game browsers, research tools, or integrate open source game data into your applications.

Introduction

The OpenGames API is a free, public REST API that provides access to our directory of 2000+ open source games. All responses are in JSON format and are edge-cached for optimal performance worldwide.

Base URL
https://opengames.dev/api
Authentication
None required (public API)
Rate Limit
100 requests per minute
Response Format
JSON with edge caching

Endpoints Reference

GET

/api/games

List all games with filtering, sorting, and pagination. Returns a paginated list of games matching the specified criteria.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number for pagination
pageSizeinteger20Results per page (max: 100)
sortstringstarsSort field: stars, lastCommit, createdAt, title, downloadCount
orderstringdescSort order: asc or desc
languagestring-Filter by programming language (e.g., Rust, C++)
genrestring-Filter by game genre (e.g., RPG, Puzzle)
minStarsinteger-Minimum GitHub star count
maxStarsinteger-Maximum GitHub star count
multiplayerboolean-Filter games with multiplayer support
topicstring-Filter by GitHub topic/tag
platformstring-Filter by platform (e.g., Linux, Windows, macOS)
hasReleaseboolean-Filter games that have GitHub releases

Example Request

GET /api/games?page=1&pageSize=10&sort=stars&order=desc&language=Rust

Example Response

// JSON{
  "success": true,
  "data": {
    "games": [
      {
        "id": 1,
        "slug": "veloren",
        "title": "Veloren",
        "description": "An open-world, open-source multiplayer voxel RPG",
        "repoUrl": "https://github.com/veloren/veloren",
        "language": "Rust",
        "genre": "RPG",
        "stars": 5200,
        "forks": 420,
        "openIssues": 180,
        "lastCommitAt": "2024-01-15T10:30:00Z",
        "license": "GPL-3.0",
        "topics": ["game", "rpg", "voxel", "multiplayer"],
        "isMultiplayer": true,
        "platforms": ["Linux", "Windows", "macOS"]
      }
    ],
    "sort": { "field": "stars", "order": "desc" },
    "filters": { "languages": ["Rust"] }
  },
  "meta": {
    "page": 1,
    "pageSize": 10,
    "total": 156,
    "totalPages": 16,
    "hasMore": true
  }
}
GET

/api/games/{slug}

Get detailed information about a single game by its URL-friendly slug identifier.

Path Parameters

ParameterTypeDefaultDescription
slugstring-URL-friendly game identifier (e.g., veloren, minetest)

Query Parameters

ParameterTypeDefaultDescription
includestring-Comma-separated list: related (include related games by language/genre)

Example Request

GET /api/games/veloren?include=related

Example Response

// JSON{
  "success": true,
  "data": {
    "game": {
      "id": 1,
      "slug": "veloren",
      "title": "Veloren",
      "description": "An open-world, open-source multiplayer voxel RPG",
      "repoUrl": "https://github.com/veloren/veloren",
      "homepage": "https://veloren.net",
      "language": "Rust",
      "genre": "RPG",
      "stars": 5200,
      "forks": 420,
      "openIssues": 180,
      "createdAt": "2018-06-15T00:00:00Z",
      "lastCommitAt": "2024-01-15T10:30:00Z",
      "license": "GPL-3.0",
      "topics": ["game", "rpg", "voxel", "multiplayer"],
      "isMultiplayer": true,
      "platforms": ["Linux", "Windows", "macOS"],
      "latestRelease": "0.16.0",
      "downloadCount": 50000
    },
    "related": [
      {
        "slug": "airshipper",
        "title": "Airshipper",
        "language": "Rust",
        "genre": "Tool",
        "stars": 150
      }
    ]
  }
}
GET

/api/search

Full-text search across game titles, descriptions, and topics. Supports filtering and pagination.

Query Parameters

ParameterTypeDefaultDescription
qstring-Search query (required, min 2 characters)
pageinteger1Page number for pagination
pageSizeinteger20Results per page (max: 100)
languagestring-Filter results by programming language
genrestring-Filter results by game genre
minStarsinteger-Minimum GitHub star count
maxStarsinteger-Maximum GitHub star count
multiplayerboolean-Filter by multiplayer support
suggestboolean-Return autocomplete suggestions instead of full results

Example Request

GET /api/search?q=minecraft&language=C%2B%2B&page=1&pageSize=10

Example Response

// JSON{
  "success": true,
  "data": {
    "query": "minecraft",
    "results": [
      {
        "slug": "minetest",
        "title": "Minetest",
        "description": "An open source voxel game engine",
        "language": "C++",
        "genre": "Sandbox",
        "stars": 9500
      },
      {
        "slug": "mineclone2",
        "title": "MineClone 2",
        "description": "A Minecraft clone for Minetest",
        "language": "Lua",
        "genre": "Sandbox",
        "stars": 1200
      }
    ],
    "filters": { "languages": ["C++"] }
  },
  "meta": {
    "page": 1,
    "pageSize": 10,
    "total": 45,
    "totalPages": 5,
    "hasMore": true
  }
}
GET

/api/categories

Get all available game categories including genres, programming languages, platforms, and game engines.

Query Parameters

ParameterTypeDefaultDescription
typestring-Filter by category type: genre, language, platform, engine, alternative, special
sourcestringstaticData source: static (fast, cached) or db (dynamic from database)

Example Request

GET /api/categories?type=genre

Example Response

// JSON{
  "success": true,
  "data": {
    "categories": [
      {
        "slug": "rpg",
        "title": "RPG",
        "description": "Role-playing games",
        "count": 245
      },
      {
        "slug": "puzzle",
        "title": "Puzzle",
        "description": "Puzzle and brain games",
        "count": 189
      },
      {
        "slug": "strategy",
        "title": "Strategy",
        "description": "Strategy and tactics games",
        "count": 167
      }
    ],
    "total": 15,
    "source": "static"
  }
}
GET

/api/stats

Get aggregate statistics about the entire games directory including totals, breakdowns by language and genre, and trending games.

Example Request

GET /api/stats

Example Response

// JSON{
  "success": true,
  "data": {
    "totalGames": 2150,
    "totalCategories": 85,
    "topStars": 45000,
    "avgStars": 1250,
    "gamesByLanguage": [
      { "language": "C++", "count": 420 },
      { "language": "JavaScript", "count": 380 },
      { "language": "Python", "count": 290 },
      { "language": "Rust", "count": 156 },
      { "language": "C#", "count": 145 }
    ],
    "gamesByGenre": [
      { "genre": "Puzzle", "count": 245 },
      { "genre": "RPG", "count": 189 },
      { "genre": "Strategy", "count": 167 },
      { "genre": "Action", "count": 156 }
    ],
    "trendingGames": [
      { "slug": "veloren", "title": "Veloren", "stars": 5200 },
      { "slug": "minetest", "title": "Minetest", "stars": 9500 }
    ],
    "recentlyUpdated": [
      { "slug": "0ad", "title": "0 A.D.", "updatedAt": "2024-01-15T10:30:00Z" }
    ],
    "generatedAt": "2024-01-15T12:00:00Z"
  }
}

Code Examples

JavaScript / TypeScript

// JavaScript// Fetch top games by stars
const response = await fetch(
  'https://opengames.dev/api/games?sort=stars&order=desc&pageSize=10'
);
const { data, meta } = await response.json();

console.log(`Found ${meta.total} games`);
data.games.forEach(game => {
  console.log(`${game.title} - ${game.stars} stars`);
});

// Search for games
const searchResponse = await fetch(
  'https://opengames.dev/api/search?q=roguelike&language=Rust'
);
const { data: searchData } = await searchResponse.json();
console.log(`Found ${searchData.results.length} roguelike games in Rust`);

Python

// Pythonimport requests

# Fetch games by genre
response = requests.get(
    'https://opengames.dev/api/games',
    params={
        'genre': 'RPG',
        'sort': 'stars',
        'order': 'desc',
        'pageSize': 20
    }
)
data = response.json()

for game in data['data']['games']:
    print(f"{game['title']}: {game['stars']} stars")

# Get directory statistics
stats = requests.get('https://opengames.dev/api/stats').json()
print(f"Total games: {stats['data']['totalGames']}")
print(f"Average stars: {stats['data']['avgStars']}")

cURL

// Shell# List games sorted by stars
curl "https://opengames.dev/api/games?sort=stars&order=desc&pageSize=5"

# Get a specific game with related games
curl "https://opengames.dev/api/games/veloren?include=related"

# Search for multiplayer games
curl "https://opengames.dev/api/search?q=multiplayer&multiplayer=true"

# Get all categories
curl "https://opengames.dev/api/categories"

# Get statistics
curl "https://opengames.dev/api/stats"

Response Codes

200OK - Request successful
400Bad Request - Invalid parameters or missing required fields
404Not Found - The requested resource does not exist
429Too Many Requests - Rate limit exceeded (100 requests/minute)
500Internal Server Error - Something went wrong on our end

Error Response Format

// JSON{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Game not found"
  }
}

Use Cases

Game Directories

Build custom game directories, catalogs, or discovery platforms using our comprehensive game data.

Research & Analysis

Analyze trends in open source game development, popular languages, genres, and community engagement.

Recommendation Engines

Use game metadata, genres, and related games to build recommendation systems for players.

Developer Tools

Create tools that help developers discover open source games for inspiration or contribution.

Discord Bots

Build bots that suggest random games, search for games by genre, or share trending projects.

Dashboards

Create real-time dashboards tracking open source game ecosystem health and growth.

The API is provided free of charge. Please be respectful of rate limits to ensure availability for all users. If you need higher rate limits for a specific project, please reach out to us.