DEV Community

Vishal Yadav
Vishal Yadav

Posted on

Public APIs for Web Development Projects

When it comes to web development, APIs (Application Programming Interfaces) are indispensable tools. They allow developers to interact with external services and data sources, enriching their applications with dynamic content and functionality. In this blog, we’ll explore some popular public APIs that you can use for various web development projects. These APIs are free to use, and they provide a wide range of functionalities, from fetching weather data to retrieving information about space missions.

1. JSONPlaceholder

JSONPlaceholder is a fake online REST API that is perfect for testing and prototyping your applications. It provides endpoints for typical CRUD (Create, Read, Update, Delete) operations.

Example Endpoint:

https://jsonplaceholder.typicode.com/posts
Enter fullscreen mode Exit fullscreen mode

You can use this endpoint to simulate fetching a list of posts, creating new posts, updating existing posts, and deleting posts.

2. The Dog API

The Dog API provides a delightful collection of dog pictures. It’s a fun way to integrate random dog images into your projects, whether for placeholders, backgrounds, or just to make your users smile.

Example Endpoint:

https://api.thedogapi.com/v1/images/search
Enter fullscreen mode Exit fullscreen mode

This endpoint returns a random dog image, perfect for adding a bit of canine charm to your web applications.

3. REST Countries

REST Countries API provides detailed information about countries, such as their names, populations, and areas. This is particularly useful for projects involving geography, travel, or education.

Example Endpoint:

https://restcountries.com/v3.1/all
Enter fullscreen mode Exit fullscreen mode

You can use this endpoint to fetch data about all countries, making it easy to display information like country names, capitals, and demographics.

4. SpaceX API

The SpaceX API offers data about SpaceX launches, rockets, and missions. This API is perfect for space enthusiasts and educational projects related to space exploration.

Example Endpoint:

https://api.spacexdata.com/v4/launches/latest
Enter fullscreen mode Exit fullscreen mode

This endpoint provides details about the latest SpaceX launch, including mission name, launch date, and rocket specifications.

5. OpenWeatherMap

OpenWeatherMap provides comprehensive weather data, including current conditions, forecasts, and historical weather data. It’s ideal for any project that needs to display weather information.

Example Endpoint:

https://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_API_KEY
Enter fullscreen mode Exit fullscreen mode

Replace YOUR_API_KEY with your actual API key. This endpoint fetches the current weather for London, including temperature, humidity, and weather conditions.

6. CoinGecko API

The CoinGecko API offers cryptocurrency data, including prices and market capitalization. This is useful for financial applications and dashboards that need to display cryptocurrency information.

Example Endpoint:

https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd
Enter fullscreen mode Exit fullscreen mode

This endpoint retrieves the current price of Bitcoin in USD.

7. JokeAPI

JokeAPI provides random jokes, including programming jokes. It’s great for adding a touch of humor to your application.

Example Endpoint:

https://v2.jokeapi.dev/joke/Any?type=single
Enter fullscreen mode Exit fullscreen mode

This endpoint returns a random joke, perfect for lightening up your web pages.

8. BoredAPI

BoredAPI suggests random activities to do when you’re bored. This can be a fun addition to applications aimed at entertainment or productivity.

Example Endpoint:

https://www.boredapi.com/api/activity
Enter fullscreen mode Exit fullscreen mode

This endpoint returns a random activity suggestion, helping users find something interesting to do.

9. NewsAPI

NewsAPI provides access to a large database of news articles from various sources. It’s ideal for news aggregation applications or any project that needs to display current events.

Example Endpoint:

https://newsapi.org/v2/top-headlines?country=us&apiKey=YOUR_API_KEY
Enter fullscreen mode Exit fullscreen mode

Replace YOUR_API_KEY with your actual API key. This endpoint fetches the top headlines from the United States.

Conclusion

Public APIs are powerful tools that can significantly enhance your web development projects. They allow you to integrate diverse functionalities and data sources, making your applications more dynamic and engaging. The APIs listed above are just a few examples of what’s available. Explore these APIs, incorporate them into your projects, and see how they can transform your development experience.

Top comments (40)

Collapse
 
skorphil profile image
Philipp Rich

A 'bit' more choices - github.com/public-api-lists/public...

Collapse
 
vyan profile image
Vishal Yadav

Nice Share.

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
vyan profile image
Vishal Yadav

in which field for sports, finance or anything else?

Collapse
 
rahul7007 profile image
Rahul Sarma

Can we get cricket match real-time data API ?

Thread Thread
 
vyan profile image
Vishal Yadav

cricketdata.org/ you can get from here!

Thread Thread
 
rahul7007 profile image
Rahul Sarma • Edited

I checked it earlier, but it's not 100% free

Collapse
 
thisisdeveloper profile image
Baivab Sarkar

Great post! 😊 For those interested in seeing a practical implementation, check out this website 👉 randomapi.pages.dev 🌐. It showcases how to integrate different public APIs into a single site. 🚀

randomapi.pages.dev/

Collapse
 
vyan profile image
Vishal Yadav

Thanks!

Collapse
 
kiraaziz profile image
kiraaziz

I made an api to get manga data even with photos so you can build for manga app mangahook-api.vercel.app/

Collapse
 
vyan profile image
Vishal Yadav

Nice!

Collapse
 
peshale_07 profile image
Peshal Nepal

This is really cool. I have been using newsapi for so long now

Collapse
 
monica_brown_45c3d19ca60c profile image
Monica Brown

My husband has been frequently deleting all messages for the last couple of days from his phone and he didn’t know i was peeping at him, then i asked him why he was deleting all messages from his phone but he claimed that his phone memory was full and needed more space. Immediately i went in search of a hacker who can get me deleted information and contents from my husband’s phone and luckily for me i came across this reputable ethical hacker , this hacker got the job done for me and provided me with results and i saw that my husband has been lying to me. He was simply deleting all pictures, call logs, chats and text messages between him and his secret lover so i wont get to see what he has been doing at my back. Thank God for reputable hackers who are ready to help. Tracking cellphones and getting an accurate report has been a bit worrisome, thanks to Rosas Hubbolt service helped me locate certain cellphones without breaking a sweat. His service made me know that the internet has become the most common method of cheating nowadays, either emotionally or physically. Taking a few extra steps in getting what would serve as proof for leaving a toxic relationship, to see who your spouse texts or chats with on social media isn’t a bad idea.I must say am really impressed with the services i got from The hacker Detective and am here to say a very big thank you: contact him on (( Rosashubbolt@gmail.com))or Whatsapp: +13322657779 He told me that he specialize in all kinds of hacking, including.
School grade, hack into any university database,
Hack Facebook account, Email account
Repair Credit score, boost credit card
Hack mobile phone,
Hack Whatsapp
Hack blank ATM card
Hack Facebook account
Hack Twitter account
Hack Instagram account
Erase Criminal record, recover lost data
College web hack.
His email:Rosashubbolt@gmail.com or Whatsapp: +13322657779

Collapse
 
isjasrajchouhan profile image
Jasraj Chouhan

Thanks, Vishal for such a nice post.

Collapse
 
barsie profile image
Sirineo Barila

Amazing!
I didn't know they were so many!
Thanks you for sharing 😌

Collapse
 
kalynux profile image
kalynux

Thanks

Collapse
 
kofiakyea profile image
Kofi Awuette Akyea

Thanks for sharing

Collapse
 
enoch91 profile image
Enoch Osarenren

Hello everyone, I hope you're all doing well. I recently launched an open-source project called GraphQLPlaceholder, and I'd love your support. Please check it out and give it a star on GitHub github.com/enochval/graphql-placeh.... Your support would mean a lot to me and help immensely in the project's growth.

Thank you.

Collapse
 
pelmajidre profile image
pelmajidre • Edited

With our VAT exclusive calculator, managing your business's finances has never been easier. Whether you're a small business owner or a large corporation, accurately calculating VAT can save you time and money. Our tool allows you to effortlessly add VAT to any net amount, ensuring you always know the true cost of goods and services. Additionally, it can remove VAT from gross amounts, giving you a clear picture of your revenue. This flexibility is essential for businesses operating within the UK, where staying compliant with VAT regulations is crucial for smooth operations.

Collapse
 
yurdiramle profile image
yurdiramle • Edited

For those specifically seeking information on the SASSA SRD Status Check, the tool provides a detailed and user-friendly interface to verify their SRD grant application status. This service is essential for applicants needing immediate financial assistance, as it allows them to check their status in real-time and plan accordingly. The SASSA SRD Status Check ensures that applicants are promptly informed of any decisions or requirements, streamlining the application process and improving overall accessibility to social grants.

Collapse
 
yurdiramle profile image
yurdiramle • Edited

Our health data analytics Vancouver services take your fitness tracking to the next level. We use advanced analytics to interpret your test results, providing you with actionable insights and personalized recommendations. This data-driven approach ensures that you are making the best possible decisions for your health and fitness, based on comprehensive and accurate information.

Collapse
 
yurdiramle profile image
yurdiramle

Looking to transform your fitness journey with expert guidance? Hiring a personal trainer in Nashville might be the perfect solution for you. With a certified personal trainer Nashville, you get access to personalized training plans that cater specifically to your fitness goals. Whether you're aiming to build muscle, improve endurance, or simply lead a healthier lifestyle, these professionals are equipped to help you achieve your aspirations through effective and enjoyable workouts.

Collapse
 
pelmajidre profile image
pelmajidre • Edited

One of our standout products is our range of luxury marble coffee tables. These elegant marble tables for living rooms are designed to be the centerpiece of any space, offering both functionality and aesthetic appeal. If you’re looking to buy marble coffee table online, our extensive collection will leave you spoiled for choice. Each table is crafted to perfection, reflecting

Some comments may only be visible to logged-in visitors. Sign in to view all comments. Some comments have been hidden by the post's author - find out more