{"id":177,"date":"2024-11-11T07:03:54","date_gmt":"2024-11-11T06:03:54","guid":{"rendered":"https:\/\/www.systemdeveloper.nl\/tech\/?p=177"},"modified":"2024-11-16T10:52:39","modified_gmt":"2024-11-16T09:52:39","slug":"setting-up-mongodb-with-python-for-data-import-and-api-access","status":"publish","type":"post","link":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/","title":{"rendered":"Setting Up MongoDB with Python for Data Import and API Access"},"content":{"rendered":"<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">MongoDB offers a flexible, scalable way to store complex datasets, and it pairs well with Python for quick data import and API development. In this guide, we&rsquo;ll walk through setting up MongoDB, creating a Python script to fetch and store data, building a simple API, and then using PHP to access the data. This setup is particularly useful for dynamic applications that require fast data retrieval and regular updates.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-install-and-configure-mongodb\">Step 1: Install and Configure MongoDB<\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Install MongoDB<\/strong> (on Ubuntu as an example):<\/p>\n\n\n<ol class=\"wp-block-list wp-block-list\">\n<li>\n<\/ol>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>sudo apt update\nsudo apt install -y mongodb<\/textarea>\n<\/div><code>sudo apt update\nsudo apt install -y mongodb<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Start and Enable MongoDB<\/strong>:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>sudo systemctl start mongodb\nsudo systemctl enable mongodb<\/textarea>\n<\/div><code>sudo systemctl start mongodb\nsudo systemctl enable mongodb<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Verify Installation<\/strong>: Connect to MongoDB and check the status<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>mongo --eval 'db.runCommand({ connectionStatus: 1 })'<\/textarea>\n<\/div><code>mongo --eval 'db.runCommand({ connectionStatus: 1 })'<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-create-a-simple-python-script-to-import-data\">Step 2: Create a Simple Python Script to Import Data<\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">We&rsquo;ll create a small Python script that retrieves data from an example JSON API and inserts it into MongoDB. Here&rsquo;s a simple example with sample data.<\/p>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Install Required Libraries<\/strong>:<\/p>\n\n\n<ol class=\"wp-block-list wp-block-list\">\n<li>\n<\/ol>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>pip install requests pymongo<\/textarea>\n<\/div><code>pip install requests pymongo<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">Python Script to Fetch and Store Data<br><br>Create a file called <code>data_import.py<\/code> and add the following code:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>import requests\nfrom pymongo import MongoClient\n\n# Connect to MongoDB\nclient = MongoClient('mongodb:\/\/localhost:27017\/')\ndb = client['sports_data']  # Database name\ncollection = db['players']  # Collection name\n\n# Fetch data from an external example JSON API\nurl = 'https:\/\/api.example.com\/players'\nresponse = requests.get(url)\ndata = response.json()\n\n# Update or insert data\nfor player in data:\n    collection.update_one(\n        {'player_id': player['player_id']},\n        {'$set': player},\n        upsert=True  # Insert the document if it doesn't exist\n    )\n\nprint(\"Data imported successfully.\")<\/textarea>\n<\/div><code>import requests\nfrom pymongo import MongoClient\n\n# Connect to MongoDB\nclient = MongoClient('mongodb:\/\/localhost:27017\/')\ndb = client['sports_data']  # Database name\ncollection = db['players']  # Collection name\n\n# Fetch data from an external example JSON API\nurl = 'https:\/\/api.example.com\/players'\nresponse = requests.get(url)\ndata = response.json()\n\n# Update or insert data\nfor player in data:\n    collection.update_one(\n        {'player_id': player['player_id']},\n        {'$set': player},\n        upsert=True  # Insert the document if it doesn't exist\n    )\n\nprint(\"Data imported successfully.\")<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Run the Script<\/strong>:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>python data_import.py<\/textarea>\n<\/div><code>python data_import.py<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">This script connects to MongoDB, retrieves data from an API, and upserts each document (inserts if it doesn&rsquo;t exist, updates if it does).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-build-a-python-api-with-flask\">Step 3: Build a Python API with Flask<\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">Next, we&rsquo;ll create a simple Flask API to make our MongoDB data accessible. This API will serve as the middle layer between MongoDB and other applications, like PHP.<\/p>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Install Flask<\/strong>:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>pip install flask<\/textarea>\n<\/div><code>pip install flask<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Create the Flask API<\/strong>:<\/p>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">Create a file called <code>app.py<\/code> and add the following code:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>from flask import Flask, jsonify, request\nfrom pymongo import MongoClient\n\napp = Flask(__name__)\n\n# MongoDB connection\nclient = MongoClient('mongodb:\/\/localhost:27017\/')\ndb = client['sports_data']\ncollection = db['players']\n\n# Endpoint to retrieve players\n@app.route('\/players', methods=['GET'])\ndef get_players():\n    players = list(collection.find({}, {'_id': 0}))  # Exclude MongoDB's _id field\n    return jsonify(players)\n\n# Run the Flask app\nif __name__ == '__main__':\n    app.run(debug=True, port=5000)<\/textarea>\n<\/div><code>from flask import Flask, jsonify, request\nfrom pymongo import MongoClient\n\napp = Flask(__name__)\n\n# MongoDB connection\nclient = MongoClient('mongodb:\/\/localhost:27017\/')\ndb = client['sports_data']\ncollection = db['players']\n\n# Endpoint to retrieve players\n@app.route('\/players', methods=['GET'])\ndef get_players():\n    players = list(collection.find(Array, {'_id': 0}))  # Exclude MongoDB's _id field\n    return jsonify(players)\n\n# Run the Flask app\nif __name__ == '__main__':\n    app.run(debug=True, port=5000)\n<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Run the Flask API<\/strong>:<\/p>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea>python app.py<\/textarea>\n<\/div><code>python app.py<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">This API will be accessible at <code>http:\/\/localhost:5000\/players<\/code>, returning a JSON list of all players in the database.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-access-the-python-api-with-php\">Step 4: Access the Python API with PHP<\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">Finally, we&rsquo;ll create a PHP script to fetch data from the Python API. This allows us to use the API in a PHP application and integrate MongoDB data seamlessly.<\/p>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Create the PHP Script<\/strong>:Create a PHP file called <code>get_players.php<\/code> and add the following code:<\/p>\n\n\n<ol class=\"wp-block-list wp-block-list\">\n<li>\n<\/ol>\n\n\n<pre class=\"wp-block-code\"><div class=\"copy-to-clipboard\">\n<span>Copied!<\/span><button class=\"click-to-copy-button\" title=\"Copy to clipboard\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\" stroke=\"currentcolor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" width=\"24\" height=\"24\" fill=\"none\">\n  <path d=\"M12.9975 10.7499L11.7475 10.7499C10.6429 10.7499 9.74747 11.6453 9.74747 12.7499L9.74747 21.2499C9.74747 22.3544 10.6429 23.2499 11.7475 23.2499L20.2475 23.2499C21.352 23.2499 22.2475 22.3544 22.2475 21.2499L22.2475 12.7499C22.2475 11.6453 21.352 10.7499 20.2475 10.7499L18.9975 10.7499Z\"><\/path>\n  <path d=\"M17.9975 12.2499L13.9975 12.2499C13.4452 12.2499 12.9975 11.8022 12.9975 11.2499L12.9975 9.74988C12.9975 9.19759 13.4452 8.74988 13.9975 8.74988L17.9975 8.74988C18.5498 8.74988 18.9975 9.19759 18.9975 9.74988L18.9975 11.2499C18.9975 11.8022 18.5498 12.2499 17.9975 12.2499Z\"><\/path>\n  <path d=\"M13.7475 16.2499L18.2475 16.2499\"><\/path>\n  <path d=\"M13.7475 19.2499L18.2475 19.2499\"><\/path>\n<\/svg><\/button><textarea><?php \/\/ Set the API URL\n$url = 'http:\/\/localhost:5000\/players';\n\n\/\/ Initialize cURL session\n$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, $url);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\/\/ Execute the cURL request and decode the JSON response\n$response = curl_exec($ch);\ncurl_close($ch);\n\n\/\/ Convert JSON response to PHP array\n$players = json_decode($response, true);\n\n\/\/ Display the players\nforeach ($players as $player) {\n    echo \"Player ID: \" . $player['player_id'] . \"<br>\";\n    echo \"Name: \" . $player['name'] . \"<br>\";\n    echo \"Team: \" . $player['team'] . \"<br><br>\";\n}\n?&gt;<\/textarea>\n<\/div><code>&lt;?php\n\/\/ Set the API URL\n$url = 'http:\/\/localhost:5000\/players';\n\n\/\/ Initialize cURL session\n$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, $url);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\/\/ Execute the cURL request and decode the JSON response\n$response = curl_exec($ch);\ncurl_close($ch);\n\n\/\/ Convert JSON response to PHP array\n$players = json_decode($response, true);\n\n\/\/ Display the players\nforeach ($players as $player) {\n    echo \"Player ID: \" . $player['player_id'] . \"&lt;br&gt;\";\n    echo \"Name: \" . $player['name'] . \"&lt;br&gt;\";\n    echo \"Team: \" . $player['team'] . \"&lt;br&gt;&lt;br&gt;\";\n}\n?&gt;<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\"><strong>Run the PHP Script<\/strong>: Host this PHP file on a local server (e.g., with XAMPP, WAMP, or using <code>php -S localhost:8000<\/code>) and access it via <code>http:\/\/localhost\/get_players.php<\/code>. This script fetches the JSON data from the Python API and displays it.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<h3 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h3>\n\n\n<p class=\"wp-block-paragraph wp-block-paragraph\" style=\"\">With this setup, you now have a full pipeline from MongoDB to Python and PHP. Data can be imported into MongoDB, accessed through a Python API, and used in PHP applications. This setup is versatile and can be scaled or customized for different use cases, making it a great foundation for dynamic data-driven applications.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MongoDB offers a flexible, scalable way to store complex datasets, and it pairs well with Python for quick data import and API development. In this guide, we&rsquo;ll walk through setting up MongoDB, creating a Python script to fetch and store data, building a simple API, and then using PHP to access the data. This setup &hellip;<\/p>\n","protected":false},"author":1,"featured_media":178,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46,12,16],"tags":[15,13],"class_list":["post-177","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howto","category-mongodb","category-tech-innovation","tag-api","tag-mongodb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Setting Up MongoDB with Python for Data Import and API Access - SystemDeveloper.NL<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setting Up MongoDB with Python for Data Import and API Access - SystemDeveloper.NL\" \/>\n<meta property=\"og:description\" content=\"MongoDB offers a flexible, scalable way to store complex datasets, and it pairs well with Python for quick data import and API development. In this guide, we&rsquo;ll walk through setting up MongoDB, creating a Python script to fetch and store data, building a simple API, and then using PHP to access the data. This setup &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/\" \/>\n<meta property=\"og:site_name\" content=\"SystemDeveloper.NL\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/quan.tora.16\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-11T06:03:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-16T09:52:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/5e7ab0e5-5fd8-4292-a009-6e58d56b94f2-e1731400771532.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"564\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"John Timmer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Timmer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/\"},\"author\":{\"name\":\"John Timmer\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#\\\/schema\\\/person\\\/5760c2ed5300c56d8ef01dfb00a9763b\"},\"headline\":\"Setting Up MongoDB with Python for Data Import and API Access\",\"datePublished\":\"2024-11-11T06:03:54+00:00\",\"dateModified\":\"2024-11-16T09:52:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/\"},\"wordCount\":402,\"publisher\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/5e7ab0e5-5fd8-4292-a009-6e58d56b94f2-e1731400771532.webp\",\"keywords\":[\"API\",\"MongoDB\"],\"articleSection\":[\"Howto\",\"MongoDB\",\"Tech Innovation\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/\",\"name\":\"Setting Up MongoDB with Python for Data Import and API Access - SystemDeveloper.NL\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/5e7ab0e5-5fd8-4292-a009-6e58d56b94f2-e1731400771532.webp\",\"datePublished\":\"2024-11-11T06:03:54+00:00\",\"dateModified\":\"2024-11-16T09:52:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/5e7ab0e5-5fd8-4292-a009-6e58d56b94f2-e1731400771532.webp\",\"contentUrl\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/5e7ab0e5-5fd8-4292-a009-6e58d56b94f2-e1731400771532.webp\",\"width\":1024,\"height\":564},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/setting-up-mongodb-with-python-for-data-import-and-api-access\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting Up MongoDB with Python for Data Import and API Access\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#website\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/\",\"name\":\"www.systemdeveloper.nl\",\"description\":\"NextGen IT\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#organization\",\"name\":\"www.systemdeveloper.nl\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/qt-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/qt-logo.png\",\"width\":1346,\"height\":1230,\"caption\":\"www.systemdeveloper.nl\"},\"image\":{\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/quan.tora.16\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/#\\\/schema\\\/person\\\/5760c2ed5300c56d8ef01dfb00a9763b\",\"name\":\"John Timmer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg\",\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg\",\"caption\":\"John Timmer\"},\"sameAs\":[\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\"],\"url\":\"https:\\\/\\\/www.systemdeveloper.nl\\\/tech\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setting Up MongoDB with Python for Data Import and API Access - SystemDeveloper.NL","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/","og_locale":"en_US","og_type":"article","og_title":"Setting Up MongoDB with Python for Data Import and API Access - SystemDeveloper.NL","og_description":"MongoDB offers a flexible, scalable way to store complex datasets, and it pairs well with Python for quick data import and API development. In this guide, we&rsquo;ll walk through setting up MongoDB, creating a Python script to fetch and store data, building a simple API, and then using PHP to access the data. This setup &hellip;","og_url":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/","og_site_name":"SystemDeveloper.NL","article_publisher":"https:\/\/www.facebook.com\/quan.tora.16","article_published_time":"2024-11-11T06:03:54+00:00","article_modified_time":"2024-11-16T09:52:39+00:00","og_image":[{"width":1024,"height":564,"url":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/5e7ab0e5-5fd8-4292-a009-6e58d56b94f2-e1731400771532.webp","type":"image\/webp"}],"author":"John Timmer","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Timmer","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/#article","isPartOf":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/"},"author":{"name":"John Timmer","@id":"https:\/\/www.systemdeveloper.nl\/tech\/#\/schema\/person\/5760c2ed5300c56d8ef01dfb00a9763b"},"headline":"Setting Up MongoDB with Python for Data Import and API Access","datePublished":"2024-11-11T06:03:54+00:00","dateModified":"2024-11-16T09:52:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/"},"wordCount":402,"publisher":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/#organization"},"image":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/5e7ab0e5-5fd8-4292-a009-6e58d56b94f2-e1731400771532.webp","keywords":["API","MongoDB"],"articleSection":["Howto","MongoDB","Tech Innovation"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/","url":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/","name":"Setting Up MongoDB with Python for Data Import and API Access - SystemDeveloper.NL","isPartOf":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/#primaryimage"},"image":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/5e7ab0e5-5fd8-4292-a009-6e58d56b94f2-e1731400771532.webp","datePublished":"2024-11-11T06:03:54+00:00","dateModified":"2024-11-16T09:52:39+00:00","breadcrumb":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/#primaryimage","url":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/5e7ab0e5-5fd8-4292-a009-6e58d56b94f2-e1731400771532.webp","contentUrl":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/5e7ab0e5-5fd8-4292-a009-6e58d56b94f2-e1731400771532.webp","width":1024,"height":564},{"@type":"BreadcrumbList","@id":"https:\/\/www.systemdeveloper.nl\/tech\/setting-up-mongodb-with-python-for-data-import-and-api-access\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.systemdeveloper.nl\/tech\/"},{"@type":"ListItem","position":2,"name":"Setting Up MongoDB with Python for Data Import and API Access"}]},{"@type":"WebSite","@id":"https:\/\/www.systemdeveloper.nl\/tech\/#website","url":"https:\/\/www.systemdeveloper.nl\/tech\/","name":"www.systemdeveloper.nl","description":"NextGen IT","publisher":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.systemdeveloper.nl\/tech\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/www.systemdeveloper.nl\/tech\/#organization","name":"www.systemdeveloper.nl","url":"https:\/\/www.systemdeveloper.nl\/tech\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.systemdeveloper.nl\/tech\/#\/schema\/logo\/image\/","url":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/qt-logo.png","contentUrl":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/qt-logo.png","width":1346,"height":1230,"caption":"www.systemdeveloper.nl"},"image":{"@id":"https:\/\/www.systemdeveloper.nl\/tech\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/quan.tora.16"]},{"@type":"Person","@id":"https:\/\/www.systemdeveloper.nl\/tech\/#\/schema\/person\/5760c2ed5300c56d8ef01dfb00a9763b","name":"John Timmer","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg","url":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg","contentUrl":"https:\/\/www.systemdeveloper.nl\/tech\/wp-content\/uploads\/2024\/11\/cropped-D6E27035-6864-4270-8D72-0D8C0C59F370-96x96.jpeg","caption":"John Timmer"},"sameAs":["https:\/\/www.systemdeveloper.nl\/tech"],"url":"https:\/\/www.systemdeveloper.nl\/tech\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/posts\/177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/comments?post=177"}],"version-history":[{"count":3,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":311,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/posts\/177\/revisions\/311"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/media\/178"}],"wp:attachment":[{"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/media?parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/categories?post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.systemdeveloper.nl\/tech\/wp-json\/wp\/v2\/tags?post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}