nasa / apod-api

Astronomy Picture of the Day API service
Apache License 2.0
833 stars 162 forks source link

Turn on the concept_tags functionality into the official production service #75

Open ghost opened 3 years ago

ghost commented 3 years ago

Hello,

I'm getting this message on the concepts key. concept_tags search param is set to True.

There is a way to turn on the functionality?

Example URL

https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&date=2014-10-01&concept_tags=True

Response

{"concepts":"concept_tags functionality turned off in current service","copyright":"Francesco Antonucci","date":"2014-10-01","explanation":"The bright clusters and nebulae of planet Earth's night sky are often named for flowers or insects. Though its wingspan covers over 3 light-years, NGC 6302 is no exception. With an estimated surface temperature of about 250,000 degrees C, the dying central star of this particular planetary nebula has become exceptionally hot, shining brightly in ultraviolet light but hidden from direct view by a dense torus of dust.  This sharp close-up of the dying star's nebula was recorded in 2009 by the Hubble Space Telescope's Wide Field Camera 3, and is presented here in reprocessed colors.  Cutting across a bright cavity of ionized gas, the dust torus surrounding the central star is near the center of this view, almost edge-on to the line-of-sight. Molecular hydrogen has been detected in the hot star's dusty cosmic shroud. NGC 6302 lies about 4,000 light-years away in the arachnologically correct constellation of the Scorpion (Scorpius).    APOD Wall Calendar: Nebulas and Star Clusters","hdurl":"https://apod.nasa.gov/apod/image/1410/butterflyblue_hst_3919.jpg","media_type":"image","service_version":"v1","title":"The Butterfly Nebula from Hubble","url":"https://apod.nasa.gov/apod/image/1410/butterflyblue_hst_960.jpg"}
Sainterman commented 3 years ago

I think you would need a local instance of the API with concept_tags turned on

ghost commented 3 years ago

Thank you. Does that mean I should deploy to my own server? With what limitations? Unlimited calls? Why is it disabled?

Sainterman commented 3 years ago

I'm sorry but I don't have an answer to that since I'm having the same issue as you and am not a dev in this project, I'm now trying to set up the API locally. If i get it to work I'll let you know.

ghost commented 3 years ago

Thank you. Beyond this open source project I am a consumer of the public API and I have opened the question here because it is a GitHub repository where you can open questions. https://api.nasa.gov

Sainterman commented 3 years ago

Unfortunately the issue seems to be that the concept_tags functionality relies on the third party API http://access.alchemyapi.com/calls/text/TextGetRankedConcepts which ranked concepts and is now disabled according to https://www.ibm.com/cloud/blog/announcements/bye-bye-alchemyapi , I found this on the apod/utility.py file, therefore turning on the functionality requires a rewrite of the method get_concepts

ghost commented 3 years ago

https://github.com/nasa/apod-api/blob/65bfacb5c64d692c247dea2bd40ba300ec7c4dba/apod/utility.py#L314