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

# Informazioni sul Batch

> Recupera le informazioni sullo stato e il progresso di un batch. Per recuperare il contenuto di un batch, vedi [qui](/api-reference/batches/items)

<Tip>
  **Allega dati personalizzati:** Usa il parametro `metadata` per memorizzare coppie chiave-valore con il tuo batch. Vedi [Metadata](/api-reference/common/metadata) per i dettagli.
</Tip>


## OpenAPI

````yaml it/openapi/batches.json GET /v1/batches/{batch_id}
openapi: 3.0.3
info:
  title: API dei Batch
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/batches/{batch_id}:
    get:
      summary: Recupera informazioni sul batch
      description: >-
        Recupera informazioni su un batch specifico utilizzando il suo
        `batch_id`.
      parameters:
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
          description: L'ID del batch per cui recuperare le informazioni.
      responses:
        '200':
          description: Risposta riuscita con informazioni sul batch.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID del Batch
                  object:
                    type: string
                    description: Il tipo di oggetto. "batch" per questo endpoint.
                  status:
                    type: string
                    description: '`in_progress` o `completed`'
                  created:
                    type: number
                    description: Epoch creato
                  total_urls:
                    type: number
                    description: Conteggio degli URL nel batch
                  completed_urls:
                    type: number
                    description: Conteggio degli URL completati
                  parser:
                    type: string
                  country:
                    type: string
                  metadata:
                    $ref: '#/components/schemas/Metadata'
                  webhook:
                    type: string
                    description: URL del webhook per ricevere la notifica di completamento
                  credits_consumed:
                    type: integer
                    nullable: true
                    description: >-
                      Numero di crediti consumati da questa richiesta. Popolato
                      dopo il completamento dell'esecuzione. I crediti sono la
                      fonte di verità per la fatturazione.
                  cost_usd:
                    type: number
                    nullable: true
                    description: >-
                      Costo stimato in USD per questa richiesta. Popolato dopo
                      il completamento dell'esecuzione. Calcolato dai crediti
                      consumati e dal tuo piano tariffario — 99% accurato, ma
                      credits_consumed è il valore autorevole.
        '401':
          description: >-
            Le credenziali di autenticazione sono mancanti o non valide. Vedi
            [Unauthorized](/api-reference/errors/unauthorized) per i dettagli.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: error_abc123
                object: error
                code: invalid_api_key
                type: https://docs.olostep.com/api-reference/errors/unauthorized
                status: 401
                title: Non autorizzato
                detail: Your API key is invalid
                created: 1704067200
                metadata: {}
        '404':
          description: >-
            Batch non trovato per l'ID fornito. Vedi [Non
            Trovato](/api-reference/errors/not_found) per i dettagli.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: error_abc123
                object: error
                code: batch_not_found
                type: https://docs.olostep.com/api-reference/errors/not_found
                status: 404
                title: Non Trovato
                detail: Batch not found
                created: 1704067200
                metadata: {}
        '500':
          description: >-
            Errore interno del server. Vedi [Internal
            Error](/api-reference/errors/internal_error) per i dettagli.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: error_abc123
                object: error
                code: internal_server_error
                type: https://docs.olostep.com/api-reference/errors/internal_error
                status: 500
                title: Errore Interno del Server
                detail: An unexpected error occurred
                created: 1704067200
                metadata: {}
      security:
        - Authorization: []
components:
  schemas:
    Metadata:
      type: object
      description: >-
        Insieme di coppie chiave-valore per memorizzare informazioni aggiuntive
        su un oggetto. Segue l'approccio di Stripe con regole di validazione:
        massimo 50 chiavi, chiave massimo 40 caratteri (senza parentesi quadre),
        valore massimo 500 caratteri, tutti i valori memorizzati come stringhe.
      additionalProperties:
        type: string
        maxLength: 500
        description: >-
          Valore dei metadati (max 500 caratteri). Numeri e booleani sono
          automaticamente convertiti in stringhe.
      maxProperties: 50
      example:
        order_id: '12345'
        customer_name: John Doe
        priority: high
        processed: 'true'
      x-validation-rules:
        max_keys: 50
        key_max_length: 40
        key_forbidden_chars:
          - '['
          - ']'
        value_max_length: 500
        value_types:
          - string
          - number (coerced)
          - boolean (coerced)
    Error:
      type: object
      description: Risposta di errore Dettagli Problema RFC 7807
      properties:
        id:
          type: string
          description: Identificatore univoco dell'errore
        object:
          type: string
          enum:
            - error
          description: Sempre 'error'
        code:
          type: string
          description: Codice di errore leggibile dalla macchina
        type:
          type: string
          format: uri
          description: Riferimento URI che identifica il tipo di problema
        status:
          type: integer
          description: Codice di stato HTTP
        title:
          type: string
          description: Breve riassunto leggibile dall'uomo
        detail:
          type: string
          description: Spiegazione leggibile dall'uomo
        created:
          type: integer
          description: Timestamp Unix
        metadata:
          $ref: '#/components/schemas/Metadata'
        errors:
          type: array
          description: Array opzionale di dettagli aggiuntivi sull'errore
          items: {}
      required:
        - id
        - object
        - code
        - type
        - status
        - title
        - detail
        - created
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Intestazione di autenticazione Bearer del tipo Bearer <token>, dove
        <token> è il tuo token di autenticazione.

````