Old OpenAlex API documentation
  • Overview
  • Quickstart tutorial
  • API Entities
    • Entities overview
    • 📄Works
      • Work object
        • Authorship object
        • Location object
      • Get a single work
      • Get lists of works
      • Filter works
      • Search works
      • Group works
      • Get N-grams
    • 👩Authors
      • Author object
      • Get a single author
      • Get lists of authors
      • Filter authors
      • Search authors
      • Group authors
      • Limitations
      • Author disambiguation
    • 📚Sources
      • Source object
      • Get a single source
      • Get lists of sources
      • Filter sources
      • Search sources
      • Group sources
    • 🏫Institutions
      • Institution object
      • Get a single institution
      • Get lists of institutions
      • Filter institutions
      • Search institutions
      • Group institutions
    • 💡Topics
      • Topic object
      • Get a single topic
      • Get lists of topics
      • Filter topics
      • Search topics
      • Group topics
    • 🗝️Keywords
    • 🏢Publishers
      • Publisher object
      • Get a single publisher
      • Get lists of publishers
      • Filter publishers
      • Search publishers
      • Group publishers
    • 💰Funders
      • Funder object
      • Get a single funder
      • Get lists of funders
      • Filter funders
      • Search funders
      • Group funders
    • 🌎Geo
      • Continents
      • Regions
    • 💡Concepts
      • Concept object
      • Get a single concept
      • Get lists of concepts
      • Filter concepts
      • Search concepts
      • Group concepts
    • Aboutness endpoint (/text)
  • How to use the API
    • API Overview
    • Get single entities
      • Random result
      • Select fields
    • Get lists of entities
      • Paging
      • Filter entity lists
      • Search entities
      • Sort entity lists
      • Select fields
      • Sample entity lists
      • Autocomplete entities
    • Get groups of entities
    • Rate limits and authentication
  • Download all data
    • OpenAlex snapshot
    • Snapshot data format
    • Download to your machine
    • Upload to your database
      • Load to a data warehouse
      • Load to a relational database
        • Postgres schema diagram
  • Additional Help
    • Tutorials
    • Report bugs
    • FAQ
Powered by GitBook
On this page
  1. How to use the API
  2. Get lists of entities

Sample entity lists

PreviousSelect fieldsNextAutocomplete entities

Last updated 2 years ago

You can use sample to get a random list of up to 10,000 results.

  • Get 100 random works

  • Get 50 random works that are open access and published in 2021

You can add a seed value in order to retrieve the same set of random records, in the same order, multiple times.

  • Get 20 random sources with a seed value

Depending on your query, random results with a seed value may change over time due to new records coming into OpenAlex.

Limitations

  • The sample size is limited to 10,000 results.

  • You must provide a seed value when paging beyond the first page of results. Without a seed value, you might get duplicate records in your results.

  • You must use when sampling. Cursor pagination is not supported.

https://api.openalex.org/works?sample=100&per-page=100
https://api.openalex.org/works?filter=open_access.is_oa:true,publication_year:2021&sample=50&per-page=50
https://api.openalex.org/sources?sample=20&seed=123
basic paging