---
title: "Export Research Job Pdf"
method: GET
path: "/api/v1/research/{job_id}/pdf"
tags: ["grep-public-api"]
---

# Export Research Job Pdf

`GET /api/v1/research/{job_id}/pdf`

## Request

- Base URL: `https://api.grep.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.grep.ai/api/v1/research/{job_id}/pdf`
- Auth: none declared

Export a research job's report as a PDF.

Builds the same body the UI renders. The set of check_results considered
depends on the job's agent:
  - Default research jobs: ``grep.open_research``, ``grep.research_follow_up``,
    ``grep.report_revision``.
  - ``grep-brain`` parent jobs: also pulls sub-jobs' check_results
    (``grep.expert_chat``, ``grep.research_fork_chat``) plus the
    scheduled/recurring/user-edit revision command_ids.
  - Brain sub-jobs (``grep-expert-chat-v1`` / ``grep-research-fork-chat``):
    same expanded set scoped to the sub-job itself.

From those rows, ``_select_primary_and_followups`` picks one primary
report (mirroring ``ResearchJob.tsx`` — latest completed revision wins,
falling back to a running revision with body, then ``open_research``,
then the first non-followup) and a list of appended sections
(``grep.research_follow_up`` and non-revision brain sub-reports). The
primary's body comes from ``payload.report`` (preferred) or ``answer``.
Browserbase renders the resulting markdown via ``build_pdf_html`` →
``generate_pdf_from_html``, with a basic ``markdown_pdf`` fallback if
Browserbase is unavailable.

## Path parameters

- `job_id` union, required
  - string, uuid
  - string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/grep/apis/grep-api.md) - [All operations](https://skmtc.dev/grep/apis/grep-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grep/apis/grep-api/revisions/3719dd7f43ec?raw)
