Python Flask how to get parameters from a URL

In Flask, How do I extract parameters from a URL? How can I extract named parameters from a URL using flask and python?

When the user accesses this URL running on my flask app, I want the web service to be able to handle the parameters specified after the question mark:

Use request.args to get parsed contents of query string:

API URL will be as
from flask import request

@app.route('/your-path', methods=['GET'])
def login():
    url_domain = request.args.get('url')


Leave a Reply

Your email address will not be published. Required fields are marked *