Query to pull just US coins from API

Pubblicazioni di 5 • visto 101 volte

I'm new to the forum and looking to pull some data into my inventory. I've used REST APIs before so I'm not new to them and can get the queries to work. However, I can't seem to find the right query to just pull the standard US minted coin types. I can see the issuer codes:

 

united-states - United States

etats-unis - United States

united-states-pre-federal - United States (pre-federal and private/territorial)

us_military_bases - United States military bases

usa_pacific_territories - United States Pacific territories

antilles_danoises - United States Virgin Islands

us_virgin_islands_period - United States Virgin Islands (1917-date)

It looks like the I should just be able to use “q=test&category=coin&issuer=united-states” however that only brings up entries for “etats-unis” issuer code. I tried looking at the rulers but there didn't seem to be one for the “united-states” code (only “etats-unis” and “united-states-pre-federal”). I imagine that this is a common query and I'm just missing something. Does anyone have a query example that brings up the US minted coin types? Thanks!

I thought this would be an easy one but perhaps not many are using the API.

Hello,

 

I'm not sure I understand the problem correctly.

 

The issuer code “united-states” stands for the whole section, including all the other issuer codes you mentioned (and a few more). You can see the structure of the list of issuers at https://en.numista.com/catalogue/pays.php (the codes are in the URL of the links).

 

Making a query such as “q=test&category=coin&issuer=united-states” may also return coins from other issuers under “united-states” than “etats-unis”, provided that they match the query “test”. 

You may test with “q=Kamehameha&category=coin&issuer=united-states” instead, which returns a coin from Puerto Rico.

Hello,

 

I think that I misunderstood the parameters. Is q (or query) essentially just a string search for all records for whatever issuer / ruler you have specified? If so, only 3 of the 41 records returned had the text “test” in it so not sure why it is returning the rest.

 

Basically though, I'm just looking to return all types of standard circulation US coins, not really wanting to find specific ones. In the docs, it says, “At least one of the following parameters should be provided: q, issuer, catalogue, date, or year”. I haven't been able to figure out what issuer only gets me the coin types from the page I linked. If q is just a string search, then none of the other parameters appear to be the right ones for what I am looking for. Is there an issuer or a combination of issuer and other field(s) that would get me that? I tried a number of my guesses but none of them seemed to do that.

 

Thanks!

With the query “q=test&category=coin&issuer=united-states”, I get 9 results, all having the word “test” on their page.
See the API reply

It is equivalent to the following search query on the website, which also returns 9 reuslts: https://en.numista.com/catalogue/index.php?e=united-states&r=test&st=147&cat=y

 

It is currently not possible to search by object type with the API. So you can't filter for “standard circulation coins” only. The idea is currently tracked at https://en.numista.com/forum/topic155565.html

» Politica del Forum

Il fuso orario utilizzato è UTC+2:00.
L'ora attuale è 06:44.