A simple RESTful API for searching, sharing, and upvoting code snippets. Perfect for developers who want to quickly find and contribute reusable code.
/snippets{
"title": "Hello World in Python",
"code": "print('Hello, world!')",
"language": "python",
"tags": ["beginner", "example"]
}
/snippetsquery, language, or tag./snippets?query=hello&language=python
/snippets/random/snippets/{id}/upvoteRun the API with uvicorn main:app --reload and visit /docs for interactive documentation.
{
"id": "...",
"title": "Hello World in Python",
"code": "print('Hello, world!')",
"language": "python",
"tags": ["beginner", "example"],
"upvotes": 0
}