Docs menuexpand_more
Cookbook
Export to Google Sheets
Key points
- check_circle?format=csv returns the same rows as the JSON response, as CSV.
- check_circleSend the key in the x-api-key header. ?apikey= in the URL is not supported.
- check_circleThe example uses sector medians (/stable/industry-benchmarks, 10 tokens per call).
Endpoints to use
Code
Replace YOUR_API_KEY with a key issued in your dashboard. Switch languages with the tabs.
curl -s "https://api.zenithcode.net/stable/industry-benchmarks?format=csv" \ -H "x-api-key: YOUR_API_KEY" \ -o benchmarks.csv
How the code works
- 1Paste the code into the Apps Script editor and replace API_KEY with your key.
- 2Run refresh() to write to a sheet named benchmarks.
- 3Run setup() once and refresh() runs every day in the 21:00 hour.
Things to note
- errorIMPORTDATA cannot send headers, so it does not work. Use Apps Script or Power Query.
- errorStore the key in script properties instead of the code.
- errorSharing the sheet with others counts as providing data to third parties, which Free and Pro do not allow.
FAQ for investors and developers
Do other endpoints work the same way?expand_more
Yes; just change the URL. For responses with nested fields, fetch JSON and reshape it.
Does it work in Excel?expand_more
Paste the Power Query code from the Excel tab into Data > Get Data > Blank Query.
FAQ for AI builders and researchers
Is CSV the same as JSON?expand_more
It returns the same rows. Nested fields are awkward in CSV, so use JSON for those endpoints.
When is the data refreshed?expand_more
This endpoint's source is rebuilt at 16:45 and 19:45 Japan time, Monday to Saturday.
Disclaimer
This page explains how to use a Japanese equity data API and how its data is defined. It is not a solicitation to invest or a recommendation to buy or sell any security. The content reflects information at the time of writing and is not guaranteed to be accurate or complete. Investment decisions are your own responsibility.
What you may show or provide to third parties depends on your plan and Article 8 of the Terms. Exchange data such as stock prices may not be shown to third parties on any plan. Terms, Article 8 · Data sources and terms of use

