On this page

    1. Home
    2. API
    3. API Reference
    4. Network
    5. Find Locations

    Find Locations

    Search for available providing locations including countries, regions, and cities. This endpoint returns matching locations, proximity groups, and raw provider specifications.


    POST /network/find-locations

    Search the network for available provider locations using a text-based query.

    Request

    POST /network/find-locations

    Headers:

    {
      "Host": "api.bringyour.com",
      "Content-Type": "application/json"
    }

    Body:

    {
      "query": "New York",
      "max_distance_fraction": 0.5,
      "enable_max_distance_fraction": true
    }
    FieldTypeDescription
    querystringThe text search query (e.g., "Germany", "London", "Tokyo").
    max_distance_fractionnumberOptional. Tolerance for proximity matching.
    enable_max_distance_fractionbooleanOptional. Enable or disable proximity-based searching.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    {
      "specs": [],
      "groups": [
        {
          "location_group_id": "udid",
          "name": "string",
          "provider_count": 0,
          "promoted": true,
          "match_distance": 0
        }
      ],
      "locations": [
        {
          "location_id": "udid",
          "location_type": "city",
          "name": "string",
          "city": "string",
          "region": "string",
          "country": "string",
          "country_code": "string",
          "provider_count": 0,
          "match_distance": 0
        }
      ]
    }

    Fields

    FieldTypeDescription
    specsarrayList of raw Provider Specs matching the query.
    groupsarrayHigh-level logical groups of providers (e.g., specific data centers).
    locationsarraySpecific geographic locations matching the query.
    locations[].location_typestringType of geography: country, region, or city.
    locations[].provider_countintegerNumber of active provider devices in this specific location.

    Example

    HTTP Request

    POST /network/find-locations HTTP/1.1
    Host: api.bringyour.com
    Content-Type: application/json
     
    {
      "query": "UK"
    }

    Successful HTTP Response

    {
      "locations": [
        {
          "location_id": "loc-uk-001",
          "location_type": "country",
          "name": "United Kingdom",
          "country_code": "GB",
          "provider_count": 1250
        },
        {
          "location_id": "loc-lon-002",
          "location_type": "city",
          "name": "London",
          "city": "London",
          "country": "United Kingdom",
          "country_code": "GB",
          "provider_count": 450
        }
      ]
    }


    Powered by Sudoc v2.5.0
    Hide table of contents