Skip to main content
Question

Reliable Offline method to convert Docebo API browsers JSON responses to CSV or Excel?

  • August 24, 2026
  • 3 replies
  • 15 views

Does anybody know of a reliable offline method to convert the JSON responses from the Docebo API browser to CSV file or Excel sheet? The Power Query in Excel is NOT working. Uploading a JSON file with Corporate data is NOT an option!

3 replies

Do you have Docebo Connect that you could have it make a call (or series) and parse the results to CSV for you?


Moshe.Machlav
Helper III
Forum|alt.badge.img+2

Hi ​@tpendev ,

Before diving into scripts, have you checked if Docebo's New Reports can export this data directly to CSV for you? Often, the native reporting engine can pull exactly what you're trying to grab from the API without the need to parse JSON manually.

If you definitely need the data from the API browser and must convert it entirely offline, a short Python script is the most reliable method. Docebo's API responses are heavily structured (for API endpoints, see the recent Developer Portal updates: https://help.docebo.com/hc/en-us/articles/34161634814482-Developer-content-has-moved-to-the-Docebo-Developer-Portal), and Python's pandas library handles nested JSON effortlessly.

Here is a quick script you can run locally:

Python

 

import pandas as pd
import json

# Load your JSON file downloaded from the API Browser
with open('docebo_response.json', 'r', encoding='utf-8') as f:
data = json.load(f)

# Docebo API responses usually nest the core array inside a 'data' key
df = pd.json_normalize(data['data'])

# Export directly to CSV
df.to_csv('docebo_data.csv', index=False)

In organizations I've worked with, the pattern that holds up best when strict data policies prohibit third-party converters is utilizing local Python environments. Alternatively, if your IT department hasn't approved Python, you can use a native Windows PowerShell command which requires zero installation: (Get-Content -Raw docebo_response.json | ConvertFrom-Json).data | Export-Csv output.csv -NoTypeInformation. Both options guarantee your corporate data never leaves your local machine.

Hope this helps!


  • Author
  • Novice III
  • August 26, 2026

EDIT: Sorry for my late reply, however I was in a hurry and instead of wasting time looking for a reliable, secure and offline tool, I just made my Python script that parses the JSON into CSV even extracting and separating into additional columns the deeply nested Payloads in the JSON and without using pandas.

Thank you to everyone who responded to my question!

If someone is interested, here is the py script, no pandas needed:
 

import json
import csv
from collections import OrderedDict

def extract_logs_with_payload(json_path, output_csv=None):
"""
Extract all keys from data -> logs as columns
and also unpack every key inside the stringified 'payload'
as additional columns for the same row.
"""
with open(json_path, "r", encoding="utf-8") as f:
data = json.load(f)

logs = data.get("data", {}).get("logs", [])
if not logs:
raise ValueError("No logs found under data -> logs")

rows = []
all_keys = OrderedDict()

for log in logs:
row = dict(log)

payload_raw = row.pop("payload", None)

if isinstance(payload_raw, str):
try:
payload_dict = json.loads(payload_raw)
row.update(payload_dict)
except json.JSONDecodeError:
row["payload"] = payload_raw
elif isinstance(payload_raw, dict):
row.update(payload_raw)

for key in row:
all_keys[key] = None

rows.append(row)

columns = list(all_keys.keys())


if output_csv:
with open(output_csv, "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=columns, extrasaction="ignore")
writer.writeheader()
for row in rows:
writer.writerow({col: row.get(col, "") for col in columns})
print(f"Saved → {output_csv}")

return rows, columns


# ------------------------------------------------------------------
# Usage example
# ------------------------------------------------------------------
if __name__ == "__main__":
input_file = "input.json" # ← change this
output_file = "extracted_logs.csv"

rows, columns = extract_logs_with_payload(input_file, output_file)

# Simple preview
print("Columns:", columns)
print("\nFirst few rows:")
for row in rows[:3]:
print(row)