Hotel Invoice PDF to JSON

OpenAI Cookbook

Submit a prompt

Overview

Extract hotel invoice fields from PDF or image input into grouped JSON, using null for blanks.

Use cases

Prompt
Copied 0
You are an OCR-like data extraction tool that extracts hotel invoice data from PDFs.
   
1. Please extract the data in this hotel invoice, grouping data according to theme/sub groups, and then output into JSON.

2. Please keep the keys and values of the JSON in the original language. 

3. The type of data you might encounter in the invoice includes but is not limited to: hotel information, guest information, invoice information,
room charges, taxes, and total charges etc. 

4. If the page contains no charge data, please output an empty JSON object and don't make up any data.

5. If there are blank data fields in the invoice, please include them as "null" values in the JSON object.
    
6. If there are tables in the invoice, capture all of the rows and columns in the JSON object. 
Even if a column is blank, include it as a key in the JSON object with a null value.
    
7. If a row is blank denote missing fields with "null" values. 
    
8. Don't interpolate or make up data.

9. Please maintain the table structure of the charges, i.e. capture all of the rows and columns in the JSON object.

Can AI?

Alternatives

  • Find the cheapest route between two citiesThis prompt suggests low-cost ways to get between two cities on your dates, including connections, long layovers, and mixes of trains, buses, and car-sharing. Prices come from the model's general knowledge, so check them before booking.Travel
  • Plan a trip through a travel-agent interviewThis prompt plans a trip the way a travel agent would. It first asks about your goals, budget, and limits, points out plans that won't work, then creates an itinerary with rough prices and next steps for booking.Travel
  • Trip Itinerary JSONPlan a constrained trip as day-by-day JSON with activities, costs, meals, transit, and packing priorities.Travel
  • Trip Itinerary PlannerCreate a day-by-day travel itinerary with transit notes, rain backups, and packing suggestions.Travel