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

# Within Operation

> Retrieves precipitation data within a specified circular area and time range.



## OpenAPI

````yaml /open-api/en/precipitations_version-1.json post /v1/precipitations/within
openapi: 3.1.0
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: https://api.iklim.co
    description: Production server
  - url: https://api-test.iklim.co
    description: Test server
security: []
tags:
  - name: Precipitation API
    description: Endpoints for querying precipitation data.
paths:
  /v1/precipitations/within:
    post:
      tags:
        - Precipitation API
      summary: Within Operation
      description: >-
        Retrieves precipitation data within a specified circular area and time
        range.
      operationId: getWithin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrecipitationsWithinRequest'
        required: true
      responses:
        '200':
          description: Successfully retrieved the list of precipitation records.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrecipitationsResponse'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '401':
          description: Unauthorized
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '402':
          description: Paid Subscription Required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
              examples:
                Payment Required:
                  summary: Example response
                  description: Payment Required
                  value:
                    timestamp: '2025-06-25T11:15:41.429518242'
                    status: 402
                    error: Payment Required
                    message: You Need To Renew Your Subscription or Purchase New One
                    path: /v1/precipitations/within
        '403':
          description: Forbidden/Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
              examples:
                No Subscription Found For This Service Endpoint:
                  summary: Missing Subscription
                  description: No Subscription Found For This Service Endpoint
                  value:
                    timestamp: '2025-06-25T11:21:50.510755746'
                    status: 403
                    error: Forbidden
                    message: No Subscription Found For This Service Endpoint
                    path: /v1/precipitations/within
                This Location Is Not In Allowed Geographic Boundaries:
                  summary: Out of Allowed Geographic Boundaries
                  description: This Location Is Not In Allowed Geographic Boundaries
                  value:
                    timestamp: '2025-06-25T15:59:19.452326857'
                    status: 403
                    error: Forbidden
                    message: >-
                      The Location You Are Querying [dd.ddddd, dd.ddddd] Is Not
                      Within The Geographic Boundaries Allowed In Your
                      Subscription [Country, Region]
                    path: /v1/precipitations/within
        '429':
          description: Subscription Limits For This Service is Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
              examples:
                Too Many Requests:
                  summary: Example response
                  description: Too Many Requests
                  value:
                    timestamp: '2025-06-25T11:02:12.653874655'
                    status: 429
                    error: Too Many Requests
                    message: Your Subscription Limits For This Service is Exceeded
                    path: /v1/precipitations/within
        '500':
          description: Internal Server Error During Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
              examples:
                Internal Server Error Example:
                  summary: Example response
                  description: Internal Server Error Example
                  value:
                    timestamp: '2025-04-14T16:58:10.414972912'
                    status: 500
                    error: Internal Server Error
                    message: An Error Occurred During Invocation
                    path: /endpoint/uri/here
components:
  schemas:
    PrecipitationsWithinRequest:
      type: object
      properties:
        center:
          $ref: '#/components/schemas/GeoPoint'
          description: Latitude/longitude of the circle center used for the query.
        radius:
          type: number
          format: double
          description: Radius in meters defining the search circle around the center point.
          example: 1000
          maximum: 200000
          minimum: 0
        intensityThreshold:
          type: string
          description: Precipitation intensity threshold for filtering results.
          enum:
            - DRIZZLE
            - LIGHT
            - MODERATE
            - HEAVY
            - VERY_HEAVY
            - EXTREME
          example: MODERATE
        backwardInterval:
          type: integer
          format: int32
          description: Backward interval in seconds counting back from the end time.
          example: 3600
          maximum: 2592000
          minimum: 60
        endTimeEpoch:
          type: integer
          format: int64
          description: >-
            Query end time in Epoch milliseconds. Can be extended up to 2 hours
            future.
          example: 1646374400000
          minimum: 0
        pageNumber:
          type: integer
          format: int32
          description: Zero-based page number to fetch from the paged results.
          example: 0
          minimum: 0
        pageSize:
          type: integer
          format: int32
          description: Number of results returned per page.
          example: 10
          maximum: 100
      required:
        - backwardInterval
        - center
        - endTimeEpoch
        - pageNumber
        - pageSize
        - radius
    PrecipitationsResponse:
      type: object
      properties:
        precipitations:
          type: array
          description: List of precipitation records matching the query.
          items:
            $ref: '#/components/schemas/Precipitation'
        queryTimestamp:
          type: integer
          format: int64
          description: The timestamp when the query was executed, in Epoch milliseconds.
        totalRecords:
          type: integer
          format: int64
          description: Total number of records found for the given query.
        pageNumber:
          type: integer
          format: int32
          description: The current page number of the paginated response.
          example: 0
        pageSize:
          type: integer
          format: int32
          description: The number of records returned per page.
          example: 10
    StandardErrorResponse:
      type: object
      description: Standard API error response structure
      properties:
        timestamp:
          type: string
          format: date-time
          description: Timestamp when the error occurred
          example: YYYY-mm-DDTHH:MM:SS.nnnnnnnnn
        status:
          type: integer
          format: int32
          description: HTTP status code
          example: XXX
        error:
          type: string
          description: Error name or type
          example: Error Name
          minLength: 1
        message:
          type: string
          description: Main error message
          example: Error Message
          minLength: 1
        messages:
          type: array
          description: Additional detailed error messages
          items:
            type: string
        path:
          type: string
          description: Request path that caused the error
          example: /endpoint/uri/here
          minLength: 1
      required:
        - error
        - message
        - path
        - status
        - timestamp
    GeoPoint:
      type: object
      properties:
        lng:
          type: number
          format: double
          description: Longitude coordinate.
          example: 32.857358
          maximum: 180
          minimum: -180
        lat:
          type: number
          format: double
          description: Latitude coordinate.
          example: 39.93504
          maximum: 90
          minimum: -90
      required:
        - lat
        - lng
    Precipitation:
      type: object
      properties:
        eventId:
          type: string
          description: Unique identifier for the precipitation event.
          example: 6932e0b4d4a02eb8afdf2951
        radarTimeStamp:
          type: integer
          format: int64
          description: The specific timestamp of the radar data, in Epoch milliseconds.
          example: 1646374400000
        forecast:
          type: boolean
          description: >-
            Indicates if the precipitation data is a forecast (true) or an
            observation (false).
          example: false
        intensity:
          type: string
          description: The intensity level of the precipitation (e.g., DZ, LI, MD).
          enum:
            - DRIZZLE
            - LIGHT
            - MODERATE
            - HEAVY
            - VERY_HEAVY
            - EXTREME
          example: MODERATE

````