Examples

Python

import requests

BASE_URL = "https://api.apeek.io/api/v1"

params = {
    "series": "initial_claims_sa,continued_claims_sa",
    "date_from": "2025-01-01",
    "date_to": "2026-01-01",
    "api_key": "your_api_key_here"
}

response = requests.get(
    f"{BASE_URL}/economic-data/ui_weekly_claims",
    params=params
)

result = response.json()
print(result["data"])

# Follow pagination
while result["pagination"].get("next_url"):
    response = requests.get(
        f"{BASE_URL}{result['pagination']['next_url']}"
    )
    result = response.json()
    print(result["data"])

cURL

curl "https://api.apeek.io/api/v1/economic-data/jolts?series=job_openings&date_from=2025-01-01&date_to=2026-01-01&api_key=your_api_key_here"

JavaScript (fetch)

const BASE_URL = "https://api.apeek.io/api/v1";

const params = new URLSearchParams({
  series: "initial_claims_sa",
  date_from: "2025-01-01",
  date_to: "2026-01-01",
  api_key: "your_api_key_here"
});

const response = await fetch(
  `${BASE_URL}/economic-data/ui_weekly_claims?${params}`
);

const result = await response.json();
console.log(result.data);

// Follow next_url for more pages
if (result.pagination.next_url) {
  const next = await fetch(`${BASE_URL}${result.pagination.next_url}`);
  const nextResult = await next.json();
  console.log(nextResult.data);
}

R

library(httr)
library(jsonlite)

response <- GET(
  "https://api.apeek.io/api/v1/economic-data/us_debt",
  query = list(
    series = "total_public_debt",
    date_from = "2025-01-01",
    date_to = "2026-01-01",
    api_key = "your_api_key_here"
  )
)

result <- fromJSON(content(response, "text"))
print(result$data)