Thanks, Andrew,
Apologies, the data being searched is 100% in databases all mapped by models - I like a challenge but reinventing the wheel is something else!
It’s the query values that don’t go near the DB and its the code to process those values, defining/creating objects for each and calling APIs that my question hinges on.
for example;
user inputs [1] 0121 876 5437, [2] 07967 456321 and [3] 356084096345678 along with some metadata about the search, all handled via a django form
the custom code strips whitespace out and runs regex to identify [1] as a UK landline, [2] as a mobile phone and [3] as an IMEI
searches are made on the django managed databases relevant for [1,2 & 3]
custom code runs on [1] to i) extract area code portion of number ii) perform Google search API call
and on [3] to make API call on IMEI manufacturer database API
the results of the database search and custom code gets fed back to the user via a view
Hope that explains better
thanks