Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search Inside API fetch request authorization #10437

Open
jordancrouch opened this issue Feb 11, 2025 · 0 comments
Open

Search Inside API fetch request authorization #10437

jordancrouch opened this issue Feb 11, 2025 · 0 comments
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Needs: Community Discussion This issue is to be brought up in the next community call. [managed] Priority: 3 Issues that we can consider at our leisure. [managed] Theme: Public APIs Issues related to APIs accessible to external parties. [managed] Type: Question This issue doesn't require code. A question needs an answer. [managed]

Comments

@jordancrouch
Copy link

Question

After following the Search Inside API following the documentation on the Open Library website here for a personal project for education purposes, most responses return a 403 error due to CORS policy - are there any options/headers currently set to be able to make use of this, similar to using the S3 Authentication for item metadata, for example?

Additional context

For example, a fetch request for The fellowship of the ring using the following URL returns an error due to CORS policy (search for "gandalf" inside of the text): https://ia903204.us.archive.org/fulltext/inside.php?item_id=fellowshipofring0001tolk&doc=fellowshipofring0001tolk&path=/34/items/fellowshipofring0001tolk&q=%22gandalf%22

However, an open source version of this book returns the request successfully using the same search query and the following link in the request: https://ia601003.us.archive.org/fulltext/inside.php?item_id=j-r-r-tolkien-lord-of-the-rings-01-the-fellowship-of-the-ring-retail-pdf&doc=j-r-r-tolkien-lord-of-the-rings-01-the-fellowship-of-the-ring-retail-pdf&path=/3/items/j-r-r-tolkien-lord-of-the-rings-01-the-fellowship-of-the-ring-retail-pdf&q=%22gandalf%22

Another open source book was tested, but returned the following error: "No hOCR or Abbyy file present", despite a 'HOCR' file being listed in the download options on the web page, as well as in the files property of the metadata.

Issue resolution criteria

Clarification on the limitations of using the Search Inside API: if it's possible to use this with additional authentication for books currently returning an error due to CORS, or if it's only possible to be used on publications in the 'opensource' collection. Clarification if the "No hOCR or Abbyy file present" is correct, or if there is a different file/format that needs to be provided.

Stakeholders

@jordancrouch jordancrouch added Needs: Community Discussion This issue is to be brought up in the next community call. [managed] Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Question This issue doesn't require code. A question needs an answer. [managed] labels Feb 11, 2025
@mekarpeles mekarpeles added Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 3 Issues that we can consider at our leisure. [managed] Theme: Public APIs Issues related to APIs accessible to external parties. [managed] and removed Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Needs: Community Discussion This issue is to be brought up in the next community call. [managed] Priority: 3 Issues that we can consider at our leisure. [managed] Theme: Public APIs Issues related to APIs accessible to external parties. [managed] Type: Question This issue doesn't require code. A question needs an answer. [managed]
Projects
None yet
Development

No branches or pull requests

2 participants