Casatoo Locations API

Canonical location discovery.

GitHub OpenAPI

Operations 3

GET /api/v1/search/location-options Search supported Portuguese locations #
GET /api/v1/search/location-options/id/{location_id} Resolve a canonical location by ID #
GET /api/v1/search/location-options/slug/{slug} Resolve a canonical location by slug #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/casatoo-pt:casatoo-pt-locations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

casatoo-pt-locations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Casatoo Pt Locations API
  version: '2026-08-22'
  description: 'Operations tagged Locations across 2 of this provider''s published API definitions: casatoo-pt-agent-openapi.json, casatoo-pt-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- description: Production
  url: https://api.casatoo.pt
- description: Local development
  url: http://localhost:8200
tags:
- description: Canonical location discovery.
  name: Locations
paths:
  /api/v1/search/location-options:
    get:
      description: Returns at most 10 canonical locations matching `q`. Use the returned `slug` in `searchPublicListings`; do not invent location identifiers.
      operationId: searchLocations
      parameters:
      - in: query
        name: q
        required: true
        schema:
          maxLength: 100
          minLength: 2
          type: string
      - in: query
        name: limit
        required: false
        schema:
          format: int64
          maximum: 10
          minimum: 1
          type: integer
      responses:
        '200':
          content:
            application/json:
              example:
              - bounds:
                  east: -8.81
                  north: 39.32
                  south: 38.66
                  west: -9.51
                district: Lisboa
                id: 1
                location_type: DISTRICT
                municipality: null
                name: Lisboa
                slug: lisboa
              schema:
                items:
                  $ref: '#/components/schemas/LocationOptionOut'
                type: array
          description: ''
          headers:
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '400':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '404':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '422':
          description: Validation Error
        '429':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '500':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '502':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '503':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
      security: []
      summary: Search supported Portuguese locations
      tags:
      - Locations
    servers:
    - description: Production
      url: https://api.casatoo.pt
    - description: Local development
      url: http://localhost:8200
  /api/v1/search/location-options/id/{location_id}:
    get:
      description: Returns one canonical location or 404 when the ID is unknown.
      operationId: getLocationById
      parameters:
      - in: path
        name: location_id
        required: true
        schema:
          format: int64
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationOptionOut'
          description: ''
          headers:
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '400':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '404':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '422':
          description: Validation Error
        '429':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '500':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '502':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '503':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
      security: []
      summary: Resolve a canonical location by ID
      tags:
      - Locations
    servers:
    - description: Production
      url: https://api.casatoo.pt
    - description: Local development
      url: http://localhost:8200
  /api/v1/search/location-options/slug/{slug}:
    get:
      description: Slugs are lowercase and stable for constructing search requests.
      operationId: getLocationBySlug
      parameters:
      - in: path
        name: slug
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationOptionOut'
          description: ''
          headers:
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '400':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '404':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '422':
          description: Validation Error
        '429':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '500':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '502':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
        '503':
          content:
            application/problem+json:
              examples:
                rateLimited:
                  summary: Quota exceeded
                  value:
                    code: rate_limited
                    detail: Too many requests. Please try again shortly.
                    instance: /api/v1/search/public
                    request_id: 5e97d0c8-3d19-42ec-93c2-ad93ca676c1f
                    retry_after_seconds: 30
                    retryable: true
                    status: 429
                    title: Rate limit exceeded
                    type: https://api.casatoo.pt/problems/rate_limited
              schema:
                $ref: '#/components/schemas/AgentProblem'
          description: RFC 9457 problem details with stable Casatoo extensions.
          headers:
            Retry-After:
              description: Seconds to wait when the problem is retryable.
              schema:
                minimum: 0
                type: integer
            X-Request-ID:
              description: Stable request identifier for support and tracing.
              schema:
                type: string
      security: []
      summary: Resolve a canonical location by slug
      tags:
      - Locations
    servers:
    - description: Production
      url: https://api.casatoo.pt
    - description: Local development
      url: http://localhost:8200
components:
  schemas:
    AgentProblem:
      properties:
        code:
          type: string
        detail:
          type: string
        errors:
          items:
            properties:
              code:
                type: string
              message:
                type: string
              pointer:
                type: string
            required:
            - pointer
            - code
            - message
            type: object
          type: array
        instance:
          format: uri-reference
          type: string
        request_id:
          type: string
        retry_after_seconds:
          minimum: 0
          type: integer
        retryable:
          type: boolean
        status:
          maximum: 599
          minimum: 400
          type: integer
        title:
          type: string
        type:
          format: uri-reference
          type: string
      required:
      - type
      - title
      - status
      - detail
      - instance
      - code
      - retryable
      - request_id
      type: object
    Bounds:
      properties:
        east:
          format: double
          type: number
        north:
          format: double
          type: number
        south:
          format: double
          type: number
        west:
          format: double
          type: number
      required:
      - west
      - south
      - east
      - north
      type: object
    LocationOptionOut:
      properties:
        bounds:
          $ref: '#/components/schemas/Bounds'
        district:
          type: string
        id:
          format: int64
          type: integer
        location_type:
          $ref: '#/components/schemas/LocationTypeResponse'
        municipality:
          type:
          - string
          - 'null'
        name:
          type: string
        slug:
          type: string
      required:
      - id
      - name
      - municipality
      - district
      - location_type
      - slug
      - bounds
      type: object
    LocationTypeResponse:
      enum:
      - DISTRICT
      - MUNICIPALITY
      - PARISH
      - NEIGHBORHOOD
      type: string
  securitySchemes:
    casatooOAuth:
      description: Authorization code grants delegated human access.
      flows:
        authorizationCode:
          authorizationUrl: https://oauth.casatoo.pt/oauth2/auth
          scopes:
            casatoo:read: Compatibility alias for all supported read scopes.
            casatoo:write: Compatibility alias for all supported write scopes.
            likes:read: Read listing likes owned by the principal.
            likes:write: Create or remove listing likes for the principal.
            listings:read: Read listing search results, detail, and comparisons.
            locations:read: Resolve supported Portuguese locations.
            saved-searches:read: Read saved searches owned by the principal.
            saved-searches:write: Create, update, or delete saved searches for the principal.
          tokenUrl: https://oauth.casatoo.pt/oauth2/token
      type: oauth2
x-refined-from:
- casatoo-pt-agent-openapi.json
- casatoo-pt-openapi.yml
x-casatoo-contract-version: '2026-08-22'