newsAPI

FREEMIUM
Por Strata Consulting LLC | Actualizada hace 2 meses | News, Media
Popularidad

9.7 / 10

Latencia

1,857ms

Nivel de servicio

100%

Health Check

N/A

Volver a todas las conversaciones

What is the path for retreiving images?

Rapid account: Adam 1 Ai T 2 Js Qm
adam-1aiT2JsQm
hace un mes

Hi

When fetching data the “image” variable return a value like:

“api/attachments/CC8iK0NnNUJUWFJMZWtKSGVHbFNZbFJ2VFJDb0FSaXNBaWdCTWdhVmxKUXB1Z1k”

I am guessing I need to do another request to fetch this image.

I have tried making a GET request to a few variations like:
https://newsapi90.p.rapidapi.com/api/attachments/CC8iK0NnNUJUWFJMZWtKSGVHbFNZbFJ2VFJDb0FSaXNBaWdCTWdhVmxKUXB1Z1k

Passing X-RapidAPI-host and X-RapidAPI-Key in the headers.

All I get is a 404 not found. Am I querying the correct endpoint?

Regards
Adam

Rapid account: Strataconsultingllc
strataconsultingllc Commented hace un mes

This bug has been fixed. The image URLs that are returned by newsAPI will now look something like this: news.google.com/attachments/CC8iK0NnNVRPVWxVTFhsQlFtaHFTRjlIVFJERUF4aW5CU2dLTWdhQjBJcnlVQVU

One thing to note is that Google News recently changed the way it links to images, so this URL will end up redirecting to the actual image. in this example case, the final URL will look like this: https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSRv2VhkhJsVkv4MiJXezqlvV50w-OmiC6Qcu1coXY5hVtq14EyCx2FSvbnEUwaBfM

Google might change things in the future, but as of 5/12/2024 when this post was written, this is the most current information.

I hope this helps. Thanks!

Rapid account: Strataconsultingllc
strataconsultingllc Commented hace un mes

Hi Adam,

Thanks for reaching out about this issue. This appears to be a bug that has recently surfaced where the URLs for the article images are not populating correctly. I will look into this issue immediately and get back to you as soon as I can.

Thanks for catching this and bringing it to my attention!

Únase a la conversación, añada un comentario a continuación:

Inicie sesió/Regístrese para publicar nuevos comentarios