Quickstart

Make your first call to the AllNutrition API in a couple of minutes: create a free API key, then send one request.

1. Get your free API key

Sign in to the AllNutrition web app, open Settings → API keys, and create a key. It's shown once — copy it. All /api/v1/* requests require it (only /api/v1/health is open).

2. Send a request

Ask a nutrition question and get a cited answer.

curl -X POST https://www.allnutrition.info/api/v1/ask \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ank_your_key" \
  -d '{"question": "How much vitamin D should an adult take daily?"}'

3. Read the response

You get an evidence-tagged answer plus citations.

{
  "question": "How much vitamin D should an adult take daily?",
  "answer": "Most adults need **600–800 IU (15–20 mcg) of vitamin D per day** ...",
  "evidence_strength": "strong",
  "consensus_level": "high",
  "last_updated": "2024-03-12T00:00:00Z",
  "sources": [
    {
      "id": "8f4e1c8a-9b6d-4f3e-9a12-0e7d2b6c1a44",
      "title": "Vitamin D — Fact Sheet for Health Professionals",
      "url": "https://ods.od.nih.gov/factsheets/VitaminD-HealthProfessional/",
      "publisher": "NIH Office of Dietary Supplements",
      "publisher_short_name": "NIH ODS",
      "evidence_level": "guideline",
      "trust_score": 0.92,
      "published_at": "2024-03-12T00:00:00Z",
      "excerpt": "The Recommended Dietary Allowance for adults 19–70 ..."
    }
  ]
}

4. Mind the daily limit

Every account gets 10 requests per UTC day (shared across all its keys, resetting at 00:00 UTC). Every response (success or error) carries headers so you can self-throttle:

RateLimit-Limit: 10
RateLimit-Remaining: 7
RateLimit-Reset: 41218

Watch live usage in Settings → API keys. Each /api/v1/ask question is also saved to your private Ask history in the app (visible only to you) — badged as an API session, hideable in settings, and skippable per request with "save_session": false or account-wide in settings. See Rate limits & errors for the full contract.

5. Pick the right endpoint

You want…Endpoint
A complete answer with citations POST /api/v1/ask
A comprehensive research report (slower) POST /api/v1/ask with "deep_research": true
A shareable link to the answer POST /api/v1/ask with "share": trueshare_url
Just the citations — bring your own LLM POST /api/v1/references/search
To check the API is up GET /api/v1/health

6. Next steps