> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.flashid.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.flashid.app/_mcp/server.

# Check a proxy

POST http://127.0.0.1:58931/api/proxies/check
Content-Type: application/json

Test connectivity of a single proxy and return its detected IP and geo info.

**Errors:** `4001 PROXY_CHECK_FAILED` if unreachable / timeout.

**Body parameters**

| Field | Type | Required | Description |
|---|---|---|---|
| `proxy.type` | `enum` | Yes | `http` `https` `socks5`. |
| `proxy.host` | `string` | Yes | Proxy host. |
| `proxy.port` | `number` `string` | Yes | Proxy port. |
| `proxy.username` | `string` | No | Username. |
| `proxy.password` | `string` | No | Password. |

Reference: https://docs.flashid.app/api-reference/proxies/check-a-proxy

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/proxies/check:
    post:
      operationId: check-a-proxy
      summary: Check a proxy
      description: >-
        Test connectivity of a single proxy and return its detected IP and geo
        info.


        **Errors:** `4001 PROXY_CHECK_FAILED` if unreachable / timeout.


        **Body parameters**


        | Field | Type | Required | Description |

        |---|---|---|---|

        | `proxy.type` | `enum` | Yes | `http` `https` `socks5`. |

        | `proxy.host` | `string` | Yes | Proxy host. |

        | `proxy.port` | `number` `string` | Yes | Proxy port. |

        | `proxy.username` | `string` | No | Username. |

        | `proxy.password` | `string` | No | Password. |
      tags:
        - subpackage_proxies
      parameters:
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Proxies_Check a proxy_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                proxy:
                  $ref: >-
                    #/components/schemas/ApiProxiesCheckPostRequestBodyContentApplicationJsonSchemaProxy
              required:
                - proxy
servers:
  - url: http://127.0.0.1:58931
    description: http://127.0.0.1:58931
components:
  schemas:
    ApiProxiesCheckPostRequestBodyContentApplicationJsonSchemaProxy:
      type: object
      properties:
        host:
          type: string
        port:
          type: string
        type:
          type: string
        password:
          type: string
        username:
          type: string
      required:
        - host
        - port
        - type
        - password
        - username
      title: ApiProxiesCheckPostRequestBodyContentApplicationJsonSchemaProxy
    ApiProxiesCheckPostResponsesContentApplicationJsonSchemaDataIpData:
      type: object
      properties:
        isp:
          type: string
        city:
          type: string
        region:
          type: string
        country:
          type: string
        zipcode:
          type: string
        language:
          type: string
        latitude:
          type: string
        timezone:
          type: string
        longitude:
          type: string
      required:
        - isp
        - city
        - region
        - country
        - zipcode
        - language
        - latitude
        - timezone
        - longitude
      title: ApiProxiesCheckPostResponsesContentApplicationJsonSchemaDataIpData
    ApiProxiesCheckPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        ip:
          type: string
        ip_data:
          $ref: >-
            #/components/schemas/ApiProxiesCheckPostResponsesContentApplicationJsonSchemaDataIpData
      required:
        - ip
        - ip_data
      title: ApiProxiesCheckPostResponsesContentApplicationJsonSchemaData
    Proxies_Check a proxy_Response_200:
      type: object
      properties:
        code:
          type: integer
        data:
          $ref: >-
            #/components/schemas/ApiProxiesCheckPostResponsesContentApplicationJsonSchemaData
        success:
          type: boolean
      required:
        - code
        - data
        - success
      title: Proxies_Check a proxy_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

```

## Examples



**Request**

```json
{
  "proxy": {
    "host": "1.2.3.4",
    "port": "1080",
    "type": "socks5",
    "password": "pass",
    "username": "user"
  }
}
```

**Response**

```json
{
  "code": 0,
  "data": {
    "ip": "1.2.3.4",
    "ip_data": {
      "isp": "Example ISP",
      "city": "New York",
      "region": "NY",
      "country": "US",
      "zipcode": "10001",
      "language": "en-US",
      "latitude": "40.7128",
      "timezone": "America/New_York",
      "longitude": "-74.0060"
    }
  },
  "success": true
}
```

**SDK Code**

```python Proxies_Check a proxy_example
import requests

url = "http://127.0.0.1:58931/api/proxies/check"

payload = { "proxy": {
        "host": "1.2.3.4",
        "port": "1080",
        "type": "socks5",
        "password": "pass",
        "username": "user"
    } }
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Proxies_Check a proxy_example
const url = 'http://127.0.0.1:58931/api/proxies/check';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"proxy":{"host":"1.2.3.4","port":"1080","type":"socks5","password":"pass","username":"user"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Proxies_Check a proxy_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://127.0.0.1:58931/api/proxies/check"

	payload := strings.NewReader("{\n  \"proxy\": {\n    \"host\": \"1.2.3.4\",\n    \"port\": \"1080\",\n    \"type\": \"socks5\",\n    \"password\": \"pass\",\n    \"username\": \"user\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Proxies_Check a proxy_example
require 'uri'
require 'net/http'

url = URI("http://127.0.0.1:58931/api/proxies/check")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"proxy\": {\n    \"host\": \"1.2.3.4\",\n    \"port\": \"1080\",\n    \"type\": \"socks5\",\n    \"password\": \"pass\",\n    \"username\": \"user\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Proxies_Check a proxy_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("http://127.0.0.1:58931/api/proxies/check")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"proxy\": {\n    \"host\": \"1.2.3.4\",\n    \"port\": \"1080\",\n    \"type\": \"socks5\",\n    \"password\": \"pass\",\n    \"username\": \"user\"\n  }\n}")
  .asString();
```

```php Proxies_Check a proxy_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'http://127.0.0.1:58931/api/proxies/check', [
  'body' => '{
  "proxy": {
    "host": "1.2.3.4",
    "port": "1080",
    "type": "socks5",
    "password": "pass",
    "username": "user"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Proxies_Check a proxy_example
using RestSharp;

var client = new RestClient("http://127.0.0.1:58931/api/proxies/check");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"proxy\": {\n    \"host\": \"1.2.3.4\",\n    \"port\": \"1080\",\n    \"type\": \"socks5\",\n    \"password\": \"pass\",\n    \"username\": \"user\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Proxies_Check a proxy_example
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["proxy": [
    "host": "1.2.3.4",
    "port": "1080",
    "type": "socks5",
    "password": "pass",
    "username": "user"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://127.0.0.1:58931/api/proxies/check")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```