Free REST API for
Testing & Prototyping

Real REST API which is ready to handle your HTTP requests 24/7 for free. Can be used for your demo projects, testing, learning or even educating someone else
Public & Private Endpoints
Full CRUD Support
CORS Enabled
/objects/{id}
GET https://api.restful-api.dev/objects/7
// 200 OK
{
"id": "7",
"name": "Apple MacBook Pro 16",
"data": {
"year": 2019,
"price": 1849.99,
"CPU model": "Intel Core i9",
"Hard disk size": "1 TB"
}
}

Intro

Welcome to our real REST API, where your data is securely stored in a real database, ensuring that your created data will be preserved and not lost. Our resource schema provides you with remarkable flexibility, allowing you to create custom objects with various attributes of different types. These attributes are stored as part of a "data" field, forming a customizable JSON object. This unique feature enables you to simulate a wide range of real-world application scenarios, from storing and retrieving prices, dates, and image URLs to simple text fields and beyond.
Our API consists of two parts: a public API, available to anyone without the need for an account, allowing you to quickly test and explore the service, and a private API, available to authenticated users who need greater flexibility and control. With the private API, you can create and organize your own collections, designing data structures that perfectly fit your application's needs.

Main HTTP Methods Support

Support all major HTTP methods: GET, POST, PUT, PATCH and DELETE.

HTTPS Support

Secure connections via SSL/TLS for all API endpoints.

Cross-Origin Requests

CORS enabled for all domains, perfect for frontend development.

Flexible Resources Schema

Design any data structures and relationships using nested JSON objects for complete flexibility.

JSON Response

Consistent and lightweight JSON responses for easy parsing and integration.

Always Available

99.9% uptime ensures reliable access for testing anytime, anywhere.

API Dog

Available Endpoints

Show endpoints for:
  • Description

    Retrieves a predefined set of sample objects from the public API. This endpoint provides a limited, reserved selection available for demonstration purposes - not all stored objects created by you or others. However, if you want to access multiple objects that you’ve created, you can use query parameters to retrieve specific objects by their IDs. Alternatively, you can sign up and use the authenticated API to access objects from your own collections in a more convenient and confidential manner


    Parameters

    id (string[]) - Optional query parameter for specifying one or more object IDs. When provided, the response includes only the specified objects and excludes all others. Supports multiple values by repeating the parameter in the query string (e.g., ?id=3&id=5&id=10)


    Response body example
    1[
    2  {
    3    "id": "1",
    4    "name": "Google Pixel 6 Pro",
    5    "data": {
    6      "color": "Cloudy White",
    7      "capacity": "128 GB"
    8    }
    9  },
    10  {
    11    "id": "2",
    12    "name": "Apple iPhone 12 Mini, 256GB, Blue",
    13    "data": null
    14  },
    15  {
    16    "id": "3",
    17    "name": "Apple iPhone 12 Pro Max",
    18    "data": {
    19      "color": "Cloudy White",
    20      "capacity GB": 512
    21    }
    22  },
    23  {
    24    "id": "4",
    25    "name": "Apple iPhone 11, 64GB",
    26    "data": {
    27      "price": 389.99,
    28      "color": "Purple"
    29    }
    30  },
    31  {
    32    "id": "5",
    33    "name": "Samsung Galaxy Z Fold2",
    34    "data": {
    35      "price": 689.99,
    36      "color": "Brown"
    37    }
    38  },
    39  {
    40    "id": "6",
    41    "name": "Apple AirPods",
    42    "data": {
    43      "generation": "3rd",
    44      "price": 120
    45    }
    46  },
    47  {
    48    "id": "7",
    49    "name": "Apple MacBook Pro 16",
    50    "data": {
    51      "year": 2019,
    52      "price": 1849.99,
    53      "CPU model": "Intel Core i9",
    54      "Hard disk size": "1 TB"
    55    }
    56  },
    57  {
    58    "id": "8",
    59    "name": "Apple Watch Series 8",
    60    "data": {
    61      "Strap Colour": "Elderberry",
    62      "Case Size": "41mm"
    63    }
    64  },
    65  {
    66    "id": "9",
    67    "name": "Beats Studio3 Wireless",
    68    "data": {
    69      "Color": "Red",
    70      "Description": "High-performance wireless noise cancelling headphones"
    71    }
    72  },
    73  {
    74    "id": "10",
    75    "name": "Apple iPad Mini 5th Gen",
    76    "data": {
    77      "Capacity": "64 GB",
    78      "Screen size": 7.9
    79    }
    80  },
    81  {
    82    "id": "11",
    83    "name": "Apple iPad Mini 5th Gen",
    84    "data": {
    85      "Capacity": "254 GB",
    86      "Screen size": 7.9
    87    }
    88  },
    89  {
    90    "id": "12",
    91    "name": "Apple iPad Air",
    92    "data": {
    93      "Generation": "4th",
    94      "Price": "419.99",
    95      "Capacity": "64 GB"
    96    }
    97  },
    98  {
    99    "id": "13",
    100    "name": "Apple iPad Air",
    101    "data": {
    102      "Generation": "4th",
    103      "Price": "519.99",
    104      "Capacity": "256 GB"
    105    }
    106  }
    107]
  • Description

    Retrieves detailed information for a single object specified by its unique ID.


    Parameters

    id (string) (required) - The unique ID of the object to fetch from the collection.


    Request url example

    https://api.restful-api.dev/objects/7


    Response body example
    1{
    2  "id": "7",
    3  "name": "Apple MacBook Pro 16",
    4  "data": {
    5    "year": 2019,
    6    "price": 1849.99,
    7    "CPU model": "Intel Core i9",
    8    "Hard disk size": "1 TB"
    9  }
    10}
  • Description

    Creates and stores a new object using the data provided in the request body.


    Request body example
    1{
    2  "name": "Apple MacBook Pro 16",
    3  "data": {
    4    "year": 2019,
    5    "price": 1849.99,
    6    "CPU model": "Intel Core i9",
    7    "Hard disk size": "1 TB"
    8  }
    9}

    Response body example
    1{
    2  "id": "7",
    3  "name": "Apple MacBook Pro 16",
    4  "data": {
    5    "year": 2019,
    6    "price": 1849.99,
    7    "CPU model": "Intel Core i9",
    8    "Hard disk size": "1 TB"
    9  },
    10  "createdAt": "2022-11-21T20:06:23.986Z"
    11}
  • Description

    Completely replaces the data of an existing object identified by its ID with new information.


    Parameters

    id (string) (required) - The ID of the object to update entirely with new data.


    Request url example

    https://api.restful-api.dev/objects/7


    Request body example
    1{
    2  "name": "Apple MacBook Pro 16",
    3  "data": {
    4    "year": 2019,
    5    "price": 2049.99,
    6    "CPU model": "Intel Core i9",
    7    "Hard disk size": "1 TB",
    8    "color": "silver"
    9  }
    10}

    Response body example
    1{
    2  "id": "7",
    3  "name": "Apple MacBook Pro 16",
    4  "data": {
    5    "year": 2019,
    6    "price": 2049.99,
    7    "CPU model": "Intel Core i9",
    8    "Hard disk size": "1 TB",
    9    "color": "silver"
    10  },
    11  "updatedAt": "2022-12-25T21:08:41.986Z"
    12}
  • Description

    Applies partial modifications to an object by updating only specific fields provided in the request body.


    Parameters

    id (string) (required) - The ID of the object to modify. Only specified fields will be updated.


    Request url example

    https://api.restful-api.dev/objects/7


    Request body example
    1{
    2  "name": "Apple MacBook Pro 16 (Updated Name)"
    3}

    Response body example
    1{
    2  "id": "7",
    3  "name": "Apple MacBook Pro 16 (Updated Name)",
    4  "data": {
    5    "year": 2019,
    6    "price": 1849.99,
    7    "CPU model": "Intel Core i9",
    8    "Hard disk size": "1 TB"
    9  },
    10  "updatedAt": "2022-12-25T21:09:46.986Z"
    11}
  • Description

    Removes an object permanently by specifying its unique ID.


    Parameters

    id (string) (required) - The unique ID of the object to remove from the collection.


    Request url example

    https://api.restful-api.dev/objects/6


    Response body example
    1{
    2  "message": "Object with id = 6, has been deleted."
    3}

How to Use It

Get started with our REST API in your favorite programming language. Choose from the examples below.

1// Using Fetch API
2fetch('https://api.restful-api.dev/objects')
3  .then(response => response.json())
4  .then(data => console.log('GET Response:', data))
5  .catch(error => console.error('Error:', error));
6
7// POST request
8fetch('https://api.restful-api.dev/objects', {
9  method: 'POST',
10  headers: {
11    'Content-Type': 'application/json',
12  },
13  body: JSON.stringify({
14    name: 'Apple MacBook Pro 16',
15    data: {
16      year: 2019,
17      price: 1849.99,
18      'CPU model': 'Intel Core i9',
19      'Hard disk size': '1 TB'
20    }
21  })
22})
23  .then(response => response.json())
24  .then(data => console.log('POST Response:', data));

Frequently Asked Questions

Find answers to common questions about our REST API service.

Yes, the API is completely free to use for testing, development, and educational purposes.

Public endpoints are open and accessible to anyone for quick testing and experimentation with the API. In some cases, they return predefined data, but in others they also allow you to create and retrieve data created by you, making them great for demos and learning. Private endpoints require authentication and provide greater flexibility and control over your own data. You can create custom collections and manage objects in a secure and controlled environment that is accessible only to you or your users. To use private endpoints, you need to sign in or create an account on our website to obtain your own API key. This API key must be included in the request headers (using the x-api-key header) when making requests to the private API.

Yes, you can use POST, PUT, PATCH, and DELETE methods to create, update, and delete objects. This functionality is supported on both public and private APIs that we provide.

Yes, the API has CORS (Cross-Origin Resource Sharing) enabled, which means you can make requests from any domain, including from your browser-based applications and localhost.

All standard REST API methods are supported: GET (retrieve data), POST (create new resources), PUT (update entire resources), PATCH (partial updates), and DELETE (remove resources).

Yes! We’re always open to suggestions for new features, endpoints, or improvements. Feel free to share your ideas with us at [email protected]

Still have questions?

Can't find the answer you're looking for? Feel free to reach out.

Contact Us →