Game Embed API

Three ways to use it. Every example below is complete — copy, paste, done.

1. Embed a Game with a Script GET /api/embed/{game}/script.js

The script builds the iframe for you. The game fills it and adapts to size changes, including fullscreen. This is a complete working page using Earth Burger — swap the game name for any game slug:

<!DOCTYPE html>
<html>
<head><title>My Site — Earth Burger</title></head>
<body>
    <h1>Play Earth Burger</h1>
    <div id="gam3bug-game"></div>
    <script src="https://gam3bug.com/api/embed/earth-burger/script.js?width=800&height=480"></script>
</body>
</html>

Change width and height in the URL to resize the embed.

2. Embed a Game with an Iframe GET /api/embed/{game}

Load the game directly in your own iframe — full control over placement and sizing:

<iframe src="https://gam3bug.com/api/embed/earth-burger"
        style="width:800px;height:480px;max-width:100%;border:none;"
        allow="fullscreen; autoplay; gamepad"></iframe>

3. List Available Games GET /api/games

Returns the public game catalog as JSON — use it to build your own game picker or directory:

fetch('https://gam3bug.com/api/games')
    .then(r => r.json())
    .then(data => data.games.forEach(g => console.log(g.slug, g.title)));

Or from the command line:

curl -s https://gam3bug.com/api/games

Response shape:

{
  "games": [
    {
      "slug": "earth-burger",
      "title": "Earth Burger",
      "description": "...",
      "genre": "...",
      "category": "...",
      "thumbnail": "...",
      "play_count": 0
    }
  ]
}

Available Games

Use any of these slugs in the embed URLs above:

  • earth-burger — Earth Burger
  • earth-burger-2 — Earth Burger 2
  • vaders — Spaced Invaders
  • zombee-hive — Zombee Hive
  • zombie-graeyard — Zombie Graveyard

Terms of Use

  • Do not modify or reverse-engineer the game code
  • Attribute games to Gam3bug.com where reasonable
  • Do not use the API for illegal or harmful content

See our Terms of Service and Privacy Policy for full details.