# CompanyEnrich City Search API

Search CompanyEnrich City via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Treg, pass parameters such as countryCodes, query, and retrieve structured data including city or location identifier, location name, reported latitude, reported longitude, and current page to build city selectors, disambiguate places, and navigate large result sets.

Documentation: https://openany.si/market/apis/companyenrich/search-cities-by-name/
API ID: 9da37119-7779-402f-9b00-c2228ed33b4e
Provider: treg
Contract revision: 4
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/treg/call/companyenrich.geo.cities.search
Page update time: 2026-12-03T02:37:01.741Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:37:01.741Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "CompanyEnrich City Search API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "additionalProperties": false,
      "description": "JSON request body for Search cities by name. See individual field descriptions for input requirements.",
      "properties": {
        "countryCodes": {
          "description": "ISO alpha-2 codes to scope the search",
          "example": [
            "US"
          ],
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "page": {
          "description": "1-based page number",
          "minimum": 1,
          "type": "integer"
        },
        "query": {
          "description": "city name; prefixes work ('san fran' matched three San Francisco entries)",
          "example": "san fran",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    "page": {
      "type": "integer"
    },
    "totalItems": {
      "type": "integer"
    },
    "totalPages": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Third-party reference · Testnet verified: business + billing
```bash
curl \
  'https://api.openany.si/v1/agent-apis/treg/call/companyenrich.geo.cities.search' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "countryCodes": [
    "US"
  ],
  "query": "san fran"
}'
```

## Response example
Historical third-party reference. It may differ from the current provider response; verify the original contract before use.
Third-party response reference · Documented HTTP 200
```json
{
  "items": [
    {
      "id": 130518,
      "latitude": 37.77823,
      "longitude": -122.4425,
      "name": "City and County of San Francisco"
    },
    {
      "id": 131186,
      "latitude": 37.77493,
      "longitude": -122.41942,
      "name": "San Francisco"
    },
    {
      "id": 131281,
      "latitude": 37.65466,
      "longitude": -122.40775,
      "name": "South San Francisco"
    }
  ],
  "page": 1,
  "totalItems": 3,
  "totalPages": 1
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
