Ben
06/01/2026, 11:59 AMavery (BAML)
06/01/2026, 12:33 PMavery (BAML)
06/01/2026, 12:35 PMavery (BAML)
06/01/2026, 12:35 PMphren0logy
06/02/2026, 5:19 PMBen
06/04/2026, 10:43 AMimport json
# Initialize the parser and ensure it returns JSON
parser = LlamaParse(
api_key="your-llama-cloud-api-key",
result_type="json" # Crucial to get bbox and spatial data
)
# Parse the document
document_json = parser.get_json_results("your_document.pdf")
# Access the bounding box of the first text item/page
for page in document_json[0]['pages']:
for item in page.get('items', []):
content_type = item.get('type')
bbox_coords = item.get('bbox')
print(f"Type: {content_type}")
print(f"Bounding Box: {bbox_coords}")Ben
06/04/2026, 10:44 AMBen
06/04/2026, 10:44 AMphren0logy
06/04/2026, 3:26 PMBen
06/04/2026, 9:39 PMphren0logy
06/04/2026, 10:00 PM