# WEBFetchAPI

## リファレンス

### 利用用途

`Proxy URL Fetch API`は、指定されたURLのコンテンツをプロキシ経由で取得するためのAPIです。このAPIを使用することで、指定されたウェブページのコンテンツを取得し、必要に応じてリクエストのユーザーエージェントをカスタマイズできます。主にデータ収集やウェブサイトの情報取得に活用されます。

***

### API エンドポイント

```
https://events-front.mixeder.net/v1/SS
```

***

### パラメータ

| パラメータ | 必須 | 説明        |
| ----- | -- | --------- |
| `key` | 必須 | 利用者のAPIキー |
| `url` | 必須 | 取得したいURL  |

***

### 利用方法

1. 有効なAPIキーを用意します。
2. 取得したいURLを`url`パラメータに指定します。
3. APIリクエストを送信すると、指定されたURLのコンテンツが返されます。

***

### サンプルコード

#### cURL

```bash
curl "https://events-front.mixeder.net/v1/SS?key=YOUR_API_KEY&url=https://example.com"
```

#### Node.js

```javascript
const https = require('https');

const url = 'https://events-front.mixeder.net/v1/SS?key=YOUR_API_KEY&url=https://example.com';

https.get(url, (res) => {
    let data = '';
    res.on('data', (chunk) => {
        data += chunk;
    });
    res.on('end', () => {
        console.log(data);
    });
}).on('error', (err) => {
    console.error('Error: ' + err.message);
});
```

#### Python

```python
import requests

url = "https://events-front.mixeder.net/v1/SS"
params = {
    "key": "YOUR_API_KEY",
    "url": "https://example.com"
}

response = requests.get(url, params=params)
if response.status_code == 200:
    print(response.text)
else:
    print(f"Error: {response.status_code}")
```

***

### エラーメッセージ

* **API Key not provided.**: APIキーが指定されていません。
* **URL not provided.**: URLが指定されていません。
* **API key is wrong**: APIキーが無効です。
* **Error: Unable to fetch the URL.**: 指定されたURLを取得できませんでした。
* **Error: Page size exceeds the limit (15MB).**: 取得したページのサイズが15MBを超えています。

ユーザーエージェントは以下の通りです。

```
Mixederbot (For details: https://www.mixeder.net/bot/)
```

***

### 注意事項

* 有効なAPIキーが必要です。指定がない場合や無効な場合はリクエストは拒否されます。
* `url`パラメータには、取得したいウェブページのURLを正確に指定してください。
* 取得したページのサイズが15MBを超える場合、APIはエラーメッセージを返します。


---

# 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://developer.mixeder.net/mixederpublicapis/apirifarensu/webfetchapi.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.
