The Pythoneers

Your home for innovative tech stories about Python and its limitless possibilities. Discover, learn, and get inspired.

Featured

10 MindBlowing Free APIs to Supercharge Your Next Project

Abhay Parashar
The Pythoneers
Published in
12 min readMar 5, 2025

--

Photo by Douglas Lopes on Unsplash

1. IPStack

Your reaction after seeing this API response
import requests
import json # Import the JSON module

API_KEY = "YOUR_API_KEY"
IP = "101.32.228.0" ## IP You Wann Explore

url = f"https://api.ipstack.com/{IP}?access_key={API_KEY}&hostname=1"

response = requests.get(url)

# Pretty-print JSON response
print(json.dumps(response.json(), indent=2))
Script output — IPStack API

Some use-cases

2. MarketStack

Don’t be like him.. Do your proper stock analysis using MarketStack API
MarketStack_Stock_Comparision.py Script Output

Some use-cases

3. Scrapestack

import requests
from bs4 import BeautifulSoup

params = {
'access_key': 'YOUR_API_KEY',
'url': 'https://scrapestack.com/documentation'
}

api_result = requests.get('http://api.scrapestack.com/scrape', params)
website_content = api_result.content

# Parse HTML
soup = BeautifulSoup(website_content, "html.parser")
#print(soup.prettify()) ## Prettify The Scraped Content

# Extract all paragraph texts
paragraphs = [p.get_text() for p in soup.find_all('p')]

## If u plant to use Google Colab for this!!
from IPython.core.display import display, Markdown
display(Markdown("\n\n".join(paragraphs)))
Sample Scraped Data — Neat & Clean!!

Some use-cases

4. Mediastack

Never Miss and Breaking News Ever Again
# Python 3
import http.client, urllib.parse
import json
conn = http.client.HTTPConnection('api.mediastack.com')

params = urllib.parse.urlencode({
'access_key': 'YOUR_API_KEY',
'categories': 'technology,science', # Excluding general & sports
'sort': 'popularity',
'limit': 2, # Fetch latest 2 articles
'sources':'cnn,bbc'
})

conn.request('GET', '/v1/news?{}'.format(params))

res = conn.getresponse()
data = res.read()

print(data.decode('utf-8'))
Daily Tech & Cyber News Digest Newsletter Email — Screenshot By Author

Some use-cases

5. Weatherstack

import requests
import json

API_KEY = "YOUR_API_KEY"
url = f"https://api.weatherstack.com/current"
params = {"access_key": API_KEY, "query": "London"}
response = requests.get(url, params=params)

if response.status_code == 200:
data = response.json()
current_weather = data.get("current", {})
location = data.get("location", {})
print(f"📍 Location: {location.get('name')}, {location.get('country')}")
print(f"🌡️ Temperature: {current_weather.get('temperature')}°C")
print(f"☀️ Condition: {', '.join(current_weather.get('weather_descriptions', []))}")
print(f"💨 Wind Speed: {current_weather.get('wind_speed')} km/h")
print(f"💧 Humidity: {current_weather.get('humidity')}%")
print(f"🥵 Feels Like: {current_weather.get('feelslike')}°C")

Some use-cases

6. Number Verification API

import requests
phone_number = "14158586273"
url = f"https://api.apilayer.com/number_verification/validate?number={phone_number}"

payload = {}
headers= {
"apikey": "YOUR_API_KEY"
}

response = requests.request("GET", url, headers=headers, data = payload)

status_code = response.status_code
print(response.text)
Script output

Some use-cases

7. Text to Emotion API

import requests

url = "https://api.apilayer.com/text_to_emotion"
review = "The hotel service is worst, They should add a minus in front of 5 and make it a -5 star restaurant"

payload = f"{review}".encode("utf-8")
headers= {
"apikey": "YOUR_API_KEY"
}

response = requests.request("POST", url, headers=headers, data = payload)

status_code = response.status_code
result = response.text
print(result)
Text_To_Emotion_Reviews.py Output of Top 10 Reviews Emotions

Some use-cases

8. Pdflayer

import requests

# API URL with access key and document URL
URL = "https://realpython.com/python-news-february-2025/" ## URL You want to convert to PDF
API_KEY = "YOUR_API_KEY"
url = f"http://api.pdflayer.com/api/convert?access_key={API_KEY}&document_url={URL}"

# Make the API request
response = requests.post(url)

# Check if the request was successful
if response.status_code == 200:
# Save the response content as a PDF file
with open("Feb_Roundup_Python.pdf", "wb") as pdf_file:
pdf_file.write(response.content)
print("✅ PDF downloaded successfully as 'Feb_Roundup_Python.pdf'")
else:
print(f"❌ Failed to download PDF. Status Code: {response.status_code}")
Downloaded PDF File using Pdflayer API
Screenshot of Generated PDF File-Feb_Roundup_Python.pdf using Pdflayer API

Some use-cases

9. Bad Words API

import requests
import pandas as pd
from IPython.display import display

# API request setup
url = "https://api.apilayer.com/bad_words?censor_character=censor_character"
review = "This product is absolute garbage! The quality is shit and the support team is useless as fuck. Total scam!"
headers = {"apikey": "GET_YOUR_OWN"}

# Make request
response = requests.post(url, headers=headers, data=review.encode("utf-8"))

# Parse JSON response
if response.status_code == 200:
data = response.json()

# Display Original & Censored Review
print(f"\033[1mOriginal Review:\033[0m {data['content']}") # \033[1m -> For Bold Text on Terminal \033[0m -> Reset formatting (stops bold and returns text to normal).
print(f"\033[1mCensored Review:\033[0m {data['censored_content']}")
print(f"\033[1mTotal Bad Words Found:\033[0m {data['bad_words_total']}\n")

# Convert bad words list to DataFrame
if data["bad_words_total"] > 0:
df = pd.DataFrame(data["bad_words_list"])[["original", "start", "end", "word"]]
df.columns = ["Bad Word", "Start Position", "End Position", "Detected Word"]

# Fix the warning by applying styles safely
styled_df = df.style.set_properties(
subset=['Bad Word'], **{'background-color': 'red', 'color': 'white', 'font-weight': 'bold'}
)
display(styled_df) # Show styled DataFrame
else:
print("\033[92mNo bad words detected.\033[0m") # Green text for clean reviews
else:
print(f"\033[91mAPI request failed with status code {response.status_code}\033[0m") # Red error message
Bad Words API Script Run Output

Some use-cases

10. Resume Parser API

import requests
import json

# API Endpoint
resume_link = "https://assets.apilayer.com/apis/codes/resume_parser/sample_resume.docx"
url = f"https://api.apilayer.com/resume_parser/url?url={resume_link}"

headers = {"apikey": "GET_YOUR_OWN"}
response = requests.get(url, headers=headers)

if response.status_code == 200:
data = response.json() # Convert response to JSON
skills = data.get("skills", []) # Extract skills list
print("Extracted Skills:", skills)
else:
print(f"❌ API request failed with status code {response.status_code}")
Python list with all the skills of candiate which can be compared with JR required skillset — Resume Parser API

Some use-cases

--

--

The Pythoneers
The Pythoneers

Published in The Pythoneers

Your home for innovative tech stories about Python and its limitless possibilities. Discover, learn, and get inspired.

Abhay Parashar
Abhay Parashar

Written by Abhay Parashar

Guarding Systems by Day 👨‍💻, Crafting Stories by Night ✍🏼, Weaving Code by Starlight 🤖

Responses (24)