Make your first API call
Start by listing your sites, then read the widgets on one site. These requests do not change your account.
https://api.getsitecontrol.com/v1
1. Create an API key
Section titled “1. Create an API key”In the Getsitecontrol admin, open API keys and create a key with view access to widgets. See Authentication & access. Keep the key in your local environment or secret manager as GSC_API_KEY.
2. Find your site
Section titled “2. Find your site”curl --fail-with-body \ "https://api.getsitecontrol.com/v1/sites" \ -H "Authorization: Bearer $GSC_API_KEY" \ -H "GSC-Version: 2026-10-01"A successful response contains an items array with the sites your key can access. If a site is missing, check the key’s access. Find the site you want and copy its id. Site-scoped operations use that value in the URL.
Here is an illustrative response with only the fields relevant to this step:
{ "items": [ { "id": 123, "name": "My store", "url": "https://example.com" } ], "next_cursor": null}If next_cursor is not null, follow pagination to retrieve the remaining sites.
3. List its widgets
Section titled “3. List its widgets”Replace 123 with the real site ID:
SITE_ID=123 # Replace with an id returned by GET /sites
curl --fail-with-body \ "https://api.getsitecontrol.com/v1/sites/$SITE_ID/widgets?limit=10" \ -H "Authorization: Bearer $GSC_API_KEY" \ -H "GSC-Version: 2026-10-01"The response lists the widgets you can access. Use the List widgets reference to explore filters and response fields.
Before you ship
Section titled “Before you ship”- Send
GSC-Version: 2026-10-01to stay on the documented API version. - Treat IDs and cursors returned by the API as the source of truth.
- Handle non-success HTTP responses before reading application data.
- Record
X-Request-Idwhen a request fails; it helps support investigate.