Get link to resource

40 views
Skip to first unread message

healthyCoder

unread,
Mar 18, 2020, 12:45:11 PM3/18/20
to Europeana API forum
I have been using the Europeana Search APIs for about a week now. I am trying to get  the ".jpg" or any other equivalent link for a CHO withe the dctype:IMAGE.
The JSON returned contains the following fields:
edmIsShownAt - but it takes to the providers landing page
edmPreview - only gives thumbnail
link - gives another json but does'nt have a direct link to the image 

How can I using the Europeana Search API get the direct link to the resource? Is there any other API that I should be using? Any help would be appreciated.

Hugo Manguinhas

unread,
Mar 19, 2020, 5:52:54 AM3/19/20
to europe...@googlegroups.com
Dear User, 

Thank you for your email.

The Search API is more limited in terms of the amount of metadata that can be returned... however, besides the isShownAt and the preview as you mentioned, there is also the isShownBy which is the favoured media resource for the item (can be an image, video, audio, pdf, etc.). In case, this is not enough then the best option would be to go from the Search result to the Record API where you would get the complete metadata including knowing the mimetype associated to each media resource.

Please let us know if you have any further questions.

Sincerely,
The Europeana API team


--
Visit Europeana Labs for API Documentation, Open Datasets, and our Apps Showcase - http://labs.europeana.eu
---
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europeanaAPI...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/europeanaAPI/482b3706-3145-46d8-9157-d91e338cf583%40googlegroups.com.


--
Hugo Manguinhas | Product Manager API
T: +31 (0)70 3140657

E: hugo.ma...@europeana.eu | Skype: hugo.manguinhas

Be part of Europe's online cultural movement - join the Europeana Network Association: Sign up for the Association | #AllezCulture | @Europeanaeu | Europeana Pro website

Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate,
distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your
system.

healthyCoder

unread,
Mar 20, 2020, 10:26:55 AM3/20/20
to Europeana API forum
Thank you for your response.
I tried the record API with the following link
This returned a json file. But still a link to the actual image resource (in jpg/jpeg/png) in full quality is not available in this json.

With respect to the isShownBy parameter in search API, out of the 20 records returned none of them had isShownBy parameter. 

My use case involves extracting large amounts of images through the API. So getting a link to the image in full quality is necessary.

On Thursday, March 19, 2020 at 3:22:54 PM UTC+5:30, Hugo Manguinhas wrote:
Dear User, 

Thank you for your email.

The Search API is more limited in terms of the amount of metadata that can be returned... however, besides the isShownAt and the preview as you mentioned, there is also the isShownBy which is the favoured media resource for the item (can be an image, video, audio, pdf, etc.). In case, this is not enough then the best option would be to go from the Search result to the Record API where you would get the complete metadata including knowing the mimetype associated to each media resource.

Please let us know if you have any further questions.

Sincerely,
The Europeana API team


On Wed, 18 Mar 2020 at 17:45, healthyCoder <allenab...@gmail.com> wrote:
I have been using the Europeana Search APIs for about a week now. I am trying to get  the ".jpg" or any other equivalent link for a CHO withe the dctype:IMAGE.
The JSON returned contains the following fields:
edmIsShownAt - but it takes to the providers landing page
edmPreview - only gives thumbnail
link - gives another json but does'nt have a direct link to the image 

How can I using the Europeana Search API get the direct link to the resource? Is there any other API that I should be using? Any help would be appreciated.

--
Visit Europeana Labs for API Documentation, Open Datasets, and our Apps Showcase - http://labs.europeana.eu
---
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europe...@googlegroups.com.

James Morley

unread,
Mar 20, 2020, 11:29:23 AM3/20/20
to europe...@googlegroups.com
If you go to the record page at https://www.europeana.eu/portal/en/record/00718/plink__f_1_358099.html there is no image to represent the object. Whether that's correct or an error in the data I'm not sure though

On Fri, 20 Mar 2020, 14:26 healthyCoder, <allenab...@gmail.com> wrote:
Thank you for your response.
I tried the record API with the following link
This returned a json file. But still a link to the actual image resource (in jpg/jpeg/png) in full quality is not available in this json.

With respect to the isShownBy parameter in search API, out of the 20 records returned none of them had isShownBy parameter. 

My use case involves extracting large amounts of images through the API. So getting a link to the image in full quality is necessary.

On Thursday, March 19, 2020 at 3:22:54 PM UTC+5:30, Hugo Manguinhas wrote:
Dear User, 

Thank you for your email.

The Search API is more limited in terms of the amount of metadata that can be returned... however, besides the isShownAt and the preview as you mentioned, there is also the isShownBy which is the favoured media resource for the item (can be an image, video, audio, pdf, etc.). In case, this is not enough then the best option would be to go from the Search result to the Record API where you would get the complete metadata including knowing the mimetype associated to each media resource.

Please let us know if you have any further questions.

Sincerely,
The Europeana API team


On Wed, 18 Mar 2020 at 17:45, healthyCoder <allenab...@gmail.com> wrote:
I have been using the Europeana Search APIs for about a week now.. I am trying to get  the ".jpg" or any other equivalent link for a CHO withe the dctype:IMAGE.
The JSON returned contains the following fields:
edmIsShownAt - but it takes to the providers landing page
edmPreview - only gives thumbnail
link - gives another json but does'nt have a direct link to the image 

How can I using the Europeana Search API get the direct link to the resource? Is there any other API that I should be using? Any help would be appreciated.

--
Visit Europeana Labs for API Documentation, Open Datasets, and our Apps Showcase - http://labs.europeana.eu
---
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europe...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/europeanaAPI/482b3706-3145-46d8-9157-d91e338cf583%40googlegroups.com.


--
Hugo Manguinhas | Product Manager API
T: +31 (0)70 3140657

E: hugo.ma...@europeana.eu | Skype: hugo.manguinhas

Be part of Europe's online cultural movement - join the Europeana Network Association: Sign up for the Association | #AllezCulture | @Europeanaeu | Europeana Pro website

Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate,
distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your
system.

--
Visit Europeana Labs for API Documentation, Open Datasets, and our Apps Showcase - http://labs.europeana.eu
---
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europeanaAPI...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/europeanaAPI/e36c97a9-3af7-4deb-8c3a-7d5564bd589a%40googlegroups.com.

Hugo Manguinhas

unread,
Mar 20, 2020, 12:03:55 PM3/20/20
to europe...@googlegroups.com
Dear User, James,

In the particular example that you presented, the item does not have a direct link to a media resource, only a link to the data provider webpage and a thumbnail. This is valid for us as not all items are required to have a direct link to the media. 

To filter out this case you can add to your query (or qf parameter): provider_aggregation_edm_isShownBy:* 
 ... this is force all results to have that field filled.

Hope that helps you with your use case... and dont hesitate to contact us if you have any questions.

Sincerely,
The Europeana API team


Virus-free. www.avast.com



--
Hugo Manguinhas | Product Manager API
T: +31 (0)70 3140657

E: hugo.ma...@europeana.eu | Skype: hugo.manguinhas

Be part of Europe's online cultural movement - join the Europeana Network Association: Sign up for the Association | #AllezCulture | @Europeanaeu | Europeana Pro website

Virus-free. www.avast.com

healthyCoder

unread,
Mar 21, 2020, 6:57:27 AM3/21/20
to Europeana API forum
This is the set of query paramenters that I use:
{
'wskey': API_KEY,
'query': '*',
'profile': 'rich',
'reusability': ['open', 'restricted'],
'sort': ['europeana_id+asc', 'timestamp_created_epoch+asc'],
'cursor': '*',
'rows': 20,
'start': 1,
'type': 'IMAGE',
'provider_aggregation_edm_isShownBy': '*'
}
However, I still am not able to get any resource with the isShownBy field, and hence the direct link to the media.

--
Visit Europeana Labs for API Documentation, Open Datasets, and our Apps Showcase - http://labs.europeana.eu
---
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europe...@googlegroups.com.

James Morley

unread,
Mar 21, 2020, 7:50:50 AM3/21/20
to europe...@googlegroups.com
Hi

You state "I still am not able to get any resource with the isShownBy field" so are you saying you do get results, but *none* have that field present in the response? How many total results do you get for your query here?

I just did some testing and I do indeed think there could be an issue, but that wouldn't explain why you are getting no results with direct links to media (unless it just happens that your specific sort end sup with the first call having none, and latter 'pages' do have them).

Anyway, to share what I found ...


https://www.europeana.eu/api/v2/search.json?wskey={apikey}&query=*:*&fq=provider_aggregation_edm_isShownBy:* returns the same number. Hugo, this surely is wrong?

The simpler https://www.europeana.eu/api/v2/search.json?wskey={apikey}&query=*:*&media=true returns 41,199,523. As per the documentation - https://pro.europeana.eu/page/search - this should "Filter by records where an URL to the full media file is present in the edm:isShownBy or edm:hasView metadata and is resolvable". 

As per the guidance at https://pro.europeana.eu/files/Europeana_Professional/Share_your_data/Technical_requirements/EDM_Documentation/EDM_Mapping_Guidelines_v2.3_112016.pdf "edm:hasView should only be used where there are several views of the CHO and one (or both) of the mandatory edm:isShownAt or edm:isShownBy properties have already been used. It is for cases where one CHO has several views of the same object. (e.g. a shoe and a detail of the label of the shoe)" 

So my undertanding is that is that if you are just filtering for type:IMAGE then &media=true should probably do what you are looking for, at least as a workaround.

James  

---
James Morley


To unsubscribe from this group and stop receiving emails from it, send an email to europeanaAPI...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/europeanaAPI/c8680d98-c108-4a34-b2fd-5a30a3977937%40googlegroups.com.

healthyCoder

unread,
Mar 22, 2020, 1:39:15 AM3/22/20
to Europeana API forum
Hi,
Thank you for your detailed response.

  • When using the media=true parameter, it matches with 30,343,562 images. However, since I have a row=50 parameter, in the first page only 50 items were returned of which none of them had neither isShownBy nor hasView parameter. This leads me to believe that there might either me a problem in the query parameters I am using or in what the API is returning.
  • When I used 'sort': ['europeana_id+desc', 'timestamp_created_epoch+desc'], I received 50/50 images which had edmIsShownBy . But what is even more interesting is that all of them were "type": "TEXT" even though I had the mentioned 'type': 'IMAGE' in my query parameter list. Could you check this on your end to confirm its not a problem with the parameters I am passing. 
  • The difference between media=true being there vs when it wasn't there was 8,142,987 images which is honestly quite a lot. 
  • What I understood from your explanation of hasView parameter is that, ( if present ) it returns a different view or a different aspect of the CHO than what is present in either ( or both ) edm:isShownAt or edm:isShownBy properties. Is that correct?
  • Another thing I noted is: the number of records when using 'provider_aggregation_edm_isShownBy': '*' and when not using it is the same, 30,343,562 records. Is this how the parameter should be passed?
  • If there is a problem in my parameters, shouldn't the server be sending me an error code relating to that. I remember reading about it in the docs, but I can't seem to find it now.
The parameters I've used for the above testing:
{
    "wskey": API_KEY,
    "query": "*",
    "profile": "rich",
    "reusability": [
        "open",
        "restricted"
    ],
    "sort": [
        "europeana_id+desc",
        "timestamp_created_epoch+desc"
    ],
    "cursor": "*",
    "rows": "50",
    "media": "true",
    "start": 1,
    "type": "IMAGE",
    "provider_aggregation_edm_isShownBy": "*",
    "timestamp_created_epoch": "1521763200TO1521849600"
}

Hugo Manguinhas

unread,
Mar 23, 2020, 4:13:15 AM3/23/20
to europe...@googlegroups.com
Dear user,

If I understand correctly from your JSON structure, you are using the "type", "provider_aggregation_edm_isShownBy", and "timestamp_created_epoch" as HTTP parameters and not as query fields. These should be used within the query or qf parameters. Also take in consideration that the field names are case sensitive, so "type" should be "TYPE". I would advise to have a look at the documentation at: https://pro.europeana.eu/page/search

Hope that helps... and dont hesitate to contact us if you have any questions.


Sincerely,
The Europeana API team

Virus-free. www.avast.com

To unsubscribe from this group and stop receiving emails from it, send an email to europeanaAPI...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/europeanaAPI/43eadc61-0afa-4360-b31e-472ba5815651%40googlegroups.com.

James Morley

unread,
Mar 23, 2020, 4:51:59 AM3/23/20
to europe...@googlegroups.com
Hi Hugo

What I don't understand though is why 
and

both currently return 58,323,060 records?

That's what seems to be at the root of the problem, not being able to return only records that have and available image.

Best, James

---
James Morley

On Mon, 23 Mar 2020 at 08:13, Hugo Manguinhas <hugo.ma...@europeana.eu> wrote:
Dear user,

If I understand correctly from your JSON structure, you are using the "type", "provider_aggregation_edm_isShownBy", and "timestamp_created_epoch" as HTTP parameters and not as query fields. These should be used within the query or qf parameters. Also take in consideration that the field names are case sensitive, so "type" should be "TYPE". I would advise to have a look at the documentation at: https://pro.europeana.eu/page/search

Hope that helps... and dont hesitate to contact us if you have any questions.

Sincerely,
The Europeana API team

Virus-free. www.avast.com

On Sun, 22 Mar 2020 at 06:39, healthyCoder <allenab...@gmail.com> wrote:
Hi,
Thank you for your detailed response.

  • When using the media=true parameter, it matches with 30,343,562 images. However, since I have a row=50 parameter, in the first page only 50 items were returned of which none of them had neither isShownBy nor hasView parameter. This leads me to believe that there might either me a problem in the query parameters I am using or in what the API is returning.
  • When I used 'sort': ['europeana_id+desc', 'timestamp_created_epoch+desc'], I received 50/50 images which had edmIsShownBy . But what is even more interesting is that all of them were "type": "TEXT" even though I had the mentioned 'type': 'IMAGE' in my query parameter list. Could you check this on your end to confirm its not a problem with the parameters I am passing. 
  • The difference between media=true being there vs when it wasn't there was 8,142,987 images which is honestly quite a lot. 
  • What I understood from your explanation of hasView parameter is that, ( if present ) it returns a different view or a different aspect of the CHO than what is present in either ( or both ) edm:isShownAt or edm:isShownBy properties. Is that correct?
  • Another thing I noted is: the number of records when using 'provider_aggregation_edm_isShownBy': '*' and when not using it is the same, 30,343,562 records. Is this how the parameter should be passed?
  • If there is a problem in my parameters, shouldn't the server be sending me an error code relating to that.. I remember reading about it in the docs, but I can't seem to find it now.

Hugo Manguinhas

unread,
Mar 23, 2020, 6:24:27 AM3/23/20
to europe...@googlegroups.com
Hi James,

because the HTTP parameter is not named fq but qf :)

Please have a look at the documentation at: https://pro.europeana.eu/page/search

Sincerely,
The Europeana API team


Virus-free. www.avast.com

James Morley

unread,
Mar 23, 2020, 7:07:29 AM3/23/20
to europe...@googlegroups.com
Oh, sorry, that always used to get me! I'd forgotten that was the case with the Europena API as I have been using other APIs recently that use fq, which I believe is the more conventional method in Solr (see https://lucene.apache.org/solr/guide/6_6/common-query-parameters.html#CommonQueryParameters-Thefq_FilterQuery_Parameter vs https://lucene.apache.org/solr/guide/6_6/the-dismax-query-parser.html#TheDisMaxQueryParser-Theqf_QueryFields_Parameter )

---
James Morley

On Mon, 23 Mar 2020 at 10:24, Hugo Manguinhas <hugo.ma...@europeana.eu> wrote:
Hi James,

because the HTTP parameter is not named fq but qf :)

Please have a look at the documentation at: https://pro.europeana.eu/page/search

Sincerely,
The Europeana API team


Virus-free. www.avast.com

On Mon, 23 Mar 2020 at 09:51, James Morley <ja...@jamesmorley.net> wrote:
Hi Hugo

What I don't understand though is why 


both currently return 58,323,060 records?

That's what seems to be at the root of the problem, not being able to return only records that have and available image.

Best, James

---
James Morley


On Mon, 23 Mar 2020 at 08:13, Hugo Manguinhas <hugo.ma...@europeana.eu> wrote:
Dear user,

If I understand correctly from your JSON structure, you are using the "type", "provider_aggregation_edm_isShownBy", and "timestamp_created_epoch" as HTTP parameters and not as query fields. These should be used within the query or qf parameters.. Also take in consideration that the field names are case sensitive, so "type" should be "TYPE". I would advise to have a look at the documentation at: https://pro.europeana.eu/page/search

Virus-free. www.avast.com

Message has been deleted
Message has been deleted

healthyCoder

unread,
Mar 30, 2020, 1:50:59 AM3/30/20
to Europeana API forum
Hi,
Thank you Hugo and James. It looks like I am getting the correct resources now with the following parameter:

DEFAULT_QUERY_PARAMS = {
'wskey': API_KEY,
'query': '*',
'profile': 'rich',
'reusability': ['open', 'restricted'],
'sort': ['europeana_id+desc', 'timestamp_created_epoch+desc'],
'cursor': '*',
'rows': RESOURCES_PER_REQUEST,
'media': 'true',
'start': 1,
'qf': ['TYPE:IMAGE','provider_aggregation_edm_isShownBy:*'],
}

I was able to get a direct link to the resource using the isShownBy parameter The difference between the records which have a direct link vs those which don't have one is kinda lot (about 32%) for the date I tested.

Hugo Manguinhas

unread,
Mar 30, 2020, 11:21:18 AM3/30/20
to europe...@googlegroups.com
Dear user,

The query=*:* means any property and any value for which * is an alias ;)

We use the Solr search engine behind the scenes so If you are interested in learning more on how to use it you can either read our documentation but also Solr documentation which is far more exhaustive than ours.   

Sincerely,
The Europeana API team


On Mon, 30 Mar 2020 at 06:57, healthyCoder <allenab...@gmail.com> wrote:
Hi,
What does query=*:* mean? In particular the :* part. What is the diffference between query=*:* and query=* ? Also, I'm not sure I understand the difference between HTTP parameter and query field.


--
Hugo Manguinhas | Product Manager API
T: +31 (0)70 3140657

E: hugo.ma...@europeana.eu | Skype: hugo.manguinhas

Be part of Europe's online cultural movement - join the Europeana Network Association: Sign up for the Association | #AllezCulture | @Europeanaeu | Europeana Pro website

Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate,
distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your
system.

--
Visit Europeana Labs for API Documentation, Open Datasets, and our Apps Showcase - http://labs.europeana.eu
---
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europe...@googlegroups.com.

--
Visit Europeana Labs for API Documentation, Open Datasets, and our Apps Showcase - http://labs.europeana.eu
---
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europeanaAPI...@googlegroups.com.

Hugo Manguinhas

unread,
Mar 30, 2020, 11:24:32 AM3/30/20
to europe...@googlegroups.com
Dear user,

The percentage is not so high for the whole collection, but because either isShownBy or isShownAt are mandatory, there may still be a large number of items which dont have a link to an image... but you can also look into the edm:object which is the image used to generate the thumbnail but this one is only mandatory for Video but highly recommended to our data providers.

Sincerely,
The Europeana API Team

--
Visit Europeana Labs for API Documentation, Open Datasets, and our Apps Showcase - http://labs.europeana.eu
---
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europeanaAPI...@googlegroups.com.

healthyCoder

unread,
Mar 31, 2020, 11:18:32 AM3/31/20
to Europeana API forum
Hi,
Thank you for your response. I will check out the edm:object property.
To unsubscribe from this group and stop receiving emails from it, send an email to europe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages