Skip to content

spinov001-art/jsonplaceholder-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

jsonplaceholder-python 🧪

Python client for JSONPlaceholder — the free fake REST API for testing and prototyping. No API key needed.

Quick Start

from jsonplaceholder import JSONPlaceholderClient

client = JSONPlaceholderClient()

# Get all posts
posts = client.posts()
print(f"{len(posts)} posts")

# Get specific post
post = client.post(1)
print(f"{post['title']}")

# Get comments for a post
comments = client.comments(post_id=1)
print(f"{len(comments)} comments on post 1")

# Get user
user = client.user(1)
print(f"{user['name']}{user['email']}")

# Create a post (fake, returns 201)
new = client.create_post(title="Hello", body="World", user_id=1)
print(f"Created post #{new['id']}")

Resources

Method Description Count
posts() / post(id) Blog posts 100
comments(post_id) Post comments 500
users() / user(id) User profiles 10
todos() / todo(id) Todo items 200
albums() / album(id) Photo albums 100
photos(album_id) Album photos 5000

Use Cases

  • Learning REST APIs — perfect for beginners
  • Testing HTTP clients — mock API for your app
  • Prototyping — build UI before backend is ready
  • CI/CD testing — predictable API responses
  • Teaching — classroom exercises

Related Projects

License

MIT


Need a Custom Tool Built?

I build production-ready scrapers, APIs, and data tools — 78+ deployed on Apify, 270+ open-source repos.

📧 spinov001@gmail.com$250 flat rate, 48h delivery. Describe your project, get a free estimate in 2 hours.

🔧 Browse 78+ ready-made tools on Apify →

About

Python client for JSONPlaceholder — fake REST API for testing and prototyping. No API key needed.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages