@hildogjr, yes it’s NodeJS but if someone is very good at writing Python scrapers and willing to contribute I am sure we could integrate it somehow.

devbisme: devbisme: That would mean writing API interfaces for Digikey, Mouser, Farnell, etc. In effect, Partinfo would become a sort of FOSS Octopart.

I think we have to use a combination of scraping and API access as not all have APIs and others are very hostile to scraping (looking at you Farnell).

devbisme: devbisme: An important question is whether the distributors will let you use their APIs this way, or does it violate some deal they have with Octopart (and others) to restrict mass distribution of data from their websites.

I have only looked at the Farnell API so far. Anyone can register, but it’s severely slow and rate-limited. I haven’t heard of any special deals with Octopart. The Digikey API looks pretty good without having looked at it closely yet. The terms and conditions say

Any use of the API that (…) aggregates, in any way, any Digi-Key Corporation Content with third party content (without distinction) or fails to attribute the Digi-Key Corporation Data appropriately to Digi-Key Corporation is expressly not permitted.

But I think as long as we attribute and keep the data “distinct” we wouldn’t be in violation.

Anyway, I am happy for people working on BOM tools, especially KiCost users and developers, to use (but not abuse) the Partinfo endpoint right now, specifically: https://dev-partinfo.kitspace.org/graphql.

It’s currently an open endpoint so anyone can access it. Docs are a bit thin but you are able to browse the schema using the “Documentation Explorer” on the right on the above URL and you can jump on our chat or the GitHub issue tracker if you have any questions. You don’t need any special GraphQL client to use it, here is the example query using curl:

curl -H 'Content-Type: application/json' -X POST -d '{"query": "{ part(mpn: {part: \"NE555P\", manufacturer: \"Texas Instruments\"}) { datasheet description type offers { sku { vendor part } prices { USD EUR GBP SGD } } } }"}' https://dev-partinfo.kitspace.org/graphql | python -m json.tool

One thing to note is that the requests are batched and cached so 1 request to Partinfo doesn’t necessarily mean 1 request to Octopart.

If we do hit the Octopart request limit we’ll have to come up with something but I don’t want impede development efforts by limiting access right now. Of course, if we don’t have money or alternative sources when Octopart wants to start charging then this won’t work out either so it’s kind of up to people to contribute code and money towards it if it’s something they want. The pricing structure Octopart btw. means our money also goes a lot further if we pool it.