How to integrate Yelp API

I’m trying to figure out how to add data from an external site to a basic wordpress site I’ve created. I’m generally comfortable with basic wordpress setup and features, but now I’m trying to understand how to use API’s and I’m not sure where to start.

I’ve created an account with Yelp and have an API key, but I’m stuck on what to do next.

Any guidance for an “API beginner” would be much appreciated.

1 Answer
1

Working with any API is distinctly different and custom, however in a nutshell there are two components two implement and WP APIs that go with them:

  1. Request data from API. Since most modern web APIs are REST this is basically making HTTP request. In WordPress network requests are performed with HTTP API.

  2. Store data. This is much more varied and heavily depends on specifics ofAPI and data it provides. Common storage options are Custom Post Types and Transients, with more elaborate options (such as creating additional database tables) available.

Leave a Comment