Skip to content
EN
Get API key
Browse documentation

Get started

Headers and authentication

Use the right host and credential, then verify access with one free request.

On this page

Base URLs

PurposeBase URLAuthentication
Data queries and jobshttps://data.flashdata.dev/v1X-API-Key
Identity, balance, pricing, limits and usagehttps://api.flashdata.dev/v2X-API-Key
Remote MCPhttps://data.flashdata.dev/mcpHost-managed OAuth, or X-API-Key

Authentication headers

REST requests use X-API-Key with a trial or owner key. Send JSON bodies with Content-Type: application/json. CLI profiles, SDK environments and MCP connections store credentials separately.

Request headers
X-API-Key: fd_YOUR_API_KEY
Content-Type: application/json

Verify your key

Run this in your terminal. The identity endpoint checks access without spending credits. Skip the key prompt if FLASHDATA_API_KEY is already set.

Requires Bash and cURL 7.76+. Skip the hidden key prompt if your environment already supplies FLASHDATA_API_KEY. Run the read commands in the same terminal.

Set the key · skip if already configured
# Bash: paste the key into a hidden prompt, not into this command.
read -r -s -p "FlashData API key: " FLASHDATA_API_KEY
printf '\n'
export FLASHDATA_API_KEY
Read account JSON
(
: "${FLASHDATA_API_KEY:?Set FLASHDATA_API_KEY first}"
curl --fail-with-body --silent --show-error --max-time 20 \
  --header "X-API-Key: $FLASHDATA_API_KEY" \
  'https://api.flashdata.dev/v2/api-access/identity' || exit
printf '\n'
)

Expected response

Expect HTTP 200. Check the intended account, access: ready and your source in scopes. A temporary key has accountType: temporary; recurring owner work requires recurringAllowed: true.

Owner identity · illustrative response excerpt
{
  "accountId": "acc_example",
  "apiKeyId": "key_example",
  "accountType": "owned",
  "access": "ready",
  "scopes": [
    "google_search"
  ],
  "recurringAllowed": true
}

Signed storage URLs

Result and upload URLs include their own authorization. Follow the returned URL without X-API-Key, OAuth tokens or browser cookies.

Troubleshooting authentication

ResponseNext step
401Check the key in this environment, its expiry and revocation. Use a current API key, not an MCP token or a Bearer prefix.
403 / source missingAsk the owner to grant the required source to this key.
503 on this free readRetry the read later. Account status was not verified; do not infer that a paid query is ready.