# Rank history from the API into a spreadsheet URL: https://storelift.net/guide/rank-history-api-to-spreadsheet/ Language: en Updated: 2026-11-25 Call GET /v1/apps/{id}/history for one country, turn every [day, rank] point into a row with day, platform, keyword, country and rank, and leave an empty rank empty instead of writing 0. Try it first on the keyless sandbox. Live API keys start on Pro (USD 29 a month or USD 290 a year); the Free plan has no API and no export. A rank series is easy to chart in a dashboard and awkward to merge with anything else. A spreadsheet fixes that, as long as the conversion keeps the three things a rank cell can mean: a position, absent from the results, or no reading that day. Below is the real answer, a conversion you can copy, and the limits that decide how far back you can pull. ## What the history endpoint returns This is the sandbox answer for GET /apps/sbx-lumen/history?country=us, the same example the API reference prints (three of its keywords, the first two days). The sandbox app is a made-up sample, not a real listing. ```json { "country": "us", "from": "2026-08-29", "to": "2026-09-27", "clamped": false, "partial": false, "series": { "ios:sleep sounds": [ ["2026-08-29", null], ["2026-08-30", null] ], "ios:white noise": [ ["2026-08-29", 57], ["2026-08-30", 57] ], "ios:nature sounds": [ ["2026-08-29", 32], ["2026-08-30", 30] ] } } ``` | Field | Meaning | | --- | --- | | country, from, to | The storefront and the date range the answer covers. Copy them into every row; a row without its country cannot be merged later. | | series | One list per keyword, keyed as platform:keyword (here ios:white noise). | | [day, rank] | One point per day. null means the search was run and the app was not in the results that day, which is not the same as a low rank. | | clamped | true when your from was earlier than your plan's history and was moved forward to it. | | partial | true when not every series could be filled in this answer; ask again or use a shorter range. | A day that is missing from a series has no reading for that day. Leave the cell empty; do not copy the neighbouring day into it. The keywords endpoint makes the same distinction explicitly: in the example record, sleep sounds comes back with measured: true and rank: null, while white noise has rank: 57. ## From JSON to rows Make one row per keyword per day. With curl and jq that is one command; it writes a header and turns null into an empty cell: ```bash curl -s "https://storelift.net/v1/sandbox/apps/sbx-lumen/history?country=us" \ | jq -r '(["day","platform","keyword","country","rank"] | @csv), (.country as $c | .series | to_entries[] | (.key | split(":")) as $k | .value[] | [.[0], $k[0], ($k[1:] | join(":")), $c, (.[1] // "")] | @csv)' > ranks.csv ``` For the example above the result is these six rows (the sandbox command returns the last 30 days, because sandbox dates move with yesterday): | day | platform | keyword | country | rank | | --- | --- | --- | --- | --- | | 2026-08-29 | ios | sleep sounds | us | | | 2026-08-30 | ios | sleep sounds | us | | | 2026-08-29 | ios | white noise | us | 57 | | 2026-08-30 | ios | white noise | us | 57 | | 2026-08-29 | ios | nature sounds | us | 32 | | 2026-08-30 | ios | nature sounds | us | 30 | With a live key, the call is the same with your app id and the key in a header. Use >> to append, and drop the repeated header line before importing: ```bash curl -s "https://storelift.net/v1/apps//history?country=us&from=2026-11-01&to=2026-11-24" \ -H "x-api-key: $STORELIFT_KEY" \ | jq -r '(["day","platform","keyword","country","rank"] | @csv), (.country as $c | .series | to_entries[] | (.key | split(":")) as $k | .value[] | [.[0], $k[0], ($k[1:] | join(":")), $c, (.[1] // "")] | @csv)' >> ranks.csv ``` Spreadsheet formulas that fetch a URL cannot send the key header, so run the fetch from a script (a scheduled job, or Apps Script in Google Sheets) and write the rows into the sheet. The key never belongs in a cell. ## Keeping the sheet honest - One key per row: day + platform + keyword + country. When you pull overlapping ranges, replace rows with the same key instead of adding them again. - Empty is not zero. An average over a column where empty cells became 0 describes a fall that never happened. Count the empty days separately. - Lower is better. Chart rank with the axis reversed, and compare medians over a week rather than single days. - Keep the dashboard as the reference. If your sheet and the dashboard disagree, check the range, the country and the empty days first; reconciling an export with dashboard totals walks through it. ## Plans, keys and how far back | | Free | Pro | Studio | | --- | --- | --- | --- | | Live API key | No | Yes | Yes | | Keyless sandbox and test keys | Yes | Yes | Yes | | Rank history the API can reach | — | 9 months | up to 18 months | | Longest range in one request | — | 274 days | 548 days | | CSV export in the dashboard | No | Yes | Yes | A history call costs 1 credit and needs the apps:read scope. Live keys start with sl_live_, test keys with sl_test_; a test key answers only from the sandbox, on every plan. Pro allows 10 requests a second and 12,000 credits a month. A range longer than one request allows returns range_too_long with the maximum, so pull long histories in slices. The base addresses are https://storelift.net/v1 and https://storelift.net/v1/sandbox. Pro is USD 29 a month or USD 290 a year, Studio USD 99 a month. On Free you read the same ranks in the dashboard, without the API or export. The endpoint list and errors are in the Storelift API guide. ## FAQ Q: Can I use the Storelift API on the free plan? A: Not with a live key: live keys start on Pro. The keyless sandbox and test keys work on every plan, so you can build and test the conversion before you upgrade. Q: Why are some rank cells empty? A: An empty cell means the app was not in the results that day (the API returns null) or that the day has no reading. Neither is a rank, so neither should become a number. Q: Can Google Sheets call the API directly? A: Not with a formula, because formulas that fetch a URL cannot send the key header. Use Apps Script or any scheduled script to call the API and write the rows.