Skip to content

Document the inexactness of --limit when searching #647

Open

Description

@dolsysmith

Running the following command yields 599 Tweets, not 500:

twarc2 search --limit 500 "blacklivesmatter" results.jsonl

Is that expected behavior? (Just wanting to confirm.)

Activity

  1. edsu commented on Jul 12, 2022

    @edsu
    Member

    That is the expected behavior yes. It could be documented better though :-)

  2. changed the title [-]Inexact behavior with the --limit option[/-] [+]Document the inexactness of --limit when searching[/+] on Jul 12, 2022
  3. igorbrigadir commented on Jul 12, 2022

    @igorbrigadir
    Contributor

    Yeah it's because the limit is counted after retrieval, so it pages through results, which by default are 100 max, but can get fewer from the API, so you can get: 99, 100, 100, 100, 100, and then because you're still on 499, which is less than 500, it will have to make 1 extra call and get another 100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions