U.S. flag

An official website of the United States government

Access the API: Web Browser

Follow the steps below to create a full URL and retrieve results. For example, if you want to estimate calcium levels in adult multivitamin/minerals using a label amount of 200mg, you can build a custom URL to request this information from the DSID API.

Step 1: Create a URL

  1. Start with our base URL for the API endpoint

    1. Separate the base URL from the input fields using a question mark (?)
    2. Current URL:
      https://dsid-api-dev.app.cloud.gov/v1/calculators?
  2. Add your study code

    1. Add the field name ("study_code"), an equals sign (=), and your value ("05")
    2. Current URL:
      https://dsid-api-dev.app.cloud.gov/v1/calculators?study_code="05"
  3. Add your ingredient to the URL

    1. Add an ampersand (&) after the study code in Step 2
    2. Add the field name ("ingredient"), an equals sign (=), and your value ("calcium")
    3. Current URL:
      https://dsid-api-dev.app.cloud.gov/v1/calculators?study_code="05"&ingredient="calcium"
  4. Add your label amount

    1. Add an ampersand (&) after the value in Step 3
    2. Add the field name ("label_amount"), an equals sign (=), and your value (200)
    3. Current URL:
      https://dsid-api-dev.app.cloud.gov/v1/calculators?study_code="05"&ingredient="calcium"&label_amount=200
  5. Add your units

    1. Add an ampersand (&) after the your label amount in Step 4
    2. Add the field name ("unit"), an equals sign (=), and your value ("mg")
    3. Current URL:
      https://dsid-api-dev.app.cloud.gov/v1/calculators?study_code="05"&ingredient="calcium"&label_amount=200&unit="mg"

Step 2: Enter your URL and retrieve output

You can now try out your full, specific URL in the browser:
https://dsid-api-dev.app.cloud.gov/v1/calculators?study_code="05"&ingredient="calcium"&label_amount=200&unit="mg"

The results should appear in JSON format and look something like this:
DSID API Example Response