# Public Gateway

The gateway indexes and serves data, making it accessible to users.

Every data on Context is publicly available, free, and forever for other developers to use through `https://rpc.ctx.xyz/`

### **Endpoint Structure**

* **domain**: Represents the primary identifier for your stored data. It’s typically structured as `yourdomain.base.eth` or any other registered TLD in the Context ecosystem.
* **path/to/document**: The directory path to the specific document or data you want to access. This path could represent various files or data objects stored under your domain.

Example:

```http
https://rpc.ctx.xyz/myorg.startup/files/report.json
```

**Using cURL**: To fetch a document from the gateway, you can use the following command:

```bash
curl -X GET "https://rpc.ctx.xyz/myorg.startup/files/logo.png"
```

### **Use Cases and Applications**

Here are some suggested applications where you can use it:

1. **Profile Management**: Use your domain to host and fetch user profile data (e.g., profile pictures, bios).
2. **Data Verification**: Store verifiable, tamper-proof documents such as certifications or legal records.
3. **Decentralized File Storage**: Access public files or media stored under a specific domain.
4. **Custom Links or Content Hubs**: Host custom frames or "link trees" that link to various resources under your domain, ideal for social media or portfolio pages.

### **Security and Authentication**

Currently, public data is accessible without authentication but with rate limit. However, if you need to read private data or exceed rate limit, make sure you use access tokens or API keys. Follow these best practices:

* **Secure API Keys**: Do not hardcode keys directly in client-side code.
* **HTTPS**: Always use HTTPS to prevent interception of data.

### **Query Parameters**

TBD


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ctx.xyz/dns3/public-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
