GET /awards/{id}/projectoutcomes.json
API Endpoint
The NSF Award API outcomes endpoint, which returns an award's full record including the Project Outcomes Report HTML when the PI has filed one.
/awards/{id}/projectoutcomes.{format} returns the Project Outcomes Report of one award. A Project Outcomes Report is the public summary of results that a PI files after an award ends. The server asks for the JSON format: https://www.research.gov/awardapi-service/v1/awards/{id}/projectoutcomes.json.12
The response is not a separate report object. It is response.award[] with the award’s full record, the same record as the detail endpoint. The report is the HTML field projectOutComesReport, spelled with a capital C. Older awards and active awards don’t have this field.3 The tool description and the server instructions say that only completed awards from roughly 2010 on have a report.45
Search and detail records carry the same field when a report exists. The client derives hasOutcomesReport from it for every record, so a caller can check that flag before calling this endpoint.67
Request
| Part | Value |
|---|---|
| Method | GET |
| URL | https://www.research.gov/awardapi-service/v1/awards/{id}/projectoutcomes.json |
| Path parameter | id: the award id, URL-encoded by the client |
| Query | None |
| Headers sent by the client | Accept: application/json and User-Agent: nsf-awards-mcp/<version> |
The tool and the resource template check the id before the request, as described for the detail endpoint.
Response handling
getProjectOutcomes reads the first record of response.award and returns null in each of these cases:28
- The list is empty (the award does not exist). An HTTP 404 is not one of these cases: it throws
NSF API project outcomes lookup failed (HTTP 404)without a retry, because the API never answers a missing award with 404. - The record has no
projectOutComesReport, or the field is empty.
Otherwise it returns an NSFProjectOutcome:9
| Field | Taken from |
|---|---|
awardId |
id |
title |
title |
pdPIName |
pdPIName |
awardeeName |
awardeeName, or awardee when awardeeName is absent |
startDate |
startDate (mm/dd/yyyy) |
expDate |
expDate (mm/dd/yyyy) |
outcomesReport |
projectOutComesReport converted to plain text by htmlToText |
outcomesReportHtml |
projectOutComesReport as filed |
Failures throw NSF API project outcomes lookup failed (<reason>) (HTTP status, timed out or the network error message) or NSF API project outcomes lookup was cancelled. A serviceNotification of type ERROR or FATAL throws <code>: <message>, and a body that cannot be parsed, or that has no response object, also throws, as for the search endpoint. Retries follow the same rules.2
HTML to text
htmlToText makes a plain-text copy of the report:10
- It removes
scriptandstyleelements. - It turns
<br>and the ends ofp,div,li,h1-h6andtrelements into line breaks. - It starts each list item with
-. - It strips all other tags, and drops a dangling tag fragment at the end, because some reports are cut off in the middle of a tag.
- It decodes every HTML5 named entity (such as
’,—and©) and every numeric entity withdecodeHTMLfrom theentitiespackage, a runtime dependency.11 Each entity is decoded once (&rsquo;becomes’), a numeric entity outside the Unicode range becomes U+FFFD, and an unknown name such as&bogus;is left as written. - It turns non-breaking spaces into plain spaces and removes soft hyphens (U+00AD,
­), which would break text matching. - It removes
\r, indentation and empty bullets, collapses three or more line breaks to two, and trims the result.
How the server uses it
| Caller | Behaviour |
|---|---|
| get_project_outcomes | On null, throws No Project Outcomes Report for award <id>: the award does not exist, is still active, or predates outcome reports. Returns the plain text, and adds outcomesReportHtml only when includeHtml is true (default false).4 |
| nsf://award/{id}/outcomes | On null, fails with No Project Outcomes Report for award <id>. Returns outcomesReport as text/plain.5 |
Live verification
The weekly live suite checks three cases:7
- Award 1114898 returns a report. The plain text is longer than 200 characters and has no HTML tags, and the HTML copy does have tags.
- Award 9307607, from 1993, returns
null(no report). - The unknown id
0000000returnsnull.
Examples
curl -s https://www.research.gov/awardapi-service/v1/awards/1114898/projectoutcomes.json
The probe script sends this request as outcomes_1114898. It also sends awards.json?id=1114898&printFields=id,title,projectOutComesReport.12 The live suite confirms that search records carry the report: a search by id gives hasOutcomesReport: true for 1114898 and false for 9307607.7
The start of the report field in the fixture award-1114898.json:13
{
"id": "1114898",
"projectOutComesReport": "<div class=\"porColContainerWBG\">\n<div class=\"porContentCol\"><p>In the past half century many thousands of homes have been built within North American forests dominated by ponderosa pine (Pinus ponderosa) trees. ..."
}
The fixture award-9307607-no-report.json has the same full record shape but no projectOutComesReport key, so hasOutcomesReport is false.
-
NSF Award API documentation (research.gov) ↩
-
NSF API Integration and Live API behaviour notes in CLAUDE.md ↩
-
Record normalization ↩
-
Unit tests of the NSF API client ↩
-
NSF API type definitions ↩
-
HTML to text conversion ↩
-
package.json (runtime dependencies, including entities) ↩
-
Raw curl probes of API parameters ↩
-
Trimmed real API responses used as test fixtures ↩