def METHOD_NAME(self) -> Set[str]:
    """Retrieves accessions from API search endpoint."""
    @retry(**self.retry_params)
    def get_response(url, **kwargs):
        """Gets response from an API endpoint."""
        return requests.get(url, **kwargs)
    accessions = set()
    is_done = False
    params = self.build_query()
    while not is_done:
        range_start = (params["page"] - 1) * params["pageSize"] + 1
        range_end = (params["page"] - 1) * params["pageSize"] + self.DATA_CHUNK_SIZE
        logger.debug(f"Processing entries {range_start} - {range_end}")
        response = get_response(self.DATA_URL, params=params)
        entries = response.json().get("hits", ())
        if entries:
            entries = (
                GatheredAccession.create_from_external_entry(
                    entry, self.SOURCE, self.TECHNOLOGY, organism=self.organism
                )
                for entry in entries
            )
            params["page"] += 1
        else:
            is_done = True
        if self.previous_accessions:
            entries = (
                entry
                for entry in entries
                if entry.accession_code not in self.previous_accessions
            )
        accessions.update(entries)
        # Quit after getting a sufficient amount of accessions.
        if self.count and len(accessions) >= self.count:
            is_done = True
    return accessions