Menudata API
Overview
Section titled “Overview”The Menudata API provides a daily export of posts.
The API is designed for bulk delivery:
- You call the API endpoint.
- It returns a signed download URL.
- You download the export file from that URL.
Authentication
Section titled “Authentication”This endpoint requires an API key.
Send one of:
- Preferred:
Authorization: Bearer <YOUR_API_KEY> - Alternative:
x-api-key: <YOUR_API_KEY>
If the key is missing or invalid, the API returns 401.
Endpoint
Section titled “Endpoint”GET /v1/menudata
Section titled “GET /v1/menudata”Returns a signed download URL for the daily export file.
Example request
Section titled “Example request”curl -sS "https://menudata-api-794349016039.us-east4.run.app/v1/menudata" \ -H "Authorization: Bearer YOUR_API_KEY"Example response
Section titled “Example response”{ "ok": true, "durationMs": 12345, "expiresAt": "2025-12-18T23:53:01.344Z", "downloadUrl": "https://storage.googleapis.com/<bucket>/<path>?X-Goog-..."}Fields
downloadUrl: signed URL (temporary) to download the export file.expiresAt: when the signed URL will expire (request a new URL after expiration).
Downloading & reading the export
Section titled “Downloading & reading the export”The export is NDJSON (one JSON object per line).
The object is stored in GCS as gzip-compressed (.ndjson.gz), but depending on your HTTP client, the download response may be automatically decompressed; if gunzip fails, treat the response as plain NDJSON.
Download the file
Section titled “Download the file”curl -L -o menudata.ndjson.gz "$DOWNLOAD_URL"Read the first few rows (works even if the response is auto-decompressed)
Section titled “Read the first few rows (works even if the response is auto-decompressed)”curl -sSL "$DOWNLOAD_URL" | head -n 5Read the first few rows
Section titled “Read the first few rows”gunzip -c menudata.ndjson.gz | head -n 5Convert to JSON array (optional)
Section titled “Convert to JSON array (optional)”If you need an array instead of NDJSON:
gunzip -c menudata.ndjson.gz | jq -s '.' > menudata.json- The signed URL is temporary. If it expires, call
GET /v1/menudataagain to get a new one.