> ## Documentation Index
> Fetch the complete documentation index at: https://docs.homelogs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Permits

> Returns permits mapped to the provided geo ID. Pagination is cursor-based via next_cursor.

Returns permit rows for a `geo_id`, with cursor-based pagination.

Use this endpoint when you want raw permit records (not pre-filtered lead rows).\
For lead-ready timing signals, use [Permit Signal Leads](/api-reference/endpoint/permit-signals-leads).


## OpenAPI

````yaml GET /v1/permits/search
openapi: 3.1.0
info:
  title: HomeLogs Geo + Permit Intelligence API
  version: 1.0.0
  description: >-
    Geo-first API for location resolution, permit retrieval, and active geo
    signal access.
servers:
  - url: https://api.homelogs.io
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: locations
    description: Location resolution and anchor detail endpoints.
  - name: permits
    description: Raw permit retrieval by geo scope.
  - name: signals
    description: Signal catalog and signal reads.
  - name: permit-signals
    description: Permit-scoped signal leads and aggregates.
  - name: health
    description: Service liveness endpoint.
paths:
  /v1/permits/search:
    get:
      tags:
        - permits
      summary: Search permits for a geo scope
      description: >-
        Returns permits mapped to the provided geo ID. Pagination is
        cursor-based via next_cursor.
      operationId: searchPermits
      parameters:
        - name: geo_id
          in: query
          required: true
          schema:
            type: string
            example: geo_city_0200d4df17d3b8cd84c6
        - name: from_date
          in: query
          required: false
          schema:
            type: string
            format: date
        - name: to_date
          in: query
          required: false
          schema:
            type: string
            format: date
        - name: status
          in: query
          required: false
          schema:
            type: string
        - name: permit_type
          in: query
          required: false
          schema:
            type: string
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        - name: cursor
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Permit page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermitsSearchResponse'
        '403':
          $ref: '#/components/responses/GatewayAuth403'
        '404':
          $ref: '#/components/responses/LocationNotFound404'
        '422':
          $ref: '#/components/responses/ValidationError422'
        '429':
          $ref: '#/components/responses/GatewayThrottle429'
        '500':
          $ref: '#/components/responses/InternalError500'
        '503':
          $ref: '#/components/responses/PermitsDependency503'
components:
  schemas:
    PermitsSearchResponse:
      type: object
      required:
        - geo_id
        - permits
        - next_cursor
      properties:
        geo_id:
          type: string
        permits:
          type: array
          items:
            $ref: '#/components/schemas/PermitItem'
        next_cursor:
          type:
            - string
            - 'null'
      additionalProperties: false
    PermitItem:
      type: object
      required:
        - permit_id
        - permit_type
        - status
        - issue_date
        - location
        - geo_match
      properties:
        permit_id:
          type:
            - string
            - 'null'
        permit_type:
          type:
            - string
            - 'null'
        status:
          type:
            - string
            - 'null'
        issue_date:
          type:
            - string
            - 'null'
          format: date
        completion_date:
          type:
            - string
            - 'null'
          format: date
        raw_description:
          type:
            - string
            - 'null'
        source:
          type:
            - string
            - 'null'
        location:
          $ref: '#/components/schemas/PermitLocation'
        geo_match:
          $ref: '#/components/schemas/PermitGeoMatch'
      additionalProperties: false
    GatewayErrorResponse:
      type: object
      properties:
        message:
          type: string
      additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: state must be a 2-letter code
            request_id:
              type:
                - string
                - 'null'
              example: req-123
    PermitLocation:
      type: object
      properties:
        full_address:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        state:
          type:
            - string
            - 'null'
        zipcode:
          type:
            - string
            - 'null'
        county:
          type:
            - string
            - 'null'
        jurisdiction:
          type:
            - string
            - 'null'
      additionalProperties: false
    PermitGeoMatch:
      type: object
      properties:
        geo_id:
          type:
            - string
            - 'null'
        geo_type:
          type:
            - string
            - 'null'
        confidence:
          type:
            - number
            - 'null'
      additionalProperties: false
  responses:
    GatewayAuth403:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayErrorResponse'
    LocationNotFound404:
      description: No matching location/resource found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError422:
      description: Validation failure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    GatewayThrottle429:
      description: Rate limit or quota exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayErrorResponse'
    InternalError500:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    PermitsDependency503:
      description: Permits data source unavailable or misconfigured.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````