This would first grab the stream of all of your annotations, 1000 per request, requesting annotation details (hence the annotations=1 part), as a JSON object, and then according to Developer Portal: Authentication & API Methods | Inoreader - Stream contents, we would be able to use the Continuation field to add a “c” parameter that would be able to continue the request and grab the next 1000 items and so on and so forth until no “continuation” field is returned.
Whilst the basic premise here is that one could dump their InoReader annotations into Obsidian (since there is no way to export annotations right now as a button or similar within InoReader that I am aware of), the reality is we could get more creative than this and use different Stream IDs, as noted at Developer Portal: Authentication & API Methods | Inoreader - Stream IDs, to get annotations only for specific tags, only for read articles, or other specific criteria (with some limitations).
The main problem likely will be trying to do this properly with OAuth2 from what I can see since I haven’t worked with that before, but assuming that all works then the next part would mostly just be parsing the JSON output correctly to ensure we are grabbing all the entries and then saving the annotations appropriately. JSON doesn’t look to be too complicated so I imagine this wouldn’t take a long time to figure out.
Would be curious to know if this would assist anyone; I couldn’t find anything similar for InoReader when I was searching around so thought I’d post this here to gauge interest and see if people are working on anything similar.
Here I just put the name to be Obsidian and set the platform to be Web. I don’t think this really matters but shrug.
Hit Enter and you should get a new app with its usage statistics, the App ID, the App key (aka app secret, don’t share this), and the platform.
The downside at this point is that it seems like you can only create one application on a Pro account. Free accounts cannot create apps or otherwise use the API in any way. Anything more than one app requires an enterprise account.
The good news is that the API limits per app are 1000 requests a day for the Tier 1 API, which is what we will be using a lot of, and 100 requests a day for the Tier 2 API.
This will get us a list of all articles using the user/-/state/com.google/annotated stream, which contains a list of all annotated articles, will get the annotations itself with the annotations=1 or annotations=True setting, and get the max number of them per query, aka 1000.
From here we can probably use some JSON parser to get all of the “annotations” fields and then get the “text” field to get the highlighted text, and the “note” field to get the contents of the note. An important note here is that notes can exist without highlights, and highlights can exist without notes. So these fields are independent of one another and can one can exist without the other.