Is there a good PHP API Importer?

Hi there,

I need to import data from various Web-APIs with different Output-Formats to a MySQL-Database (XML, JSON, CSV).

Before I start writing my own PHP-Scripts to do that, I rather ask, if there’s a flexible PHP-Importer Class out there and if you know about something like that?

The task is always the same: Fetch the API-Output via GET, parse the Result and store it in a MySQL-DB.

Yes, this is not very complicated to do, but if there’s a good API Importer out there … why spend several hours to rebuild it from scratch?

Thanks in advance and cheers, Christian

Drupal has an excellent migrate class that does exactly this, but it’s designed for importing data into a drupal project. That said, if your project is still in its infancy, that’s a powerful reason to consider drupal as the CMS system to build it on. Even if this isn’t the case, a study of the code of Migrate should prove useful.


Migrate is a very powerful API and things only get better in D8 because it is in core. Though if you’re not proficient with PHP and OO programming you will have to learn those things to use migrate since it is really only an API. Not to mention the Drupal ecosystem itself is very rich in core and contributed functionality. Not to brag or anything but I used migrate exclusively transitioning the D6 NBA teamsites to D7. Though I had to write some custom classes to handle fields that don’t support migrate out of the box it is very powerful and a nice tool to have. Though not really for the faint hearted depending on the complexity of the data model that needs to be migrated. Not to mention migrate does a very good job at error handling and logging specific errors so they are easier to troubleshoot.