Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API request for all people in SKBL #22

Closed
salgo60 opened this issue Aug 21, 2020 · 3 comments
Closed

API request for all people in SKBL #22

salgo60 opened this issue Aug 21, 2020 · 3 comments
Labels
question Further information is requested

Comments

@salgo60
Copy link

salgo60 commented Aug 21, 2020

I try to get WIkidata in synch with SKBL and need to get an API call that returns all person articles

I use: this url

but I am not sure I get all the people

See my try in a Jupyter Notebook

Regards
Magnus Sälgö
0705937579
salgo60@msn.com
twitter: salgo60

@salgo60
Copy link
Author

salgo60 commented Sep 16, 2020

In this notebook I haver a query getting all people.... in SKBL

In another Notebook I compare SKBL and SBL but needs published date how do I write a query getting all SKBL women with fields

  • ** publishedDate**
  • the name of the author
    -- article_author_lastname
    -- article_author_firstname
    Right now I loop all records and retrieved the data which --> 1600 calls instead of 1

Regards
Magnus Sälgö
0705937579
salgo60@msn.com

@kod-kristoff
Copy link
Member

kod-kristoff commented Sep 17, 2020

Hi!

To get all women from the backend use this call (without aliases):
https://ws.spraakbanken.gu.se/ws/karp/v5/query?mode=skbl&q=extended||and|skblstatus|equals|ok&size=10000

You will get a JSON-object back that has the following structure:

{
  "hits": {
    "hits": [ length = min( size in query, matching number of documents )
      {
        "_source": { actual entry
           "article_author": [
              { "firstname": "X", "lastname": "Y" },
              ...
           ],
           ...
            "publication_date": "YYYY-MM-DD",
           ...
        }
      },
      ...
    ],
    "total": number telling you the number of matching documents for this query (may be larger than the length of hits.hits
}

I hopes this helps, please ask more if anything is unclear!

@kod-kristoff kod-kristoff added the question Further information is requested label Sep 17, 2020
@salgo60 salgo60 closed this as completed Sep 17, 2020
@salgo60
Copy link
Author

salgo60 commented Sep 17, 2020

Tackar det blev mycket bättre

  • 19 sekunder vs. 290 sekunder
  • 1 anrop vs. 1600

Vi funderar på att koppla ihop oss med JobTechs taxonomi så jag gjorde en video idag där jag förklarar hur Wikidata funkar hör gärna v er om ni har frågor

Nu passerar SKBL 1500 artiklar om min snurra funkar

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants