DEV Community 👩‍💻👨‍💻

Vicente Reyes
Vicente Reyes

Posted on

[SOLVED]Using an external API in Django


I'm trying to solve my issue with using an external API in django. Can anyone help me?

Using an external API in Django


I'm trying to use an external API to grab data for my project to show on the template.

def get_data(title, url, description, body, datePublished):
  url = ''
    params = {"autoCorrect": "true", "pageNumber": "1", "pageSize": "10", "q": "police", "safeSearch": "true" }
    r = requests.get(url, params=params)
    data = r.json()
    article_data =

Top comments (0)

Take a look at this:


Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. 🛠