export output "oa_fetch" in openalexr

32 views
Skip to first unread message

Iván Hernandez

unread,
Jul 31, 2025, 10:00:35 AMJul 31
to OpenAlex Community
I am new using openalexr, which I find very useful but I am strugling to convert the output of a query using oa_fetch (using dois) into a csv file that I can use in "biblioshiny" importing raw data.

Is there any way to create a csv file similarly to the one you can obtain in a query in Open Alex search (for example, this one https://openalex.org/works?page=1&view=list,report,api&filter=doi_starts_with:10.1111/j.1745-5871.2008.00557.x|10.1002/2013EO100005|10.1002/2013EO26|10.1002/2013EO420004|10.1002/2013JD020138|10.1002/2014EF000239|10.1002/2014EO400001|10.1002/2014EO460007|10.1002/2014GL059561|10.1002/2014PA002717|10.1002/2015GL065265|10.1002/2015RG000482|10.1002/2016EF000363|10.1002/2016GB005408|10.1002/2016GL067911|10.1002/2016PA003072|10.1002/2016RG000521|10.1002/2017EF000663|10.1002/2017GL073057|10.1002/2017JB014695|10.1002/2017JD026728|10.1002/2017PA003118|10.1002/ece3.4394|10.1002/ecs2.2438|10.1002/eost.v94.26|10.1002/fee.1754|10.1002/fee.2395|10.1002/gbc.20071|10.1002/hyp.1381|10.1002/hyp.1382|10.1002/hyp.1383|10.1002/hyp.1384|10.1002/hyp.1385|10.1002/hyp.1386|10.1002/hyp.1387|10.1002/hyp.1388|10.1002/hyp.1389|10.1002/hyp.1390)
I have also another problem, that the url search using the entity doi_start_with, is not very precise, and returns more dois that match some of the ones I provided (because they start with the same digits). Is there any way to filter using the "exact doi"? It would be possible to do the search using OpenAlex Api, but I do not know how to export the restuls in a csv or text in the same way as the OpenAlex url search.
thanks for your help.
Best regards,
Iván

Rainer M. Krug

unread,
Jul 31, 2025, 10:21:02 AMJul 31
to Iván Hernandez, OpenAlex Community
What are you using? Python? R? For both there are packages which make the export to csv, as well as searching OpenAlex, easier. In R: openalexR. In python: I am not a python user. 

Cheers

Rainer



Sent from my iPhone

On 31 Jul 2025, at 16:00, Iván Hernandez <rapine...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "OpenAlex Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openalex-commun...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/openalex-community/0b24ef65-3f35-41e0-b9a7-82e7b74b201bn%40googlegroups.com.

Rainer M. Krug

unread,
Jul 31, 2025, 10:56:40 AMJul 31
to Iván Hernandez, OpenAlex Community
Sorry - just saw you mention openalxR. You can convert the search results to a tibble. Look at the fields - some are nested, but depending on your needs, you might not need these? Newer used biblioshiny. 




Sent from my iPhone

On 31 Jul 2025, at 16:21, Rainer M. Krug <Rai...@krugs.de> wrote:

What are you using? Python? R? For both there are packages which make the export to csv, as well as searching OpenAlex, easier. In R: openalexR. In python: I am not a python user. 

Teresa

unread,
Aug 3, 2025, 4:44:22 AMAug 3
to Iván Hernandez, OpenAlex Community
The openalexr package pulls data in as nested data frames (look at the authorship variable for instance), which can't be saved as a CSV file (or at least not properly, in my experience). I instead save them as an RDS file (special to R), clean up the data in R so I can unnest the frames from each other and then save them all as CSVs. 

OAX does now allow you to download your search results from the online search interface as an Excel file. The formatting is not great - they combine multiple values in one cell and separate them using the pipe operator - but that is another way if you don't want to manipulate the data in R. 

Teresa Schultz 
University of Nevada, Reno

Krugs.de

unread,
Aug 3, 2025, 5:16:26 AMAug 3
to Teresa, Iván Hernandez, OpenAlex Community
Another great format for these nested data frames is parquet, hi a the arrow package) with many additional advantages (processing on disk, much less memory needed - particularly useful for large tables). 

Rainer

---
Dr. Rainer M. Krug (PhD Conservation Ecology, SUN; MSc Conservation Biology, UCT; Dipl. Phys. Germany)

Senckenberg Society for Nature Research
Senckenberganlage 25, 60325 Frankfurt am Main, Germany

Orcid ID: 0000-0002-7490-0066


On 3 Aug 2025, at 10:44, Teresa <tma...@gmail.com> wrote:


Message has been deleted

Iván Hernandez

unread,
Aug 20, 2025, 10:53:24 AMAug 20
to OpenAlex Community
Hi again, I managed to download the data from openalex using a filter by doi and making batches of 100 dois (I have 3000, so it is doable). Normally everything goes well, I can see that the dois I copied are accepted by openalex. For exmaple here the screenshot below. The problem is when I try to export the results as .csv, the file is empty. It is strange since I can see the stats of the 100 dois in openalex. I checked individually some random dois, and there is no problem with them, but I can not export the results. Am I missing anything? why openalex does not export the results sometimes? 
The link with the string of dois can be found here: https://openalex.org/works?page=1&view=list,report,api&filter=doi:10.1088/1755-1315/9/1/012003|10.1088/1755-1315/9/1/012004|10.1088/1755-1315/9/1/012005|10.1088/1755-1315/9/1/012006|10.1088/1755-1315/9/1/012007|10.1088/1755-1315/9/1/012008|10.1088/1755-1315/9/1/012009|10.1088/1755-1315/9/1/012010|10.1088/1755-1315/9/1/012011|10.1088/1755-1315/9/1/012012|10.1088/1755-1315/9/1/012013|10.1088/1755-1315/9/1/012014|10.1088/1755-1315/9/1/012015|10.1088/1755-1315/9/1/012016|10.1088/1755-1315/9/1/012017|10.1088/1755-1315/9/1/012018|10.1088/1755-1315/9/1/012019|10.1088/1755-1315/9/1/012020|10.1088/1755-1315/9/1/012021|10.1088/1755-1315/9/1/012022|10.1088/1755-1315/9/1/012023|10.1088/2515-7620/abcca9|10.1093/gji/ggab053|10.1093/gji/ggv051|10.1093/pnasnexus/pgac048|10.1098/rsbl.2019.0011|10.1098/rsbl.2019.0284|10.1098/rsbl.2019.0357|10.1098/rsbl.2019.0358|10.1098/rsbl.2019.0388|10.1098/rsbl.2019.0390|10.1098/rsbl.2019.0441|10.1098/rsbl.2019.0447|10.1098/rsbl.2020.0005|10.1098/rsbl.2020.0881|10.1098/rspb.2020.0662|10.1098/rspb.2022.1994|10.1098/rstb.2019.0718|10.1103/PhysRevE.104.064136|10.1111/1365-2664.12782|10.1111/1365-2745.12195|10.1111/1365-2745.12702|10.1111/gcb.12737|10.1111/gcb.13193|10.1111/gcb.13808|10.1111/gcb.15871|10.1111/geb.12682|10.1111/geb.13176|10.1111/j.1365-2427.2005.01412.x|10.1111/j.1365-2427.2005.01413.x|10.1111/j.1365-2427.2005.01414.x|10.1111/j.1365-2427.2005.01415.x|10.1111/j.1365-2427.2005.01416.x|10.1111/j.1365-2427.2005.01427.x|10.1111/j.1365-2427.2005.01428.x|10.1111/j.1365-2427.2005.01429.x|10.1111/j.1365-2427.2005.01430.x|10.1111/j.1365-2427.2005.01431.x|10.1111/j.1365-2427.2005.01432.x|10.1111/j.1365-2427.2005.01433.x|10.1111/j.1365-2427.2005.01434.x|10.1111/j.1365-2427.2005.01435.x|10.1111/j.1744-7909.2007.00423.x|10.1111/j.1744-7909.2007.00425.x|10.1111/j.1744-7909.2007.00426.x|10.1111/j.1744-7909.2007.00427.x|10.1111/j.1744-7909.2007.00429.x|10.1111/j.1744-7909.2007.00448.x|10.1111/j.1745-5871.2008.00550.x|10.1111/j.1745-5871.2008.00551.x|10.1111/j.1745-5871.2008.00552.x|10.1111/j.1745-5871.2008.00554.x|10.1111/j.1745-5871.2008.00555.x|10.1111/j.1745-5871.2008.00558.x|10.1111/j.1745-5871.2008.00562.x|10.1111/jbi.13379|10.1111/jfr3.12512|10.1111/jvs.12594|10.1111/jvs.12601|10.1111/nph.12059|10.1111/nph.12929|10.1111/nyas.13865|10.1111/nyas.13911|10.1126/sciadv.1500679|10.1126/sciadv.1700457|10.1126/sciadv.aaw4981|10.1126/sciadv.aaz5512|10.1126/sciadv.abb6376|10.1126/sciadv.adf0198|10.1126/science.1120808|10.1126/science.1137127|10.1126/science.1205749|10.1126/science.1208277|10.1126/science.295.5554.407d|10.1126/science.323.5917.999b|10.1126/science.aaa4019|10.1126/science.aai8464|10.1130/B31796.1|10.1130/B35564.1|10.1130/G31857.1&id=cbWNGUHwQwPoU9nyAxwvwc
Screenshot 2025-08-19 at 17-07-06 Works search OpenAlex.pngThanks!
Iván

Krugs.de

unread,
Aug 20, 2025, 11:01:18 AMAug 20
to Iván Hernandez, OpenAlex Community

I assume that you are using openalexR as before? Could you please provide the code you are using? Or how are you exporting what to csv?

Cheers,

Rainer


On 20 Aug 2025, at 16:53, Iván Hernandez <rapine...@gmail.com> wrote:

Hi again, I managed to download the data from openalex using a filter by doi and making batches of 100 dois (I have 3000, so it is doable). Normally everything goes well, I can see that the dois I copied are accepted by openalex. For exmaple here the screenshot below. The problem is when I try to export the results as .csv, the file is empty. It is strange since I can see the stats of the 100 dois in openalex. I checked individually some random dois, and there is no problem with them, but I can not export the results. Am I missing anything? why openalex does not export the results sometimes? 
Reply all
Reply to author
Forward
0 new messages