REST API for testing and prototyping
Realistic data for users, posts, comments and todos. Bearer token auth, your own rate limit, JSON or XML. Spend your time on the app you are building, not on fake data.
- HTTPS only
- Fresh data every 3 hours
- Rate limited
- JSON or XML
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://gorest.co.in/public/v2/usersSkip the backend. Ship the frontend.
Realistic users, posts, comments and todos, linked like a real app. Build, test and demo without waiting for an API team.
Free, no quota
Log in with Google, Microsoft or GitHub, make a token, and start.
Realistic data
Names, emails, posts and comments, seeded again every 3 hours. Relations work like a real app.
JSON or XML
Add the format to the path or set the Accept header.
You set the limit
Each token has its own rate limit. Pagination headers do the rest.
From zero to the first request in a minute
- 1
- 2
- 3
Send requests
Put the token in the Authorization header. Try things in the console first if you like.
Open the console
Four resources, linked like a real app
Users own posts and todos. Posts collect comments.
Endpoints at a glance
Every path is under https://gorest.co.in. Reads need no token. Writes need one.
Users
Nested
/public/v2/posts, /public/v2/comments and /public/v2/todos. Any field is a filter, for example /public/v2/users?name=kumar. Page with page and per_page (at most 100).What you get back
The body is the resource itself. Pagination is in the headers. For XML, add .xml to the path or send Accept: application/xml.
[
{
"id": 4521,
"name": "Avani Iyer",
"email": "avani.iyer@example.com",
"gender": "female",
"status": "active"
},
{
"id": 4520,
"name": "Pranav Kapoor",
"email": "pranav.kapoor@example.com",
"gender": "male",
"status": "inactive"
}
]Page through anything
X-Pagination-TotalTotal matching resultsX-Pagination-PagesTotal pagesX-Pagination-PageCurrent pageX-Pagination-LimitResults per pageX-Links-PreviousFull URL of the previous page; empty on page 1X-Links-CurrentFull URL of this pageX-Links-NextFull URL of the next page; empty on the last page
Bearer tokens, the simple kind
Send your token with every write, over HTTPS, in one of two ways:
- Header:
Authorization: Bearer YOUR_TOKEN - Query parameter:
https://gorest.co.in/public/v2/users?access-token=YOUR_TOKEN
The header is the better choice: URLs end up in logs. Make a token on your tokens page. It is shown only once.
Know your budget
X-RateLimit-LimitRequests per minute allowed for this tokenX-RateLimit-RemainingRequests left in the current windowX-RateLimit-ResetSeconds until the window resets
Standard HTTP response codes
What each status code means, and the common reason you will see it.
GET worked; the resource is in the body.
POST made a new resource; the Location header points to it.
DELETE worked; there is no body.
Your cached copy is still fresh.
The body or query string is malformed.
The token is missing, wrong or expired.
The token cannot access this resource.
Nothing at this URL, or it belongs to another token.
The URL does not accept this HTTP method.
Content-Type is not JSON or XML.
The JSON parsed but failed validation; the body lists the bad fields.
The rate limit is used up; retry after X-RateLimit-Reset seconds.
Something broke on our side. Quote X-Request-Id when you report it.
Down for maintenance or busy for a moment. Retry soon.
Quick answers
The questions we hear most. If yours is not here, ask in Q&A.
Is it really free?
Yes. No card and no paid tier. The data is reset often, so do not store anything you need.
What gets reset?
All records are wiped and seeded again every 3 hours, so the API always has fresh data.
Can other people see my data?
No. Records you create or change are visible only to your token. The seeded data is shared.
JSON or XML?
Either. Add .json or .xml to any path, or set the Accept header.
What is the rate limit?
300 requests a minute per token by default. You can set it per token from 1 to 600.
Can I test loading states and error handlers?
Yes. Add ?delay=1500 to a GET to wait up to 5 seconds, or ?force_status=500 to get that error. Allowed codes are 400, 401, 403, 404, 405, 415, 422, 429, 500 and 503. The answer carries an X-Simulated-Delay-Ms or X-Simulated-Status header. See the recipes for examples.
Can I call it from the browser?
Yes. CORS is open. Keep your token out of code you ship to users.
How do I report a bug?
Ask in Q&A, or write to the address on the about page.