Skip to content

Instantly share code, notes, and snippets.

@Robotics-now
Last active May 18, 2026 22:12
Show Gist options
  • Select an option

  • Save Robotics-now/16f67688b8825f08e88e39cf3e532d61 to your computer and use it in GitHub Desktop.

Select an option

Save Robotics-now/16f67688b8825f08e88e39cf3e532d61 to your computer and use it in GitHub Desktop.
import requests
user_input = input("Enter a word to look up: ")
api_url = f"http://current.domain/api/your_api_key/eng/{user_input}"
response = requests.get(api_url)
data = response.json()
if response.status_code == 200:
data = response.json()
lis = []
for entry in data["results"]:
lis.append(entry['definition'])
count = 1
for i in lis:
print(f'{count}. {i}')
count += 1
@Robotics-now

Copy link
Copy Markdown
Author

This is the example code for the Dictionary OPEN api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment