Introduction
researchmap is a platform for researchers in Japan to manage and publish their academic achievements. In addition to registering publications, presentations, and other works, researchers can link them to KAKENHI (Grants-in-Aid for Scientific Research) projects to aggregate outputs per research project.
I looked into whether this linking could be done in bulk via the API or CSV import. As far as I could tell, it appeared to be limited to manual operations through the Web UI. So I tried automating it with Playwright.
Investigating Linking Methods
On researchmap, bulk registration of achievement data is possible via JSONL or CSV file import. However, linking KAKENHI projects to achievements did not appear to be supported through bulk import.
Checking the API Specification
Looking at the researchmap v2 API specification, the following fields are all marked as “not updatable”:
research_projects (KAKENHI) side:
rm:published_paper_id(linked paper achievement ID) → not updatablerm:presentation_id(linked presentation achievement ID) → not updatablerm:work_id(linked works achievement ID) → not updatable
Achievement (papers, presentations, etc.) side:
rm:research_project_id(linked KAKENHI ID) → not updatable
Verification
To confirm, I tested a JSONL import specifying identifiers.research_project_id:
{"insert":{"type":"presentations","id":"52101757"},"merge":{"identifiers":{"research_project_id":["51361068"]}}}
Result: The import showed as “completed,” but the linking was not applied. The field appears to be silently ignored.
Web UI Works
On the other hand, the researchmap Web UI (edit screen) allows selecting a KAKENHI project from a dropdown for each achievement to create the link.
This operation must be done manually one item at a time, which becomes tedious with many entries.
Automating with Playwright
I created a Python script using Playwright to automate the manual Web UI operations.
How It Works
- Load researchmap login credentials from a
.envfile - Launch a browser with Playwright and log in automatically
- Navigate to each achievement’s edit page (
/{slug}/{type}/{id}/edit) - Select the target KAKENHI project from the selectize.js-based dropdown
- Click the “Submit” button to save
- Automatically skip achievements that are already linked
Edit Page HTML Structure
On researchmap’s edit page, the KAKENHI dropdown is implemented with selectize.js:
<select name="data[PublishedPapersIndex][_source][identifiers][research_project_id][]"
class="form-control selectized"
multiple="multiple"
style="display: none;">
<option value="50040755" selected="selected">TEI-based Advanced Historical Text Construction</option>
</select>
The actual <select> element is hidden, and users interact through the custom UI generated by selectize.js. In Playwright, the selectize input is clicked to open the dropdown, and the option is selected:
# Click the selectize input area to open the dropdown
selectize_input = page.locator(f'#{selectize_id}-selectized')
await selectize_input.click()
# Select the target KAKENHI project from the dropdown
option = page.locator(f'.selectize-dropdown .option[data-value="{project_id}"]')
await option.click()
# Save with the "Submit" button
submit = page.locator('button[name="save"][type="submit"]')
await submit.click()
Linking Configuration File
The linking targets are managed in a JSON file:
{
"research_project_id": "50040755",
"research_project_title": "TEI-based Advanced Historical Text Construction",
"achievements": [
["published_papers", "52107631", "Potential of Digital Archives through Text"],
["published_papers", "52101821", "Multi-sensory Information Flow Model for Genji Karuta"],
["presentations", "51796134", "Technical Implementation of Digital Systems"],
["works", "36900480", "Digital Engishiki"]
]
}
Usage
# Install
pip3 install playwright
python3 -m playwright install chromium
# Set credentials in .env
echo 'RESEARCHMAP_LOGIN_ID=your_id' >> .env
echo 'RESEARCHMAP_PASSWORD=your_password' >> .env
# Dry run (check only)
python3 scripts/link_research_project.py config.json --dry-run
# Run
python3 scripts/link_research_project.py config.json
# Run with video recording
python3 scripts/link_research_project.py config.json --record
Execution Output
Logging in...
✓ Login complete
Linking to KAKENHI "TEI-based Advanced Historical Text Construction" (50040755)
Target: 10 items
[1/10] published_papers/52107631
✓ KAKENHI selected
✓ Saved
[2/10] published_papers/52101821
✓ KAKENHI selected
✓ Saved
...
[10/10] works/36900480
✓ KAKENHI selected
✓ Saved
==================================================
Success: 10
Skipped (already linked): 0
Failed: 0
On subsequent runs, already-linked achievements are automatically skipped:
[1/10] published_papers/52107631
- Already linked (skipped)
Demo Video
Summary
- Linking KAKENHI projects to achievements on researchmap could not be done via API, JSONL, or CSV import (fields are marked “not updatable”)
- The Web UI edit screen allows linking, but requires manual one-by-one operations
- Browser automation with Playwright enabled bulk linking
- The
--recordoption allows video recording of the automation process