Couchbase 5.0 introduces a new feature in its N1QL query language by integrating the CURL function, allowing users to interact with external JSON endpoints through HTTP and HTTPS protocols. This addition enables querying data from various APIs, such as Google Maps, Yahoo Finance, and GitHub, directly within N1QL queries. The CURL function supports a subset of standard curl functionalities, with options for GET and POST requests and the ability to pass custom headers and user-agent settings. To ensure security, CURL requires certificates to be stored on each query node, supports role-based access control with specific roles like QUERY_EXTERNAL_ACCESS, and allows for whitelisting specific endpoints. The maximum result size is capped at 64MB to prevent memory overload, and a custom user-agent is added to all requests to enhance security.