A simple API for placing bets on Manifold Markets via URL pings. Allows you to bet using market slugs instead of market IDs.
MANIFOLD_API_KEY
environment variable with your Manifold API keyGet market information by slug (JSON format).
Example:
GET /market/will-the-road-to-housing-act-become
Response:
{ "id": "NcISOAqL6n", "slug": "will-the-road-to-housing-act-become", "question": "Will the ROAD to Housing Act become law in 2025?", "probability": 0.20069534805930825, "isResolved": false, "resolution": null, "outcomeType": "BINARY", "url": "https://manifold.markets/bens/will-the-road-to-housing-act-become" }
Get market information by slug (HTML format for AI crawlers and web browsers).
Example:
GET /info/will-the-road-to-housing-act-become
Response: Clean HTML page with:
Perfect for AI agents that prefer to crawl HTML instead of parsing JSON.
Place a bet on a market.
Parameters:
slug
- Market slug (from the URL path)outcome
- YES or NOamount
- Amount in mana to bet (positive number)Example:
GET /bet/will-the-road-to-housing-act-become/YES/10
Response:
{ "success": true, "bet": { "id": "bet_id_here", "amount": 10, "outcome": "YES", "shares": 12.34, "probBefore": 0.20, "probAfter": 0.21, "fees": { "platformFee": 0.1, "liquidityFee": 0, "creatorFee": 0.05 } }, "market": { "id": "NcISOAqL6n", "slug": "will-the-road-to-housing-act-become", "question": "Will the ROAD to Housing Act become law in 2025?", "url": "https://manifold.markets/bens/will-the-road-to-housing-act-become" } }
The root URL provides a web interface for testing the API endpoints.
You can also test the HTML crawler endpoint directly:
https://your-api-url/info/will-the-road-to-housing-act-become
The API returns appropriate HTTP status codes and error messages:
400
- Invalid parameters (bad outcome, negative amount, etc.)404
- Market not found500
- Server error (missing API key, network issues, etc.)The /info/{slug}
endpoint is specifically designed for AI agents that prefer HTML over JSON: