Skip to main content
POST
/
api
/
contents
curl -X POST https://api.rhizomeai.com/api/contents \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "doc_id": "nda/2017/208264Orig1s000ChemR.pdf",
    "top_k": 10,
    "offset": 0
  }'
{
  "doc_id": "nda/2017/208264Orig1s000ChemR.pdf",
  "dataset": "fda_drug",
  "name": "TEPADINA THIOTEPA",
  "url": "https://www.accessdata.fda.gov/drugsatfda_docs/nda/2017/208264Orig1s000ChemR.pdf",
  "company": "ADIENNE SA",
  "year_decision": 2017,
  "pages": [
    {
      "page_num": 1,
      "text": "CENTER FOR DRUG EVALUATION AND RESEARCH..."
    },
    {
      "page_num": 2,
      "text": "TABLE OF CONTENTS..."
    },
    {
      "page_num": 3,
      "text": "EXECUTIVE SUMMARY..."
    }
  ],
  "total_pages": 97
}

Request Body

doc_id
string
required
The document identifier. Get this from the doc_id field in search results. Examples: nda/2017/208264Orig1s000ChemR.pdf or https://www.fda.gov/media/71756/download
top_k
integer
default:10
Maximum number of pages to return. Min: 1, Max: 100.
offset
integer
default:0
Number of pages to skip for pagination. Min: 0.

Response

doc_id
string
The document identifier.
dataset
string
The dataset this document belongs to.
name
string
Document name/title.
url
string
Original FDA URL for the document.
company
string
Company name (if applicable).
year_decision
integer
Year of the decision/publication.
pages
array
Array of document pages.
total_pages
integer
Total number of pages in the document (for pagination).
curl -X POST https://api.rhizomeai.com/api/contents \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "doc_id": "nda/2017/208264Orig1s000ChemR.pdf",
    "top_k": 10,
    "offset": 0
  }'
{
  "doc_id": "nda/2017/208264Orig1s000ChemR.pdf",
  "dataset": "fda_drug",
  "name": "TEPADINA THIOTEPA",
  "url": "https://www.accessdata.fda.gov/drugsatfda_docs/nda/2017/208264Orig1s000ChemR.pdf",
  "company": "ADIENNE SA",
  "year_decision": 2017,
  "pages": [
    {
      "page_num": 1,
      "text": "CENTER FOR DRUG EVALUATION AND RESEARCH..."
    },
    {
      "page_num": 2,
      "text": "TABLE OF CONTENTS..."
    },
    {
      "page_num": 3,
      "text": "EXECUTIVE SUMMARY..."
    }
  ],
  "total_pages": 97
}

Pagination Example

To fetch all pages of a large document:
Python
import requests

doc_id = "nda/2017/208264Orig1s000ChemR.pdf"
all_pages = []
offset = 0
page_size = 20

while True:
    response = requests.post(
        "https://api.rhizomeai.com/api/contents",
        headers={
            "Content-Type": "application/json",
            "x-api-key": "YOUR_API_KEY"
        },
        json={
            "doc_id": doc_id,
            "top_k": page_size,
            "offset": offset
        }
    )

    data = response.json()
    all_pages.extend(data["pages"])

    if len(all_pages) >= data["total_pages"]:
        break

    offset += page_size

print(f"Retrieved {len(all_pages)} pages")

Error Codes

StatusDescription
400Invalid request body
401Missing or invalid API key
404Document not found
429Rate limit exceeded (50 requests/minute)
500Internal server error