'Returns a list of results from DBPedia for the given SPARQL query.
- type : SPARQL,
- start: no maximum,
- count: maximum 1000,
There is a limit of 10 requests/second.
Maximum query execution time is 120 seconds.'

def search(self, query, type=SPARQL, start=1, count=10, sort=RELEVANCY, size=None, cached=False, **kwargs):

    if (type not in (SPARQL,)):
        raise SearchEngineTypeError
    if ((not query) or (count < 1) or (start < 1)):
        return Results(DBPEDIA, query, type)
    url = URL(DBPEDIA, method=GET)
    url.query = {'format': 'json', 'query': ('%s    OFFSET    %s    LIMIT    %s' % (query, ((start - 1) * min(count, 1000)), ((start - 0) * min(count, 1000))))}
    try:
        data = URL(url).download(cached=cached, timeout=30, **kwargs)
        data = json.loads(data)
    except HTTP400BadRequest as e:
        raise DBPediaQueryError(e.src.read().splitlines()[0])
    except HTTP403Forbidden:
        raise SearchEngineLimitError
    results = Results(DBPEDIA, url.query, type)
    results.total = None
    for x in data['results']['bindings']:
        r = Result(url=None)
        for k in data['head']['vars']:
            t1 = x[k].get('type', 'literal')
            t2 = x[k].get('datatype', '?')
            v = x[k].get('value')
            v = self.format(v)
            if (t1 == 'uri'):
                v = DBPediaResource(v)
            if t2.endswith('float'):
                v = float(v)
            if t2.endswith('int'):
                v = int(v)
            dict.__setitem__(r, k, v)
        results.append(r)
    return results
