code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.Charge.search(
    query="amount>999 AND metadata['order_id']:'6735'",
  )
  '''Response {
    "object": "search_result",
    "url": "/v1/charges/search",
    "has_more": false,
    "data": [
      {
        "id": "ch_3LSdsa2eZvKYlo2C1pk5D2K6",
        "object": "charge",
        "amount": 1000,
        "amount_captured": 0,
        "amount_refunded": 0,
        "application": null,
        "application_fee": null,
        "application_fee_amount": null,
        "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl",
        "billing_details": {
          "address": {
            "city": null,
            "country": null,
            "line1": null,
            "line2": null,
            "postal_code": null,
            "state": null
          },
          "email": null,
          "name": null,
          "phone": null
        },
        "calculated_statement_descriptor": null,
        "captured": false,
        "created": 1659518920,
        "currency": "usd",
        "customer": null,
        "description": "My First Test Charge (created for API docs)",
        "disputed": false,
        "failure_balance_transaction": null,
        "failure_code": null,
        "failure_message": null,
        "fraud_details": {},
        "invoice": null,
        "livemode": false,
        "metadata": {
          "order_id": "6735"
        },
        "on_behalf_of": null,
        "outcome": null,
        "paid": true,
        "payment_intent": null,
        "payment_method": "card_1LSdsU2eZvKYlo2C1BKhCSWF",
        "payment_method_details": {
          "card": {
            "brand": "visa",
            "checks": {
              "address_line1_check": null,
              "address_postal_code_check": null,
              "cvc_check": "pass"
            },
            "country": "US",
            "exp_month": 8,
            "exp_year": 2023,
            "fingerprint": "Xt5EWLLDS7FJjR1c",
            "funding": "credit",
            "installments": null,
            "last4": "4242",
            "mandate": null,
            "moto": null,
            "network": "visa",
            "three_d_secure": null,
            "wallet": null
          },
          "type": "card"
        },
        "receipt_email": null,
        "receipt_number": null,
        "receipt_url": "https://pay.stripe.com/receipts/acct_1032D82eZvKYlo2C/ch_3LSdsa2eZvKYlo2C1pk5D2K6/rcpt_MAzsX8H9XHu2XoHLHOqQ1d3gDS78hzU",
        "redaction": null,
        "refunded": false,
        "refunds": {
          "object": "list",
          "data": [],
          "has_more": false,
          "url": "/v1/charges/ch_3LSdsa2eZvKYlo2C1pk5D2K6/refunds"
        },
        "review": null,
        "shipping": null,
        "source_transfer": null,
        "statement_descriptor": null,
        "statement_descriptor_suffix": null,
        "status": "succeeded",
        "transfer_data": null,
        "transfer_group": null
      },
      {...},
      {...}
    ]
  }'''
nl: Search chargesSearch for charges you’ve previously created using Stripe’s Search Query Language.
  Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating
  conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
  to an hour behind during outages. Search functionality is not available to merchants in India.Parameters query required The search query string. See search query language and the list of supported query fields for charges. limit optional A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. page optional A cursor for pagination across multiple pages of results. Don’t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.ReturnsA dictionary with a data property that contains an array of up to limit charges. If no objects match the
  query, the resulting array will be empty. See the related guide on expanding properties in lists