Path parameter defines the location of the URL path, appearing between slashes. For example, /users/{user_id}. They are used to identify a specific resource or endpoint on the server. Changing the path parameter value typically implies a request for a different resource. Example: In the URL https://example.com/users/123, "123" is a path parameter representing a specific user's ID. | Query parameters are appended to the end of the URL after a question mark. For example, ?page=1&limit=10. They are used to provide additional information or filter data without changing the resource being accessed. Query parameters are often used for sorting, filtering, or pagination. Query parameters are visible in the URL, but they do not appear directly in the path, making the URL cleaner and more concise. Example: In the URL https://example.com/products?category=electronics, "category" is a query parameter used to filter products. |