newsAPI

FREEMIUM
(Ким) Strata Consulting LLC | Оновлено 2 месяца назад | News, Media
Популярність

9.7 / 10

Затримки

2,391ms

Рівень обслуговування

100%

Health Check

N/A

Повернутися до всіх обговорень

What is the path for retreiving images?

Rapid account: Adam 1 Ai T 2 Js Qm
adam-1aiT2JsQm
месяц назад

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 19 дней назад

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 19 дней назад

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!

Приєднуйтесь до обговорення — додайте повідомлення нижче:

Вхід / Реєстрація, щоб публікувати нові повідомлення